Error Unclosed or orphan CSS braces

Why every { needs a matching }, and how one missing brace can silently swallow the rest of a stylesheet.

This covers two issues: a closing } with no matching opener (orphan-closing-brace), and a rule or at-rule block that's opened but never closed (unclosed-block).

Example

/* Wrong: missing closing brace */
.card {
  padding: 1rem;

.button { color: blue; }

/* Right */
.card {
  padding: 1rem;
}

.button { color: blue; }

Why it matters

CSS parsing is brace-driven — the parser tracks nesting depth by counting { and }. A single missing closing brace doesn't just break the rule it belongs to; every selector and declaration after it gets swallowed into that one unclosed block until the parser hits the next }, at which point everything realigns unpredictably. This is one of the most common causes of "half my stylesheet just stopped applying" bugs, and it's often invisible by eye in a long file.

Frequently asked questions

Why does one missing brace break unrelated rules further down?

Because the parser doesn't know the block was supposed to end — it keeps reading everything that follows as part of the same rule's declaration list, until it happens to hit a } that re-syncs it. Anything in between is misinterpreted, not just skipped.

Does a code editor catch this automatically?

Most editors with CSS syntax highlighting or a linter (like Stylelint) will flag brace mismatches immediately via bracket matching and error squiggles, which is the fastest way to catch this before it ships.