Fix indentation for rules with an empty selector list#227
Open
bartveneman wants to merge 1 commit into
Open
Conversation
print_rule only indented via print_rule_selectors, which pushes one
indented line per selector. For malformed/unknown blocks with zero
selectors (e.g. a bare `{ }` nested inside another block), no line
was pushed at all, so the opening brace lost its indentation and
printed with a single leading space instead of a tab.
Contributor
|
| 📦 Package | 📋 Versions |
|---|---|
| @babel/parser | 2 versions
|
| @babel/types | 2 versions
|
| @babel/helper-string-parser | 2 versions
|
| @babel/helper-validator-identifier | 2 versions
|
| @rolldown/binding-wasm32-wasi | 2 versions
|
| picomatch | 2 versions
|
| rolldown | 2 versions
|
| @oxc-project/types | 2 versions
|
| @rolldown/binding-android-arm64 | 2 versions
|
| @rolldown/binding-darwin-arm64 | 2 versions
|
| @rolldown/binding-darwin-x64 | 2 versions
|
| @rolldown/binding-freebsd-x64 | 2 versions
|
| @rolldown/binding-linux-arm-gnueabihf | 2 versions
|
| @rolldown/binding-linux-arm64-gnu | 2 versions
|
| @rolldown/binding-linux-arm64-musl | 2 versions
|
| @rolldown/binding-linux-ppc64-gnu | 2 versions
|
| @rolldown/binding-linux-s390x-gnu | 2 versions
|
| @rolldown/binding-linux-x64-gnu | 2 versions
|
| @rolldown/binding-linux-x64-musl | 2 versions
|
| @rolldown/binding-openharmony-arm64 | 2 versions
|
| @rolldown/binding-win32-arm64-msvc | 2 versions
|
| @rolldown/binding-win32-x64-msvc | 2 versions
|
💡 To find out what depends on a specific package, run: pnpm -r why example-package
⚠️ Package Size Increase
| 📦 Package | 📏 Base Size | 📏 Source Size | 📈 Size Change |
|---|---|---|---|
| @projectwallace/format-css | 8.6 kB | 8.6 kB | +10 B |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
print_ruleonly added indentation viaprint_rule_selectors, which pushes one indented line per selector in the selector list.{ ... }nested inside another block), no line is pushed at all, so the opening brace's indentation was silently dropped — it printed with a single leading space instead of a tab.indent(depth)when the selector list prints as empty.Test plan
vitest run— all 254 tests passtsc --noEmit— no type errorsoxlint— cleanGenerated by Claude Code