diff --git a/.changeset/allow-navigation-property.md b/.changeset/allow-navigation-property.md new file mode 100644 index 000000000000..fcc6c51abb9a --- /dev/null +++ b/.changeset/allow-navigation-property.md @@ -0,0 +1,8 @@ +--- +"biome_css_analyze": patch +--- + +Fixed [#7340](https://github.com/biomejs/biome/issues/7340): The linter now allows the `navigation` property for view-transition in CSS. + +Previously, the linter incorrectly flagged `navigation: auto` as an unknown property. This fix adds `navigation` to the list of known CSS properties, following the [CSS View Transitions spec](https://www.w3.org/TR/css-view-transitions-2/#view-transition-navigation-descriptor). + diff --git a/crates/biome_css_analyze/src/keywords.rs b/crates/biome_css_analyze/src/keywords.rs index 0c1c02a6e47c..b5f01b9b0ca8 100644 --- a/crates/biome_css_analyze/src/keywords.rs +++ b/crates/biome_css_analyze/src/keywords.rs @@ -1330,6 +1330,7 @@ pub const KNOWN_PROPERTIES: &[&str] = &[ "nav-left", "nav-right", "nav-up", + "navigation", // https://www.w3.org/TR/css-view-transitions-2/#view-transition-navigation-descriptor "object-fit", "object-position", "offset", diff --git a/crates/biome_css_analyze/tests/specs/correctness/noUnknownProperty/valid.css b/crates/biome_css_analyze/tests/specs/correctness/noUnknownProperty/valid.css index 9c01d32f3b6c..d1852febfeb1 100644 --- a/crates/biome_css_analyze/tests/specs/correctness/noUnknownProperty/valid.css +++ b/crates/biome_css_analyze/tests/specs/correctness/noUnknownProperty/valid.css @@ -67,3 +67,8 @@ a { composes: classA; color: yellow; } + +/* View Transition navigation property (should not be flagged) */ +view-transition { + navigation: auto; +} diff --git a/crates/biome_css_analyze/tests/specs/correctness/noUnknownProperty/valid.css.snap b/crates/biome_css_analyze/tests/specs/correctness/noUnknownProperty/valid.css.snap index b6ec4fef082c..d02b0357477c 100644 --- a/crates/biome_css_analyze/tests/specs/correctness/noUnknownProperty/valid.css.snap +++ b/crates/biome_css_analyze/tests/specs/correctness/noUnknownProperty/valid.css.snap @@ -74,4 +74,9 @@ a { color: yellow; } +/* View Transition navigation property (should not be flagged) */ +view-transition { + navigation: auto; +} + ```