Skip to content

Commit

Permalink
Add specs for :has(+ &)
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Apr 17, 2023
1 parent 752860e commit f792b6f
Showing 1 changed file with 48 additions and 51 deletions.
99 changes: 48 additions & 51 deletions spec/css/selector/combinator/has.hrx
Original file line number Diff line number Diff line change
@@ -1,89 +1,86 @@
<===> leading/single/child/options.yml
:ignore_for:
- libsass

<===> leading/single/child/input.scss
:is(> a) {b: c}
:has(> a) {b: c}

<===> leading/single/child/output.css

<===> leading/single/child/warning
DEPRECATION WARNING: The selector ":is(> a)" is invalid CSS. It will be omitted from the generated CSS.
This will be an error in Dart Sass 2.0.0.

More info: https://sass-lang.com/d/bogus-combinators

,
1 | :is(> a) {b: c}
| ^^^^^^^^
'
input.scss 1:1 root stylesheet
:has(> a) {
b: c;
}

<===>
================================================================================
<===> leading/single/next_sibling/options.yml
:ignore_for:
- libsass

<===> leading/single/next_sibling/input.scss
:is(+ a) {b: c}
:has(+ a) {b: c}

<===> leading/single/next_sibling/output.css
:has(+ a) {
b: c;
}

<===> leading/single/next_sibling/warning
DEPRECATION WARNING: The selector ":is(+ a)" is invalid CSS. It will be omitted from the generated CSS.
This will be an error in Dart Sass 2.0.0.
<===>
================================================================================
<===> leading/single/sibling/input.scss
:has(~ a) {b: c}

More info: https://sass-lang.com/d/bogus-combinators
<===> leading/single/sibling/output.css
:has(~ a) {
b: c;
}

,
1 | :is(+ a) {b: c}
| ^^^^^^^^
'
input.scss 1:1 root stylesheet
<===>
================================================================================
<===> leading/single/parent/input.scss
// Regression test for sass/sass#3546
a {
:has(~ &) {b: c}
}

<===> leading/single/parent/output.css
:has(~ a) {
b: c;
}

<===>
================================================================================
<===> leading/single/sibling/options.yml
<===> leading/multiple/options.yml
:ignore_for:
- libsass

<===> leading/single/sibling/input.scss
:is(~ a) {b: c}
<===>
================================================================================
<===> leading/multiple/direct/input.scss
:has(+ ~ a) {b: c}

<===> leading/single/sibling/output.css
<===> leading/multiple/direct/output.css

<===> leading/single/sibling/warning
DEPRECATION WARNING: The selector ":is(~ a)" is invalid CSS. It will be omitted from the generated CSS.
<===> leading/multiple/direct/warning
DEPRECATION WARNING: The selector ":has(+ ~ a)" is invalid CSS. It will be omitted from the generated CSS.
This will be an error in Dart Sass 2.0.0.

More info: https://sass-lang.com/d/bogus-combinators

,
1 | :is(~ a) {b: c}
| ^^^^^^^^
1 | :has(+ ~ a) {b: c}
| ^^^^^^^^^^^
'
input.scss 1:1 root stylesheet

<===>
================================================================================
<===> leading/multiple/options.yml
:ignore_for:
- libsass
<===> leading/multiple/parent/input.scss
~ a {
:has(+ &) {b: c}
}

<===> leading/multiple/input.scss
:is(+ ~ a) {b: c}
<===> leading/multiple/parent/output.css

<===> leading/multiple/output.css

<===> leading/multiple/warning
DEPRECATION WARNING: The selector ":is(+ ~ a)" is invalid CSS. It will be omitted from the generated CSS.
<===> leading/multiple/parent/warning
DEPRECATION WARNING: The selector ":has(+ ~ a)" is invalid CSS. It will be omitted from the generated CSS.
This will be an error in Dart Sass 2.0.0.

More info: https://sass-lang.com/d/bogus-combinators

,
1 | :is(+ ~ a) {b: c}
| ^^^^^^^^^^
2 | :has(+ &) {b: c}
| ^^^^^^^^^
'
input.scss 1:1 root stylesheet
input.scss 2:3 root stylesheet

0 comments on commit f792b6f

Please sign in to comment.