npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@barebase/style

v0.4.0

Published

Mobile-first, zero-dependency CSS framework. Import one element at a time.

Readme

bare.style

A stylesheet that makes a plain HTML page look finished, where you load only the parts the page actually uses.

Mobile first, zero dependency, no build step. Nothing here needs installing, compiling or configuring: if a page can load a stylesheet, it can use this framework. A page that loads the four core files and nothing else is already themed, readable, keyboard operable and AA, with no class in the markup at all.

Install

Three routes, none of which needs a build step. src/ and dist/ are the same CSS with the same file names: src/ keeps the comments, which is where the contrast measurements and the required markup live, so it is the one to read while building; dist/ is the same rules with the comments and redundant whitespace removed, committed to the repo so nothing has to be built to use it. Switching between them is a path change and nothing else.

npm

npm install @barebase/style

Every file has a clean specifier. The plain path gives the delivered form, and prefixing src/ gives the authored form with all the comments.

import 'bare.style/core/reset.css';
import 'bare.style/core/tokens.css';
import 'bare.style/core/type.css';
import 'bare.style/core/base.css';

import 'bare.style/data/table.css';
import 'bare.style/forms/button.css';

There is deliberately no import 'bare.style'. A default export would have to be an all-in-one bundle, and an all-in-one bundle is the thing this framework exists not to be.

CDN

Both CDNs serve raw package paths and ignore the exports map, so a CDN URL always spells out /dist/ or /src/. Pin a version: an unpinned URL means a future release can change what a live page loads.

<!-- jsDelivr -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/core/reset.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/core/tokens.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/core/type.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/core/base.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/forms/button.css">

jsDelivr can also concatenate, which turns per-element linking into one request without giving up the per-element choice. The order of the paths is the order of the concatenation, so core comes first and a theme comes after it:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/combine/npm/[email protected]/dist/core/reset.css,npm/[email protected]/dist/core/tokens.css,npm/[email protected]/dist/core/type.css,npm/[email protected]/dist/core/base.css,npm/[email protected]/dist/forms/button.css">
<!-- unpkg -->
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/core/reset.css">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/core/tokens.css">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/core/type.css">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/core/base.css">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/forms/button.css">

Swap /dist/ for /src/ in any URL above to get the commented form.

Copy it

Copy src/ or dist/ into whatever directory the site serves static assets from, then link the four core files plus whatever the page actually shows.

<!-- mandatory -->
<link rel="stylesheet" href="/css/core/reset.css">
<link rel="stylesheet" href="/css/core/tokens.css">
<link rel="stylesheet" href="/css/core/type.css">
<link rel="stylesheet" href="/css/core/base.css">

<!-- only what this page shows -->
<link rel="stylesheet" href="/css/layout/stack.css">
<link rel="stylesheet" href="/css/data/table.css">
<link rel="stylesheet" href="/css/forms/button.css">

Order does not matter, because every file opens with the same cascade layer statement and writes into exactly one of those layers. Whichever file a browser sees first fixes the order for all of them, so a link tag moved up or down the head cannot change the result. Your own unlayered CSS beats all of it with a single class.

Size

Measured by bun run size, which compresses the real bytes rather than adding up estimates. gzip is level 9, brotli is quality 11, and kB means 1,000 bytes.

Two forms are measured and they are never mixed. Delivered is dist/, comments stripped, and it is the only column comparable to a framework that publishes a minified build. Authored is src/ with every comment, which is genuinely what a page downloads if it links src/ directly, and is not comparable to anyone else's published figure.

| Bundle | Form | Files | Raw | gzip, one file | gzip, separate files | brotli | | --- | --- | ---: | ---: | ---: | ---: | ---: | | Core only | delivered | 4 | 19.96 kB | 4.58 kB | 5.60 kB | 3.85 kB | | Core only | authored | 4 | 52.15 kB | 16.44 kB | 18.21 kB | 13.53 kB | | Everything | delivered | 78 | 227.25 kB | 33.15 kB | 61.66 kB | 23.61 kB | | Everything | authored | 78 | 587.30 kB | 149.64 kB | 201.66 kB | 110.86 kB |

Delivered, one component adds 68 B to 4.25 kB gzip on top of core, median 380 B across the 74 components. Linked on its own, where it cannot share a compression dictionary with core, the same component is 225 B to 4.09 kB gzip. Authored, the same figures are 595 B to 5.86 kB added, median 1.53 kB, and 906 B to 6.11 kB alone.

Two gzip columns because both are real delivery shapes. One file is what a single link to a concatenated bundle costs. Separate files is what per-element link tags over HTTP/2 cost, where each file is compressed on its own. The second is always larger, and quoting only the first would overstate the per-element story.

The group barrels are not in those figures and are not components. src/data/index.css is 521 bytes gzip of @import and pulls twelve files, so linking it really costs 4.14 kB gzip delivered on top of core. Counting the barrel as a component would put the most expensive thing in the directory at the cheap end of the table. bun run size measures them transitively in their own section, and does the same for the theme files, which are custom-property declarations and add no rule at all.

The number worth quoting is neither row above. A real page links core plus the four or five components it shows, which lands between 4.58 kB and roughly 7 kB gzip delivered.

