-
-
Notifications
You must be signed in to change notification settings - Fork 442
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(css_parser): add :local and :global pseudo class. #3011
- Loading branch information
1 parent
19ac556
commit 9a752ed
Showing
6 changed files
with
197 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
40 changes: 40 additions & 0 deletions
40
crates/biome_css_formatter/tests/specs/css/atrule/value.css
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
@value | ||
colors: | ||
"./colors.css"; | ||
@value | ||
primary, | ||
secondary from | ||
colors | ||
; | ||
@value | ||
small | ||
as | ||
bp-small, | ||
medium, | ||
large as | ||
bp-large from | ||
"./breakpoints.css"; | ||
@value | ||
selectorValue: | ||
secondary-color; | ||
@value | ||
small: | ||
(max-width: | ||
599px); | ||
@value | ||
medium: | ||
(min-width: 600px) and (max-width: 959px); | ||
@value | ||
large: | ||
(min-width: 960px); | ||
@value | ||
primary: | ||
#BF4040; | ||
@value | ||
secondary: | ||
#1F4F7F; | ||
@value | ||
common-gradient: | ||
transparent 75%, | ||
var(--ring-line-color) 75%, | ||
currentColor 79%; |
102 changes: 102 additions & 0 deletions
102
crates/biome_css_formatter/tests/specs/css/atrule/value.css.snap.new
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
--- | ||
source: crates/biome_formatter_test/src/snapshot_builder.rs | ||
assertion_line: 212 | ||
info: css/atrule/value.css | ||
--- | ||
# Input | ||
|
||
```css | ||
@value | ||
colors: | ||
"./colors.css"; | ||
@value | ||
primary, | ||
secondary from | ||
colors | ||
; | ||
@value | ||
small | ||
as | ||
bp-small, | ||
medium, | ||
large as | ||
bp-large from | ||
"./breakpoints.css"; | ||
@value | ||
selectorValue: | ||
secondary-color; | ||
@value | ||
small: | ||
(max-width: | ||
599px); | ||
@value | ||
medium: | ||
(min-width: 600px) and (max-width: 959px); | ||
@value | ||
large: | ||
(min-width: 960px); | ||
@value | ||
primary: | ||
#BF4040; | ||
@value | ||
secondary: | ||
#1F4F7F; | ||
@value | ||
common-gradient: | ||
transparent 75%, | ||
var(--ring-line-color) 75%, | ||
currentColor 79%; | ||
|
||
``` | ||
|
||
|
||
============================= | ||
|
||
# Outputs | ||
|
||
## Output 1 | ||
|
||
----- | ||
Indent style: Tab | ||
Indent width: 2 | ||
Line ending: LF | ||
Line width: 80 | ||
Quote style: Double Quotes | ||
----- | ||
|
||
```css | ||
@value colors: | ||
"./colors.css"; | ||
@value primary, secondary from colors; | ||
@value small as bp-small, medium, large as bp-large from "./breakpoints.css"; | ||
@value selectorValue: | ||
secondary-color; | ||
@value small: | ||
(max-width: | ||
599px); | ||
@value medium: | ||
(min-width: 600px) and (max-width: 959px); | ||
@value large: | ||
(min-width: 960px); | ||
@value primary: | ||
#BF4040; | ||
@value secondary: | ||
#1F4F7F; | ||
@value common-gradient: | ||
transparent 75%, | ||
var(--ring-line-color) 75%, | ||
currentColor 79%; | ||
``` | ||
|
||
|
||
|
||
## Unimplemented nodes/tokens | ||
|
||
" colors:\n\"./colors.css\"" => 6..29 | ||
" selectorValue:\nsecondary-color" => 154..185 | ||
" small:\n(max-width:\n599px)" => 193..219 | ||
" medium:\n(min-width: 600px) and (max-width: 959px)" => 227..277 | ||
" large:\n(min-width: 960px)" => 285..311 | ||
" primary:\n#BF4040" => 319..336 | ||
" secondary:\n#1F4F7F" => 344..363 | ||
" common-gradient:\ntransparent 75%,\nvar(--ring-line-color) 75%,\ncurrentColor 79%" => 371..450 |