Skip to content

Commit

Permalink
feat(biome_css_analyzer): update known css properties (#4577)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasweng authored Nov 20, 2024
1 parent 12a95fc commit 486ec39
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 8 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,17 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b

Contributed by @Conaclos

- [noUnknownProperty](https://biomejs.dev/linter/rules/no-unknown-property/) now accepts more known CSS properties ([#4549](https://github.com/biomejs/biome/issues/4549)).

```diff
- ['anchor-default', 'anchor-scroll', 'inset-area', 'position-animation', 'position-fallback', 'position-fallback-bounds', 'position-try-options']
+ ['anchor-scope', 'interpolate-size', 'line-fit-edge', 'masonry', 'masonry-auto-tracks', 'masonry-direction', 'masonry-fill', 'masonry-flow', 'masonry-slack', 'masonry-template-areas', 'masonry-template-tracks', 'position-anchor', 'position-area', 'position-try-fallbacks', 'position-visibility', 'scroll-start-target', 'text-box', 'view-transition-class', 'view-transition-group']
```

This change replaces deprecated properties, improving CSS validation.

Contributed by @lucasweng

#### Bug fixes

- [noControlCharactersInRegex](https://biomejs.dev/linter/rules/no-control-characters-in-regex) no longer panics when it encounters an unterminated unicode escape sequence ([#4565](https://github.com/biomejs/biome/issues/4565)). Contributed by @Conaclos
Expand Down
28 changes: 20 additions & 8 deletions crates/biome_css_analyze/src/keywords.rs
Original file line number Diff line number Diff line change
Expand Up @@ -975,17 +975,16 @@ pub const OTHER_PSEUDO_CLASSES: [&str; 50] = [
];

// https://github.com/known-css/known-css-properties/blob/master/source/w3c.json
pub const KNOWN_PROPERTIES: [&str; 588] = [
pub const KNOWN_PROPERTIES: [&str; 600] = [
"-webkit-line-clamp",
"accent-color",
"align-content",
"align-items",
"align-self",
"alignment-baseline",
"all",
"anchor-default",
"anchor-name",
"anchor-scroll",
"anchor-scope",
"animation",
"animation-composition",
"animation-delay",
Expand Down Expand Up @@ -1237,13 +1236,13 @@ pub const KNOWN_PROPERTIES: [&str; 588] = [
"inline-sizing",
"input-security",
"inset",
"inset-area",
"inset-block",
"inset-block-end",
"inset-block-start",
"inset-inline",
"inset-inline-end",
"inset-inline-start",
"interpolate-size",
"isolation",
"justify-content",
"justify-items",
Expand All @@ -1253,6 +1252,7 @@ pub const KNOWN_PROPERTIES: [&str; 588] = [
"lighting-color",
"line-break",
"line-clamp",
"line-fit-edge",
"line-grid",
"line-height",
"line-height-step",
Expand Down Expand Up @@ -1301,6 +1301,14 @@ pub const KNOWN_PROPERTIES: [&str; 588] = [
"mask-repeat",
"mask-size",
"mask-type",
"masonry",
"masonry-auto-tracks",
"masonry-direction",
"masonry-fill",
"masonry-flow",
"masonry-slack",
"masonry-template-areas",
"masonry-template-tracks",
"max-block-size",
"max-height",
"max-inline-size",
Expand Down Expand Up @@ -1383,12 +1391,12 @@ pub const KNOWN_PROPERTIES: [&str; 588] = [
"play-during",
"pointer-events",
"position",
"position-animation",
"position-fallback",
"position-fallback-bounds",
"position-anchor",
"position-area",
"position-try",
"position-try-options",
"position-try-fallbacks",
"position-try-order",
"position-visibility",
"print-color-adjust",
"property-name",
"quotes",
Expand Down Expand Up @@ -1433,6 +1441,7 @@ pub const KNOWN_PROPERTIES: [&str; 588] = [
"scroll-snap-align",
"scroll-snap-stop",
"scroll-snap-type",
"scroll-start-target",
"scroll-timeline",
"scroll-timeline-axis",
"scroll-timeline-name",
Expand Down Expand Up @@ -1481,6 +1490,7 @@ pub const KNOWN_PROPERTIES: [&str; 588] = [
"text-align-all",
"text-align-last",
"text-autospace",
"text-box",
"text-box-edge",
"text-box-trim",
"text-combine-upright",
Expand Down Expand Up @@ -1535,6 +1545,8 @@ pub const KNOWN_PROPERTIES: [&str; 588] = [
"view-timeline-axis",
"view-timeline-inset",
"view-timeline-name",
"view-transition-class",
"view-transition-group",
"view-transition-name",
"visibility",
"voice-balance",
Expand Down

0 comments on commit 486ec39

Please sign in to comment.