CLI:
Version: 1.8.3
Color support: true
Platform:
CPU Architecture: x86_64
OS: linux
Environment:
BIOME_LOG_DIR: unset
NO_COLOR: unset
TERM: "xterm-256color"
JS_RUNTIME_VERSION: "v18.19.1"
JS_RUNTIME_NAME: "node"
NODE_PACKAGE_MANAGER: "yarn/4.4.0"
Biome Configuration:
Status: Loaded successfully
Formatter disabled: false
Linter disabled: false
Organize imports disabled: false
VCS disabled: true
Workspace:
Open Documents: 0
Biome's CSS parser raises a parser error when a CSS declaration ends with multiple semicolons, e.g.
.foo {
color: red;;
}
Sorry if it was reported already, but I couldn't find an issue for that.
The CSS file parses correctly. The formatter could simply remove multiple semicolons. This is what prettier does
For some context: One of my colleagues use IntelliJ to author a CSS file, and it did not show any errors. During the pre-commit hook, when biome was called to format the CSS file, it reported a syntax error in the CSS file. Took him some time to find the issue. It turned out the issue was that a declaration in the CSS file had 2 semicolons at the (;
)
I took a look at the CSS specification. If I understand it correctly, CSS syntax 3, 5.4.5, Consume a list of declarations allows for multiple semicolons:
Repeatedly consume the next input token
<semicolon-token>
Do nothing.
Various other tools such as IntelliJ, VSCode or https://jigsaw.w3.org/css-validator/validator also accept multiple semicolons. Biome however produces a parser error (tested with 1.8.3)
According to this comment here in declaration_or_rule_list_block.rs, the parser only seems to consider a single semicolon for now.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too