Layout of the repo

src/core/     reset, tokens, base, type    the only mandatory import
src/core/font.css                          opt-in, declares the typeface, imported by nothing
fonts/        Bare Sans as woff2 per script, plus OFL.txt and its provenance
src/layout/   container grid stack cluster sidebar split center spacer
src/forms/    button button-group input textarea select checkbox radio switch range file
              field label help error
src/nav/      navbar navlink sidebar-nav tabs breadcrumb menu drawer pagination
src/data/     table card list description-list stat badge tag avatar avatar-group kbd
              divider empty icon
src/feedback/ alert banner modal toast tooltip popover progress skeleton spinner
src/prose/    prose code quote
src/motion/   transitions reveal
src/utility/  the utility layer, plus an index barrel
src/theme/    derive, and the ember, moss and paper seed sets
src/behaviour/ optional ES modules, one per component the platform leaves short
dist/         the same CSS, comments stripped, generated by bun run dist and committed
docs/         icons.md, the icon set as copy-paste markup
site/         the documentation site, styled by this framework and nothing else
scripts/      authoring tools: size, contrast, character audit, dist build, deploy
test/         the checks that make the contract enforceable

Rules the framework holds itself to

  • Zero dependency. No preprocessor, no plugin, no configuration file. A <link> tag is the install.
  • Per-element import. No component file imports a sibling. Importing the table cannot drag in the modal. The three index.css barrels are convenience only and are never the cheap path.
  • Mobile first. Every rule is authored for a 320px screen and widened with min-width. max-width is never the primary strategy.
  • Cascade layers, declared everywhere. Every file opens with the same @layer bare.reset, bare.tokens, bare.base, bare.layout, bare.component, bare.utility; statement and writes into exactly one of those layers, so import order cannot change the result. Your own unlayered CSS beats all of it with a single class.
  • One owner per block. Two files styling the same class in the same layer at the same specificity would put the winner back in the hands of link order, which is the one thing the layers exist to prevent. A file that wants a default without owning the block writes the bare element inside :where() at zero specificity instead. The suite fails on a collision.
  • WCAG 2.2 AA is a correctness property. 4.5:1 for body text, 3:1 for large text and for meaningful non-text, measured against every surface in both themes. A pairing that cannot reach it is not shipped. The numbers live in the comment next to the rule that depends on them.
  • prefers-reduced-motion is honoured by the reset, framework wide, so a component author who forgets the media query still cannot ship vestibular-triggering motion.
  • Only transform, opacity, clip-path and filter ever animate. Those are the properties a compositor can run off the main thread.
  • No emoji, no em-dash, no en-dash, no curly quotes, no ellipsis character. Icons are inline SVG sized and coloured by tokens. bun run chars enforces this over the whole repo.

Browser support

The framework leans on modern CSS on purpose, so the versions it needs are stated here rather than left for a consumer to discover in production.

| | Chrome and Edge | Firefox | Safari and iOS Safari | | --- | --- | --- | --- | | Every component behaves and animates as documented | 130 | 129 | 17.5 | | Renders and is usable, with the losses below | 99 | 97 | 15.4 | | Below that | nothing renders | nothing renders | nothing renders |

The top row is the highest version any single shipped rule needs, not a guess: Chrome 130 is text-wrap: pretty, Firefox 129 is @starting-style, Safari 17.5 is @starting-style and text-wrap: pretty together. Those releases are all from 2024.

Four things land later than that row and none of them is a behaviour: anchor positioning (Chrome 131 once anchor-scope is counted, Firefox 147, Safari 26), field-sizing (Chrome 123, Firefox 152, Safari 26.2), accent-color on native controls (Chrome 93, Firefox 92, Safari 26.2) and the unprefixed print-color-adjust (Chrome 136). Every one of them is either behind @supports or shipped next to a fallback declaration, which is why they sit outside the row rather than raising it to a version most people are not on.

The bottom row is not a euphemism. Every rule in every file is inside @layer, and a browser that does not know an at-rule drops its whole block, so on an engine older than cascade layers a page gets the browser's own default stylesheet and nothing else. Measured in Chrome 150 by putting a rule inside an at-rule name no engine implements: the element computed to the initial colour, with the author declaration gone. That is the same thing that happens to all of src/ in Chrome 98.

There is no polyfill, and there will not be one. A framework whose whole claim is that a <link> tag is the install cannot answer an old engine with a script.

What each modern feature costs when it is missing

Versions are from caniuse and from MDN's browser-compat-data, read on 2026-08-01. The behaviour column is what this repo measured in Chrome 150 unless it says otherwise.

