Skip to content

Language record

CSS

A stylesheet is indexed as the selectors it declares: each rule is a symbol carrying its own declarations, a custom property read from `var()` is a reference to the rule that declares it, and an `animation:` naming a keyframes block is a use of that block — edges the production pipeline used to discard and now keeps.

.css, .sass, .less · 2 registry ids · 8 of 14 relationship types

The registry row this page is generated from

Read at render time from the same family row the register reads, so nothing in this block can disagree with it.

Extensions
.css, .sass, .less
Registry names
csssass
Recorded symbols
selectors · custom properties · keyframes

Relationship types this analyzer constructs

8 of 14 constructed, read from this analyzer's source and re-derived by the languages gate. Each row below is one of the engine's types, in the engine's own order.

Relationship typeConstructed
callsconstructed by this analyzer
extendsruled absent
implementsruled absent
usesconstructed by this analyzer
importsconstructed by this analyzer
exportsconstructed by this analyzer
containsconstructed by this analyzer
referencesconstructed by this analyzer
overridesconstructed by this analyzer
instantiatesruled absent
decoratesruled absent
rendersruled absent
mixes_inruled absent
part_ofconstructed by this analyzer

8 constructed, 6 not constructed. All 6 absent types are recorded as ruled absent: the written reason and the corpus measurement behind each are in this family's completeness record. The register explains what each label means.

What this analyzer does not resolve

  • A selector is not a symbol reference. .btn is recorded as the selector it is written as, and bb does not connect it to the HTML or JSX that carries class="btn", so "which components use this rule" is a question this graph cannot answer.
  • Declarations ride the selector's own symbol rather than becoming symbols of their own — border-color: var(--brand) records the rule and the read of --brand, not a node named border-color. And @apply, @theme and @tailwind publish nothing, because they instruct a build tool rather than declare anything. @page, @starting-style and @position-try scope nothing an edge can name, so the rules inside them are recorded while the attribution is dropped.
  • A custom property declared in a stylesheet outside the index stays unresolved, and the corpus shows the scale: over one component library's stylesheets the delegated var() reads resolved 14 of 220, because the set consumes a design system's theme tokens from a file most of it never includes. Those edges used to be hidden behind a contains-only rule in the pipeline, which was discarding 2,170 var() and animation: references — 1,437 of them resolving at both ends.

Every line above was written against CSS’s own analyzer module and is named against a construct in it, so it can be checked against the source. Nothing here is inherited from a template, or from another language’s page.

Where you meet it in a repository

Recognised by extension — .css, .sass, .less. Everything below is about where those files actually sit in a working repository.

  • Specificity composition decides the kind, not the syntax: a bare #id is published as an interface, a bare tag as a type, a .class as a class, and a pseudo-class, attribute, descendant or complex selector as a class as well. @layer and @container become modules that scope the rules inside them; @media is a structural scope with containment edges and no symbol of its own; @supports is published because its query text names a scope.
  • Real CSS nesting resolves to ONE symbol. & .item inside .nav publishes the scoped selector .nav .item with a .nav contains .nav .item edge, because the symbol's identity and the edge's target have to agree — an earlier shape published dangling bare identities like card contains title.
  • A generated stylesheet — a Tailwind or Bootstrap build output committed under dist/ — indexes as a very large flat set of selectors, while the source it was generated from is a separate set of files with its own shapes.

Questions this index answers

Phrased as retrievals, because that is what an index can honestly do: it holds the symbols and the edges between them, and hands them back with the evidence attached.

  1. Which selectors does this stylesheet define, and what does each one declare?
  2. Which custom property does this value read, and which rule declares it?
  3. Which keyframes block does this animation: name?
  4. Which layer, container or media query wraps this selector?

What the analyzer sees in code like this

A custom property, the rule that reads it, and the keyframes an animation names
:root { --brand: #e2553b; }      /* bb records: variable --brand */

.card {                          /* bb records: class .card */
  border-color: var(--brand);    /* bb records: references -> --brand */
  animation: fade-in 200ms;      /* bb records: uses -> fade-in, the @keyframes block */
}

@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }

Symbols are stored with the file they came from and the bytes they span, so a hit points at a line rather than at a guess. The annotations in the sample are commentary for the reader, not strings the index would store.

Languages that turn up in the same repository

Web, data & config — the count beside each name is how many relationship types that family’s analyzer constructs.

The extensions, registry names, recorded symbols and relationship types above are the parser registry row for CSS, read while the page rendered — the same row the register reads, so the two surfaces cannot tell two stories. Every relationship type listed as constructed appears in src/ast/real-*, the analyzer modules bb ships. bb 0.1.0 answers from a local store over 50 languages (53 registry ids, three of them aliases). There is no benchmark on this page: every claim here is one you can go and read in the source.