From 6b67027a4bfc6b08550d6c00f45c73f3ec41e8f7 Mon Sep 17 00:00:00 2001 From: Ze-Zheng Wu Date: Mon, 10 Jun 2024 21:13:20 +0800 Subject: [PATCH] chore: update snapshot --- .../noUnmatchableAnbSelector/invalid.css.snap | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/crates/biome_css_analyze/tests/specs/nursery/noUnmatchableAnbSelector/invalid.css.snap b/crates/biome_css_analyze/tests/specs/nursery/noUnmatchableAnbSelector/invalid.css.snap index 6e390f281647..3cceb27bb2cf 100644 --- a/crates/biome_css_analyze/tests/specs/nursery/noUnmatchableAnbSelector/invalid.css.snap +++ b/crates/biome_css_analyze/tests/specs/nursery/noUnmatchableAnbSelector/invalid.css.snap @@ -93,6 +93,63 @@ invalid.css:4:13 lint/nursery/noUnmatchableAnbSelector ━━━━━━━━ i For more details, see the official spec for An+B selectors. +``` + +``` +invalid.css:5:13 lint/nursery/noUnmatchableAnbSelector ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! This selector will never match any elements. + + 3 │ a:nth-child(+0n) {} + 4 │ a:nth-child(-0n) {} + > 5 │ a:nth-child(0n+0) {} + │ ^^^^ + 6 │ a:nth-child(0n-0) {} + 7 │ a:nth-child(-0n-0) {} + + i Avoid using An+B selectors that always evaluate to 0. + + i For more details, see the official spec for An+B selectors. + + +``` + +``` +invalid.css:6:13 lint/nursery/noUnmatchableAnbSelector ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! This selector will never match any elements. + + 4 │ a:nth-child(-0n) {} + 5 │ a:nth-child(0n+0) {} + > 6 │ a:nth-child(0n-0) {} + │ ^^^^ + 7 │ a:nth-child(-0n-0) {} + 8 │ a:nth-child(0 of a) {} + + i Avoid using An+B selectors that always evaluate to 0. + + i For more details, see the official spec for An+B selectors. + + +``` + +``` +invalid.css:7:13 lint/nursery/noUnmatchableAnbSelector ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! This selector will never match any elements. + + 5 │ a:nth-child(0n+0) {} + 6 │ a:nth-child(0n-0) {} + > 7 │ a:nth-child(-0n-0) {} + │ ^^^^^ + 8 │ a:nth-child(0 of a) {} + 9 │ a:nth-child(0), a:nth-child(1) {} + + i Avoid using An+B selectors that always evaluate to 0. + + i For more details, see the official spec for An+B selectors. + + ``` ```