| Feature | Files | Chrome | Firefox | Safari | Without it | | --- | ---: | --- | --- | --- | --- | | @layer | 62 | 99 | 97 | 15.4 | Nothing renders. No degraded path exists. | | :has() | 6 | 105 | 121 | 15.4 | Cosmetic only, measured: a focused card keeps the ring on its own link and its accent border and loses only the ring around the whole card; a disabled checkbox label keeps full-strength ink; a multiple select keeps a chevron pointing at an already-open list. | | Anchor positioning | 3 | 125, and 131 for anchor-scope | 147 | 26 | Guarded by @supports, and the condition names anchor-scope because an engine with anchor positioning and no scoping points every tooltip on the page at the last anchor in the document. Falls back to a viewport-pinned bar under 48em and a centred or trigger-relative panel above it. | | @starting-style and transition-behavior | 5 | 117 | 129 | 17.5, and 17.4 for transition-behavior | Modals, popovers, drawers and toasts appear and disappear with no animation. The transition is declared twice in each of those files, because one unknown keyword invalidates the whole shorthand: measured, a shorthand with one bad item computes transition-property: all and 0s, which would take the fade with it. | | popover | 1 | 114 | 125 | 17 | No degraded path. src/feedback/popover.css hides itself entirely through @supports not selector(:popover-open), so the trigger does nothing. Before that rule the panel was an invisible fixed bar across the foot of the viewport: measured at 390 by 50 with pointer-events: auto, and elementFromPoint at its centre returned the panel rather than the page. Use src/nav/menu.css, which is the same skin as a disclosure, where those engines matter. | | field-sizing | 1 | 123 | 152 | 26.2 | Guarded. A textarea keeps its rows height instead of growing with its value. | | subgrid | 1 | 117 | 71 | 16 | Guarded. Cards in a grid row stop sharing tracks, which is the pre-subgrid status quo. | | Container queries | 3 | 105 | 110 | 16 | Opt-in through a modifier. container-type is ignored and a consumer's own @container rules never match, so styles written against a pane are simply absent. | | :dir() | 11 | 120 | 49 | 16.4 | RTL corrections are silently absent. The worst case is measured in src/feedback/tooltip.css: the centred fallback chip lands one chip width, 256px, off its control. | | :user-valid | 3 | 119 | 88 | 16.5 | A field that failed validation after the user interacted with it is not marked. The .bs-error message and aria-describedby still carry it. | | accent-color | 4 | 93 | 92 | 26.2 | Native checkbox, radio and range keep the platform accent instead of the iris one. | | mask-image | 2 | 120 | 53 | 15.4 | Guarded in both files. The select chevron and bs-icon-mask paint nothing rather than a solid square. | | text-wrap: balance and pretty | 5 | 130 | 124 | 17.5 | Headings and short paragraphs wrap the ordinary way. | | scrollbar-width and scrollbar-color | 1 | 121 | 64 | 18.2 | ::-webkit-scrollbar is declared alongside and covers Chrome and Safari below those versions. | | dvh | 5 | 108 | 101 | 15.4 | Declared after a vh value or behind @supports, so the cap falls back rather than disappearing. | | print-color-adjust | 4 | 136 | 97 | 15.4 | -webkit-print-color-adjust is declared first, which is what Chrome understood before 136. | | <dialog> and showModal() | 2 | 37 | 98 | 15.4 | src/nav/drawer.css documents fallback markup and the obligations that move to the consumer with it. The modal has no fallback: a <div> with role="dialog" is not a modal. | | color-mix() | 1 | - | - | - | Guarded by @supports in src/core/tokens.css, so no version is load bearing. Hover and active states fall back to flat accent tokens. |

Two features have no degraded path and both are named above: cascade layers, which is total, and the popover attribute, which costs one component. Everything else in the table is a loss of polish or of one enhancement, and the component stays usable.

Behaviour, which is optional

src/behaviour/ is the only JavaScript in the repo and no page is required to load any of it. Every component renders and reads correctly with the modules absent; what they add is the interaction the platform does not supply. They are ES modules with no dependencies, no build step and no initialisation call: each attaches a small number of delegated listeners to document when it is imported, so a component added to the page later is covered by the same listeners.

<script type="module" src="/css/behaviour/tabs.js"></script>

| Module | What the platform already does | What the module adds | gzip, code | gzip, authored | | --- | --- | --- | ---: | ---: | | dialog.js | showModal() gives the top layer, the focus trap, inert behind, Escape, ::backdrop and focus restore | Declarative triggers, aria-expanded in step, scroll lock while open, and a focus target when the invoker was removed while the dialog was open | 617 | 1,773 | | tabs.js | Nothing. role="tab" is a promise about behaviour | Roving tabindex, arrows with Home and End, RTL-aware direction, aria-selected, and the hidden attribute on inactive panels | 684 | 1,511 | | menu.js | Nothing for this shape | aria-expanded as the only state, Escape with focus returned, outside pointerdown, Tab to close, and roving focus for role="menu" | 852 | 1,677 | | toast.js | The live region announcement | An auto-dismiss timer that pauses under the pointer and never runs at all on a toast carrying its own action, the close button, and removal after the exit transition | 806 | 1,706 | | navbar.js | Nothing | aria-expanded on the toggle, Escape to close, and a close when a link inside is followed | 366 | 825 | | tooltip.js | Hover, focus and aria-describedby, which is hoverable and persistent under SC 1.4.13 | Dismissible: Escape hides the chip without moving focus, and the flag clears when the anchor is left | 291 | 882 |

Both columns are gzip level 9 and both are real. Code is the file with its comments removed, 291 to 852 bytes, and it is what the behaviour actually costs. Authored is the file as it ships, 825 to 1,773 bytes, and it is what a page downloads today, because there is no stripped twin of these the way there is for the CSS: 3,616 bytes for all six against 8,374. The comments are the majority of the authored bytes and they carry the reason each module exists, which is the same trade src/ makes everywhere else in this repo. All six together are smaller than one framework's dropdown.

There is deliberately no popover.js. The popover attribute already gives light dismiss, Escape and the top layer, and a supporting engine already computes the expanded state for the trigger without an attribute being written: measured in Chrome 150 through the accessibility tree, the invoker reported expanded: false closed and expanded: true open with no script on the page. A module there would be code that does nothing.

src/nav/drawer.css closes with an animation for the same reason. The exit slide used to be documented as the consumer's job; declaring display and overlay as discrete transitions hands it back to the engine. Measured in Chrome 150: without them the panel was display: none 40ms after close() with no travel at all, and with them it sampled -99.9px, -220.3px and -320.0px at 40, 120 and 260ms against a 331.5px panel.

Utilities

Fourteen groups under src/utility/, each independently loadable, plus three variant files a page links on purpose. They write into bare.utility, the last layer in the order, which is what lets a single class beat a component without a point of specificity.

<link rel="stylesheet" href="/src/utility/spacing.css" />
<link rel="stylesheet" href="/src/utility/flex.css" />

<!-- or the whole base set in one link -->
<link rel="stylesheet" href="/src/utility/index.css" />

The naming scheme

.bs-[<variant>-]<key>-<value>, without exception. The key is the property, the value is the step on the token scale that property is measured in, and the variant is a breakpoint (sm, md, lg) or a state (hover).

Property first, and not Tailwind's value-first terseness, because components and utilities share one class-name space behind one bs- prefix. .bs-grid is already the layout primitive and .bs-display is already a type step, so a utility named after its value alone would collide with the component named after the same noun, and the winner would be link order. bs-card bs-p-6 also reads as what it is: which half of the framework each class came from.

The step name and not the measurement, because .bs-p-6 has to stay correct when a consumer redefines --bs-space-6. A class called .bs-p-32 is a promise about pixels that the scale is allowed to break. Every utility resolves through var() to an existing scale, and the suite fails on one that carries a measurement of its own: relational values (100%, 100dvh) and the visually-hidden clip geometry are the only literals in the directory, and both are named exemptions rather than inferred ones.

What is where, and what it costs

Delivered gzip, from bun run size:

a11y            287 B   visually-hidden, and the focusable variant a skip link needs
align           412 B   align-items, justify-content, align-content, and the self axes
border          573 B   width, style, colour, radius
color           419 B   text, background, semantic tokens only, never a raw palette value
display         291 B   display, plus the two print-only cases
effect          266 B   shadow, opacity
flex            329 B   direction, wrap, grow, shrink, order
grid            397 B   columns, rows, spans
interaction     345 B   cursor, pointer-events, user-select, touch-action
overflow        348 B   both axes, overscroll, scroll-behaviour
position        441 B   position, insets, the z-index scale
size            452 B   width and height, min and max, the intrinsic keywords
spacing        1.32 kB  margin, padding, gap, every side and axis, logical throughout
typography      574 B   align, case, decoration, wrap, truncate, line clamp

Size, leading, tracking, weight and measure are not here. They are in src/core/type.css, which owns the type scale and is already mandatory, so a page has .bs-text-h2, .bs-leading-snug and .bs-weight-medium without linking anything.

The barrel, measured transitively, is 4.20 kB gzip for all fourteen. That is the honest number: a barrel that pulls fourteen files is not a 242-byte component because its own text is 242 bytes.

Variants, and why they are separate links

A full breakpoint matrix over every group would multiply the layer by six, so the cut was made by measuring rather than by taste. Breakpoint variants exist only for the utilities whose value actually changes with viewport width - spacing, and the layout set of display, flex, grid, align and size. Colour, border, shadow, opacity, cursor and overflow get none: a padding that grows on a tablet is a normal layout, a border colour that changes at 768px is a design smell.

spacing-responsive   4.09 kB gzip   sm, md, lg over margin, padding, gap
layout-responsive    2.63 kB gzip   sm, md, lg over display, flex, grid, align, size
hover                 636 B  gzip   hover and focus-visible over colour, shadow, opacity

Together the three are 7.36 kB, against 4.20 kB for the entire base set. Folding them into the barrel would take it to 11.56 kB, of which 64 per cent would be rules most pages never use, so they stay three deliberate links. State variants are paired with :focus-visible throughout, because a hover-only affordance is invisible to a keyboard.

No !important, anywhere

Utilities are the one place !important is usually defensible, and here it would be a bug rather than a redundancy. bare.utility is the last layer, and layer order outranks specificity outright, so .bs-p-4 already beats .bs-card__body .thing with nothing added.

For important declarations the cascade reverses layer order. An !important in bare.utility would therefore be the weakest important declaration in the framework, losing to one in bare.component. Measured in Chrome rather than taken from the spec: with color declared !important in both layers, the computed value is the component's.

Tooling: completion, checking, migration

Three things a developer coming from a build-step framework misses on the first day, none of which requires a build step here. All three are generated from the CSS on every deploy, so none of them can offer a class the framework does not ship.

Completion

{
  "html.customData": ["./node_modules/@barebase/style/editor/bare-style.html-data.json"],
  "css.customData": ["./node_modules/@barebase/style/editor/bare-style.css-data.json"]
}

Two lines in .vscode/settings.json and no extension to install: both are VS Code's own documented custom-data schemas at version: 1.1. The first completes class names inside class="" with the declarations, the colour where the class paints one, and the file the page has to link. The second completes the --bs-* customisation hooks in CSS, which is the one part of this framework that is genuinely hard to discover - a hook only appears inside a var() fallback in a file you have no reason to open.

editor/bare.style.code-snippets is the part nobody asks for and everybody needs: the required markup for every component, keyed on the block class. Half of these components have required structure, and a class name on its own does not carry it.

bun run editor regenerates all of it. Full setup in docs/editor-setup.md.

Checking

npx bare-style-check src/

Every bs- class in your markup that this framework does not declare, with the nearest real name. A wrong class name here does not throw - the page renders, unstyled in one place, and it looks like a design problem rather than a typo. That is bad hand-written and much worse machine-written.

Plain Node, no bun and no build: it reads the generated JSON index rather than parsing CSS. It also reports the names it cannot check, because a clean run has to mean the file was checked rather than that half of it was invisible. docs/checking-markup.md.

Run against this framework's own site and templates, it found two templates using a class the framework deliberately does not ship and eight linking a stylesheet none of their classes came from. Those are fixed; the check now runs in the deploy.

Migration

bun run tailwind path/to/your/components

Reports what each Tailwind class becomes, with the fidelity and the reason:

p-6                          bs-p-5                       same value
p-5                          bs-p-4                       nearest step  (1.25rem becomes 1rem)
bg-indigo-600                bs-bg-accent                 a role instead
sm:grid-cols-3               bs-sm-cols-3                 nearest step  (Tailwind sm is 40rem, this
                                                          framework's sm is 30em)
ring-inset                   -                            no equivalent (the affordance is an outline
                                                          here, which forced-colors keeps)

Reports, never rewrites. A codemod has to be right about every class or it destroys the file, and there is a category here it cannot be right about: an arbitrary value has no equivalent to be right about, and a button written as fourteen utilities is one class here.

The measured coverage against the corpus in scripts/lib/token-fragments.ts - real page fragments written in both frameworks - is printed in docs/migrating-from-tailwind.md, which is generated by the same function the tool calls, so the document cannot claim a mapping the tool would not make. Every target is checked against the classes this build declares, and the suite fails if one is not.

Icons

There is no icon font, no sprite and no package. docs/icons.md is the set - close, check, four chevrons, menu, search, external link, copy, info, warning, error, success and a spinner - as inline SVG to copy into a page, and src/data/icon.css is the sizing and the colouring.

An icon is around 120 bytes of markup, gzips against the rest of the document, and cannot fail to load. A sprite is a request that has to arrive before a button has a label; a font is a download, a build step and a fallback glyph. Both put a second source of truth between a page and its own markup.

The stroke is currentColor, so an icon is the colour of the text beside it with no rule at all, and --bs-icon-color overrides that where it has to differ. The same glyphs are also published as pre-escaped url() data URIs for bs-icon-mask, which is how an icon reaches a generated box. The inline form is the one to prefer: a stroke of currentColor is exactly what forced colors keeps, where a mask is a background fill and both printing and forced colors take it away.

Theming

Light is the default. With no class on the document element the page follows prefers-color-scheme, so a reader whose system asks for dark gets dark and everyone else gets light. Adding .theme-light or .theme-dark pins the choice and beats the system preference in both directions, which is the part most implementations get wrong: source order alone does not achieve it, because a later media query still beats an equal-specificity class rule placed before it. The token file targets :root:not(.theme-light) inside the prefers-color-scheme: dark query, so a pinned light theme is never matched by it rather than merely overridden afterwards.

<html class="theme-dark">

Both classes are written as :root.theme-light and as a bare .theme-light, so a theme can also be scoped to a subtree rather than the whole document.

Your own colours, from six values

Link theme/derive.css after core, then declare the seeds. Nothing else is required, and there is still no build step.

<link rel="stylesheet" href="/css/core/reset.css">
<link rel="stylesheet" href="/css/core/tokens.css">
<link rel="stylesheet" href="/css/core/type.css">
<link rel="stylesheet" href="/css/core/base.css">
<link rel="stylesheet" href="/css/theme/derive.css">
<link rel="stylesheet" href="/css/my-brand.css">
/* my-brand.css */
@layer bare.tokens {
  :root {
    --bs-seed-accent: #bc5801;          /* primary action and focus ring */
    --bs-seed-accent-ink: #ffffff;      /* ink that sits on the accent fill */
    --bs-seed-accent-alt: #f0a868;      /* selection and active state */
    --bs-seed-accent-alt-ink: #24160c;  /* ink that sits on the selection fill */
  }

  :root, :root.theme-light, .theme-light {
    --bs-seed-bg: #fdf8f3;              /* the page */
    --bs-seed-ink: #21160f;             /* primary text */
  }

  @media (prefers-color-scheme: dark) {
    :root:not(.theme-light) {
      --bs-seed-bg: #0f0b08;
      --bs-seed-ink: #f7eee5;
    }
  }

  :root.theme-dark, .theme-dark {
    --bs-seed-bg: #0f0b08;
    --bs-seed-ink: #f7eee5;
  }
}

Four more seeds are optional and keep the default when unset: --bs-seed-ok, --bs-seed-ok-ink, --bs-seed-danger, --bs-seed-danger-ink.

Everything else is derived. Surfaces are the page with a fixed percentage of the ink bled into them, so a raised surface always moves away from the page and toward the text, in both themes. The text tiers are the same ramp run backwards. The link ink is the accent pulled toward the page's own ink until it can carry body copy. The percentages are listed in the header comment of src/theme/derive.css, so a derived value can be predicted rather than discovered.

One ordering rule, and it is the only one in the framework: a theme loads after core. Both write custom properties into @layer bare.tokens at the same specificity, so the last one wins.

Theming this way is opt-in and cannot move the default. Every derived value is a color-mix whose two sides carry the same fallback, and that fallback is the default value for the token being derived. Mixing a colour with itself is identity at any percentage, so a page that links derive.css and seeds nothing computes the default palette exactly. The whole derivation also sits inside one @supports, so a browser without color-mix keeps the default palette entirely rather than half-applying a theme.

Proving a theme is still AA

Deriving a palette does not make it accessible, and an arbitrary accent really can put link ink under 4.5:1 on some surface. So a theme is checkable rather than hoped for:

bun run contrast --theme src/theme/derive.css --theme src/theme/ember.css

That layers the files onto src/core/tokens.css in the order given, exactly as a browser would, then recomputes every pairing in the manifest and every colour rule in src/ against the result, in both dark and light, and exits non-zero on anything under floor. --theme repeats, so a seed file of your own goes on the end.

Two seed constraints fall out of the geometry and are worth knowing before picking a colour, since they are what the check will tell you about:

  • --bs-seed-accent has to clear 3:1 against both pages, because it is the focus ring and the action edge on a near-black surface and on a near-white one. That puts it in the middle of the luminance range, which is where the default #5b53ff sits.
  • --bs-seed-accent-ink has to clear 4.5:1 on the accent, because it is the label on the button.

Example themes

Three ship, and they are genuinely different rather than a hue rotation. Each is verified by the suite across every pairing in both themes.

| Theme | What it is | Accent | | --- | --- | --- | | theme/ember.css | Warm. Brown-black page, burnt orange action, amber selection. Leaves the status pair at the default, to show that part is optional. | #bc5801 | | theme/moss.css | Green throughout, including the page. Re-seeds the status pair so success is not read as the action colour. | #018658 | | theme/paper.css | Achromatic. No hue in the page at all, pushed to the ends of the range, with one saturated blue doing all the colour work. | #0178d3 |

<link rel="stylesheet" href="/css/theme/derive.css">
<link rel="stylesheet" href="/css/theme/ember.css">

Customising

Every component reads its own custom properties with a global token as the fallback, which is the no-build customisation path for one component rather than the whole palette.

:root {
  --bs-card-radius: 0;
  --bs-wrap-max: 72rem;
}

.panel--quiet {
  --bs-card-bg: var(--s-prev);
  --bs-card-shadow: var(--bs-shadow-0);
}

One caution the framework follows itself: a custom property declared on an element inherits into everything inside it. That is why the framework's own modifiers set the used value rather than declaring a hook, and why a hook you set on a container also retunes the same primitive nested inside it.

Your own typeface, in one line

--font-sans is the whole of it. Set it and every element follows, headings and body alike, because --bs-font-sans resolves through it rather than restating it.

:root {
  --font-sans: 'Your Face', ui-sans-serif, system-ui, sans-serif;
}

You win by default: the framework's own face is only ever the first entry in that stack, so replacing the stack replaces it. There is no second token to keep in step and nothing to un-declare. The same applies to --font-mono and --font-eyebrow, which are system stacks and download nothing.

The typeface

The framework ships one, self-hosted, and no page is charged for it unless it asks.

Nothing is downloaded by default. src/core/tokens.css names the face at the head of a stack that ends in the system sans, and a stack whose head matches nothing simply resolves further down. A page that links core and no more downloads zero font bytes, exactly as before this existed. No Google Fonts request, no third party, nothing to consent to.

One link turns it on.

<link rel="stylesheet" href="https://bare.style/dist/core/font.css">

That file declares a unicode-range per script, so a browser fetches only what the page renders. Measured against the shipped ranges:

| page | files fetched | bytes | | --- | ---: | ---: | | English, German, French, Spanish | 1 | 48,256 | | Russian | 2 | 67,004 | | Greek | 3 | 78,484 | | Vietnamese | 3 | 143,576 | | Japanese, Chinese, Korean, Hebrew | 0 | 0 |

The last row is not a gap being papered over. Bare Sans is Inter, and Inter contains latin, greek, cyrillic and vietnamese and no other script. Text in anything else matches no range, falls through to the reader's system font and costs nothing, which is why the file is safe to link on a page in any language. A CJK webfont is not a subset of this problem but a different one, four and a half megabytes wide, and it does not belong in a CSS framework's default path.

To have the font on first paint rather than after the stylesheet parses, preload the one subset the page needs:

<link rel="preload" as="font" type="font/woff2" crossorigin
      href="https://bare.style/fonts/bare-sans-latin.woff2">

font-display is swap, and the reason it is safe here is the metric-matched fallback in src/core/type.css: it overrides the system font's metrics to Inter's own, so the swap changes letterforms without moving a line. Text is visible immediately and nothing jumps when the file lands.

It is Inter. Renamed, not redesigned, and no design credit is claimed. Copyright (c) 2016 The Inter Project Authors, SIL Open Font License 1.1. Inter declares no Reserved Font Name, so the rename is permitted outright; it was done so that a @font-face named Inter could not shadow a full copy a reader already has installed, which is why 'Inter' sits directly behind 'Bare Sans' in the stack. fonts/OFL.txt is the licence and must travel with any copy of the binaries; fonts/README.md carries the provenance, the sha256 of every file and the reasoning.

The site

site/ is the documentation site. It is styled by bare.style and by nothing else: there is no site stylesheet, and the only CSS the pages load is the framework's own files. That is the strongest available proof that the framework is complete enough to build with, and it is what surfaced the gaps listed further down.

The pages link the framework with absolute paths under /src/, so the document root has to contain both the contents of site/ and a copy of src/. Locally that means serving the repo root and opening /site/:

python -m http.server 8000
# then open http://localhost:8000/site/

The markup panel under every example is read out of the live example above it by site/site.js, rather than transcribed, so the markup a reader copies is the markup that produced the thing they are looking at and cannot drift out of date.

How it compares

Every figure in the first three columns was measured on this machine, by installing each package from npm and compressing its own published minified bundle at gzip level 9. Nothing is quoted from memory, and bun run compare reproduces it. Cells are left empty where a number could not be verified rather than filled with an estimate.

| | Version measured | Minified raw | Minified gzip | @layer | prefers-color-scheme | | --- | --- | ---: | ---: | --- | --- | | bare.style, core only | 0.1.0 | 19.96 kB | 4.58 kB | yes | yes | | bare.style, everything | 0.1.0 | 227.25 kB | 33.15 kB | yes | yes | | Simple.css | 2.3.7 | 9.4 kB | 2.86 kB | no | yes | | Water.css | 2.1.1 | 22.7 kB | 3.71 kB | no | yes | | Open Props | 1.7.23 | 29.6 kB | 8.02 kB | no | yes | | Pico.css | 2.1.1 | 83.3 kB | 12.23 kB | no | yes | | Bootstrap | 5.3.8 | 232.1 kB | 32.29 kB | no | no | | Bulma | 1.0.4 | 677.9 kB | 67.85 kB | no | yes | | Tailwind | | | | | |

Read that table carefully, because the honest comparison is narrower than it looks.

  • Simple.css and Water.css are classless stylesheets, and they are smaller than bare.style's core because they are meant to be: they style elements and stop. Neither ships a modal, a data table or a form control set, so "smaller" there is a difference in scope rather than in efficiency.
  • Open Props is a token set, not a framework. It is in the table because it is the closest comparison for the token layer specifically, and for nothing else.
  • Pico.css, Bootstrap and Bulma have comparable scope. Against those, the number that matters is not the "everything" row, which nobody ships, but the 4.58 kB to roughly 7 kB a real page lands on once it links core plus what it shows.
  • Bootstrap's figure is its CSS only. Its JavaScript bundle is not counted, and bare.style's optional behaviour modules are not counted either.
  • Tailwind's row is empty on purpose. Its output size is a function of the consuming project's markup, so there is no published figure to put in a cell, and inventing one would be worse than the empty space.

The last two columns are also measured, by searching each published bundle. They are the two places where the difference is structural rather than a matter of size: no other row declares cascade layers, so in every one of them link order can still change the result, and no other row can be loaded one element at a time or ships a command that recomputes WCAG contrast for a palette you invented.

Against Tailwind, on capability rather than size

Tailwind facts below were read from https://tailwindcss.com/docs/theme and https://tailwindcss.com/docs/border-radius on 2 August 2026, against a docs shell reporting v4.3. Nothing here is quoted from memory, and where a figure was not read from Tailwind's own source it is not printed.

| | Tailwind v4 | bare.style | | --- | --- | --- | | Build step | Required for the utility layer. The compiler scans your source and emits only what you used. | None. The CSS is what ships; the compiler is optional and only ever removes. | | Arbitrary values | top-[117px], [mask-type:alpha], under any variant. | No class-name form. Set the matching --bs-* property, or write the one rule. | | Colour | A pigment and a lightness, per utility family, with an opacity modifier. | A role resolved from the theme. No dark: variant on a colour utility, because the role is the same in both themes and the token is what changes. | | Spacing scale | One multiplier, --spacing, and an unbounded integer, so p-73 is legal. | Hand-set steps from --bs-space-*. Migration lands on the nearest and says so, with both values. | | Breakpoints | sm 40rem, md 48rem, lg 64rem, xl 80rem, 2xl 96rem. | sm 30em, md 48em, lg 64em. The names collide and sm does not. | | Logical properties | Both spellings ship: pt/pr/pb/pl and ps/pe/pbs/pbe. | Logical throughout. A physical name maps to the logical property and the report says which way it flips. | | Cascade layers | Not used by the emitted utilities. | Every file declares the same layer order, which is what makes per-element import order-independent. | | Components | None. A button is the utilities you typed. | A button is bs-btn bs-btn--primary, and the focus ring, the disabled state, the forced-colors fallback and the print treatment come with it. | | Contrast | Your responsibility. | A gate. bun run contrast measures every pairing in both themes and fails the build under AA. | | Editor completion | An extension, kept in step with your config. | Two generated data files VS Code reads natively, regenerated from the CSS on every deploy. |

The honest summary: Tailwind can express things this framework cannot, and all of them are the same thing - an unbounded value space that only a compiler can serve. What it buys back is a build step and a class list that is longer than the markup it decorates. The trade this framework makes is to ship the common case as a component, the one-off as a utility, and the genuinely arbitrary as a custom property you set on the element.

bun run tailwind prints exactly where a given file lands on that trade, and docs/migrating-from-tailwind.md carries the measured coverage figure over a corpus written to flatter neither side.

Verifying

bun run size        # measured bytes, per file and per bundle, both forms
bun run dist        # regenerate dist/ from src/, required after any CSS change
bun run dist:check  # prove dist/ is current without writing anything
bun run contrast    # every text and background pairing, both themes
bun run contrast --theme src/theme/derive.css --theme src/theme/ember.css
bun run chars       # banned characters over the whole repo
bun run token-cost  # what it costs a model to write this markup, against Tailwind
bun test test/      # the contract, the layers, the imports, the colour maths, the themes
bun run verify      # chars, contrast, tests

bun run editor        # regenerate the class index, the editor data and the snippets
bun run editor:check  # prove they are current without writing anything
bun run check <path>  # every bs- class in some markup that this framework does not declare
bun run tailwind      # what a Tailwind file becomes here, with the fidelity and the reason
bun run tailwind:docs # regenerate docs/migrating-from-tailwind.md from the mapper

A change to src/ that does not regenerate dist/ fails the suite, because a stale dist/ means the published size numbers describe bytes nobody is being served.

Deploying the site

scripts/deploy-site.sh assembles a staging directory from site/ plus a copy of src/, ships it, restarts the process and purges the edge. Every credential and the deploy target come from .env.deploy, which is gitignored, so nothing in the script is a secret.

Required in .env.deploy: DEPLOY_SSH, DEPLOY_PATH, DEPLOY_PM2_APP, CF_ZONE_ID, CF_PURGE_TOKEN, SITE_URL.

The restart is a plain pm2 restart, never --update-env. That flag re-reads the environment from the shell running the command, and an ssh shell carries none of the site's variables, so it replaces the stored environment with an empty one and the site 502s until the process is deleted and started again by hand.

Known gaps, found by building the site

Dogfooding is meant to surface what is missing, so these are recorded rather than worked around silently.

  1. ~~No block-spacing primitive.~~ Closed by src/utility/spacing.css. Vertical space between two siblings that are not inside a stack is bs-mt-8 or bs-mb-8, on the scale, with breakpoint variants in spacing-responsive.css. The site still uses bs-divider with --bs-divider-color: transparent in places, which now has a plainer replacement.
  2. bs-navbar__toggle-label is documented and unstyled. The required markup in src/nav/navbar.css names the class, but no rule matches it. Harmless, since the label renders as ordinary text, but the class promises something the file does not deliver. It is not alone: bun run editor now prints every documented example that names a class no rule matches, because the example is what a developer copies. npx bare-style-check site/ prints the same problem from the other end - the classes this site's own pages apply and no file declares.
  3. The navbar constrains the order of its own children. The reveal rule is .bs-navbar__toggle[aria-expanded='true'] + .bs-navbar__list, so the list has to be the immediately following sibling of the toggle. Anything else that has to sit in the bar, like the theme control on this site, is forced to come before the toggle and therefore renders to the left of the links at wide widths.
  4. bs-quote--pull does not reach its own paragraph. The modifier sets a heading type step on the blockquote, but src/core/type.css sets the body step on every p at zero specificity, so the paragraph inside a pull quote renders at body size. The framework's own documented quote markup is blockquote > p, so this bites every time. The zero-build fix is a type utility on the paragraph, which is what the site does, but the component should carry a rule for its own > p instead.

Licence

MIT. See LICENSE.

The typeface under fonts/ is not covered by that and is not ours. It is Inter, copyright (c) 2016 The Inter Project Authors, under the SIL Open Font License 1.1, redistributed unmodified as the per-script woff2 subsets Google Fonts publishes. fonts/OFL.txt is the licence text and has to stay with the binaries in any copy, redistribution or fork; Google's subsetting strips the machine-readable licence field out of the font itself, so that file is the only place the terms survive. The fonts stay OFL, this package stays MIT, and neither is sold.