diff --git a/lib-js/spec-directory/virtual-directory.ts b/lib-js/spec-directory/virtual-directory.ts index 094dd37c16..cfbbc1ac78 100644 --- a/lib-js/spec-directory/virtual-directory.ts +++ b/lib-js/spec-directory/virtual-directory.ts @@ -72,7 +72,13 @@ export default class VirtualDirectory extends SpecDirectory { parentOpts?: SpecOptions ): Promise { const stream = fs.createReadStream(hrxPath, {encoding: 'utf-8'}); - const archive = await archiveFromStream(stream); + let archive; + try { + archive = await archiveFromStream(stream); + } catch (error: unknown) { + throw new Error(`Error parsing ${hrxPath}: ${error}`); + } + const {dir, name} = path.parse(hrxPath); return new VirtualDirectory( path.resolve(dir, name), diff --git a/spec/core_functions/selector/append.hrx b/spec/core_functions/selector/append.hrx index 399f0da55f..955f9de37a 100644 --- a/spec/core_functions/selector/append.hrx +++ b/spec/core_functions/selector/append.hrx @@ -119,6 +119,56 @@ a { structure: true; } +<===> +================================================================================ +<===> combinator/initial_leading/input.scss +a {b: selector-append("> c", "d")} + +<===> combinator/initial_leading/output.css +a { + b: > cd; +} + +<===> +================================================================================ +<===> combinator/final_trailing/input.scss +a {b: selector-append("c", "d ~")} + +<===> combinator/final_trailing/output.css +a { + b: cd ~; +} + +<===> +================================================================================ +<===> combinator/multiple/middle/input.scss +a {b: selector-append("c > > d", "e")} + +<===> combinator/multiple/middle/output.css +a { + b: c > > de; +} + +<===> +================================================================================ +<===> combinator/multiple/initial_leading/input.scss +a {b: selector-append("~ ~ c", "d")} + +<===> combinator/multiple/initial_leading/output.css +a { + b: ~ ~ cd; +} + +<===> +================================================================================ +<===> combinator/multiple/final_trailing/input.scss +a {b: selector-append("c", "d + >")} + +<===> combinator/multiple/final_trailing/output.css +a { + b: cd + >; +} + <===> ================================================================================ <===> error/universal/options.yml @@ -139,10 +189,10 @@ Error: Can't append * to .c. <===> ================================================================================ -<===> error/leading_combinator/input.scss +<===> error/combinator/leading/input.scss a {b: selector-append(".c", "> .d")} -<===> error/leading_combinator/error +<===> error/combinator/leading/error Error: Can't append > .d to .c. , 1 | a {b: selector-append(".c", "> .d")} @@ -150,7 +200,7 @@ Error: Can't append > .d to .c. ' input.scss 1:7 root stylesheet -<===> error/leading_combinator/error-libsass +<===> error/combinator/leading/error-libsass Error: Can't append "> .d" to ".c" for `selector-append' on line 1:7 of input.scss, in function `selector-append` from line 1:7 of input.scss @@ -158,6 +208,32 @@ Error: Can't append "> .d" to ".c" for `selector-append' ------^ +<===> +================================================================================ +<===> error/combinator/trailing/input.scss +a {b: selector-append(".c ~", ".d")} + +<===> error/combinator/trailing/error +Error: Parent ".c ~" is incompatible with this selector. + , +1 | a {b: selector-append(".c ~", ".d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> error/combinator/only/input.scss +a {b: selector-append(".c", ">", ".d")} + +<===> error/combinator/only/error +Error: Can't append > to .c. + , +1 | a {b: selector-append(".c", ">", ".d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + <===> ================================================================================ <===> error/namespace/options.yml diff --git a/spec/core_functions/selector/extend/complex.hrx b/spec/core_functions/selector/extend/complex.hrx deleted file mode 100644 index 84e70d1687..0000000000 --- a/spec/core_functions/selector/extend/complex.hrx +++ /dev/null @@ -1,87 +0,0 @@ -<===> parent/without_grandparent/simple/input.scss -a {b: selector-extend(".c .d", ".c", ".e")} - -<===> parent/without_grandparent/simple/output.css -a { - b: .c .d, .e .d; -} - -<===> -================================================================================ -<===> parent/without_grandparent/complex/input.scss -a {b: selector-extend(".c .d", ".c", ".e .f")} - -<===> parent/without_grandparent/complex/output.css -a { - b: .c .d, .e .f .d; -} - -<===> -================================================================================ -<===> parent/without_grandparent/list/input.scss -a {b: selector-extend(".c .d", ".c", ".e, .f")} - -<===> parent/without_grandparent/list/output.css -a { - b: .c .d, .e .d, .f .d; -} - -<===> -================================================================================ -<===> parent/with_grandparent/simple/input.scss -a {b: selector-extend(".c .d .e", ".d", ".f")} - -<===> parent/with_grandparent/simple/output.css -a { - b: .c .d .e, .c .f .e; -} - -<===> -================================================================================ -<===> parent/with_grandparent/complex/input.scss -a {b: selector-extend(".c .d .e", ".d", ".f .g")} - -<===> parent/with_grandparent/complex/output.css -a { - b: .c .d .e, .c .f .g .e, .f .c .g .e; -} - -<===> -================================================================================ -<===> parent/with_grandparent/list/input.scss -a {b: selector-extend(".c .d .e", ".d", ".f, .g")} - -<===> parent/with_grandparent/list/output.css -a { - b: .c .d .e, .c .f .e, .c .g .e; -} - -<===> -================================================================================ -<===> trailing_combinator/child/input.scss -a {b: selector-extend(".c .d", ".c", ".e >")} - -<===> trailing_combinator/child/output.css -a { - b: .c .d, .e > .d; -} - -<===> -================================================================================ -<===> trailing_combinator/sibling/input.scss -a {b: selector-extend(".c .d", ".c", ".e ~")} - -<===> trailing_combinator/sibling/output.css -a { - b: .c .d, .e ~ .d; -} - -<===> -================================================================================ -<===> trailing_combinator/next_sibling/input.scss -a {b: selector-extend(".c .d", ".c", ".e +")} - -<===> trailing_combinator/next_sibling/output.css -a { - b: .c .d, .e + .d; -} diff --git a/spec/core_functions/selector/extend/complex/combinator_only.hrx b/spec/core_functions/selector/extend/complex/combinator_only.hrx new file mode 100644 index 0000000000..2313d6ff43 --- /dev/null +++ b/spec/core_functions/selector/extend/complex/combinator_only.hrx @@ -0,0 +1,41 @@ +<===> selector/input.scss +a {b: selector-extend("+", ".c", ".d")} + +<===> selector/output.css +a { + b: +; +} + +<===> selector/warning +DEPRECATION WARNING: $selector: + is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend("+", ".c", ".d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> extender/input.scss +a {b: selector-extend(".c", ".c", ">")} + +<===> extender/output.css +a { + b: .c, >; +} + +<===> extender/warning +DEPRECATION WARNING: $extender: > is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c", ".c", ">")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet diff --git a/spec/core_functions/selector/extend/complex/with_unification.hrx b/spec/core_functions/selector/extend/complex/with_unification.hrx new file mode 100644 index 0000000000..578a69c317 --- /dev/null +++ b/spec/core_functions/selector/extend/complex/with_unification.hrx @@ -0,0 +1,387 @@ +<===> parent/without_grandparent/simple/input.scss +a {b: selector-extend(".c.x .d", ".c", ".e")} + +<===> parent/without_grandparent/simple/output.css +a { + b: .c.x .d, .x.e .d; +} + +<===> +================================================================================ +<===> parent/without_grandparent/complex/input.scss +a {b: selector-extend(".c.x .d", ".c", ".e .f")} + +<===> parent/without_grandparent/complex/output.css +a { + b: .c.x .d, .e .x.f .d; +} + +<===> +================================================================================ +<===> parent/without_grandparent/list/input.scss +a {b: selector-extend(".c.x .d", ".c", ".e, .f")} + +<===> parent/without_grandparent/list/output.css +a { + b: .c.x .d, .x.e .d, .x.f .d; +} + +<===> +================================================================================ +<===> parent/with_grandparent/simple/input.scss +a {b: selector-extend(".c .d.x .e", ".d", ".f")} + +<===> parent/with_grandparent/simple/output.css +a { + b: .c .d.x .e, .c .x.f .e; +} + +<===> +================================================================================ +<===> parent/with_grandparent/complex/input.scss +a {b: selector-extend(".c .d.x .e", ".d", ".f .g")} + +<===> parent/with_grandparent/complex/output.css +a { + b: .c .d.x .e, .c .f .x.g .e, .f .c .x.g .e; +} + +<===> +================================================================================ +<===> parent/with_grandparent/list/input.scss +a {b: selector-extend(".c .d.x .e", ".d", ".f, .g")} + +<===> parent/with_grandparent/list/output.css +a { + b: .c .d.x .e, .c .x.f .e, .c .x.g .e; +} + +<===> +================================================================================ +<===> leading_combinator/selector/input.scss +a {b: selector-extend("> .c.x", ".c", ".d")} + +<===> leading_combinator/selector/output.css +a { + b: > .c.x, > .x.d; +} + +<===> leading_combinator/selector/warning +DEPRECATION WARNING: $selector: > .c.x is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend("> .c.x", ".c", ".d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> leading_combinator/extender/input.scss +a {b: selector-extend(".c.x", ".c", "+ .d")} + +<===> leading_combinator/extender/output.css +a { + b: .c.x, + .x.d; +} + +<===> leading_combinator/extender/warning +DEPRECATION WARNING: $extender: + .d is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c.x", ".c", "+ .d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> leading_combinator/both/input.scss +a {b: selector-extend("~ .c.x", ".c", "+ .d")} + +<===> leading_combinator/both/output.css +a { + b: ~ .c.x; +} + +<===> leading_combinator/both/warning +DEPRECATION WARNING: $selector: ~ .c.x is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend("~ .c.x", ".c", "+ .d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +DEPRECATION WARNING: $extender: + .d is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend("~ .c.x", ".c", "+ .d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> trailing_combinator/selector/input.scss +a {b: selector-extend(".c.x +", ".c", ".d")} + +<===> trailing_combinator/selector/output.css +a { + b: .c.x +, .x.d +; +} + +<===> trailing_combinator/selector/warning +DEPRECATION WARNING: $selector: .c.x + is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c.x +", ".c", ".d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> trailing_combinator/extender/child/input.scss +a {b: selector-extend(".c.x .d", ".c", ".e >")} + +<===> trailing_combinator/extender/child/output.css +a { + b: .c.x .d, .x.e > .d; +} + +<===> trailing_combinator/extender/child/warning +DEPRECATION WARNING: $extender: .e > is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c.x .d", ".c", ".e >")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> trailing_combinator/extender/sibling/input.scss +a {b: selector-extend(".c.x .d", ".c", ".e ~")} + +<===> trailing_combinator/extender/sibling/output.css +a { + b: .c.x .d, .x.e ~ .d; +} + +<===> trailing_combinator/extender/sibling/warning +DEPRECATION WARNING: $extender: .e ~ is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c.x .d", ".c", ".e ~")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> trailing_combinator/extender/next_sibling/input.scss +a {b: selector-extend(".c.x .d", ".c", ".e +")} + +<===> trailing_combinator/extender/next_sibling/output.css +a { + b: .c.x .d, .x.e + .d; +} + +<===> trailing_combinator/extender/next_sibling/warning +DEPRECATION WARNING: $extender: .e + is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c.x .d", ".c", ".e +")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> trailing_combinator/both/input.scss +a {b: selector-extend(".c.x ~", ".c", ".d >")} + +<===> trailing_combinator/both/output.css +a { + b: .c.x ~; +} + +<===> trailing_combinator/both/warning +DEPRECATION WARNING: $selector: .c.x ~ is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c.x ~", ".c", ".d >")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +DEPRECATION WARNING: $extender: .d > is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c.x ~", ".c", ".d >")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> multiple_combinators/middle/selector/input.scss +a {b: selector-extend(".c.x ~ ~ .d", ".c", ".e")} + +<===> multiple_combinators/middle/selector/output.css +a { + b: .c.x ~ ~ .d; +} + +<===> multiple_combinators/middle/selector/warning +DEPRECATION WARNING: $selector: .c.x ~ ~ .d is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c.x ~ ~ .d", ".c", ".e")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> multiple_combinators/middle/extender/input.scss +a {b: selector-extend(".c.x", ".c", ".d ~ + .e")} + +<===> multiple_combinators/middle/extender/output.css +a { + b: .c.x; +} + +<===> multiple_combinators/middle/extender/warning +DEPRECATION WARNING: $extender: .d ~ + .e is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c.x", ".c", ".d ~ + .e")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> multiple_combinators/leading/selector/input.scss +a {b: selector-extend("> + .c.x", ".c", ".d")} + +<===> multiple_combinators/leading/selector/output.css +a { + b: > + .c.x; +} + +<===> multiple_combinators/leading/selector/warning +DEPRECATION WARNING: $selector: > + .c.x is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend("> + .c.x", ".c", ".d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> multiple_combinators/leading/extender/input.scss +a {b: selector-extend(".c.x", ".c", "+ ~ .d")} + +<===> multiple_combinators/leading/extender/output.css +a { + b: .c.x; +} + +<===> multiple_combinators/leading/extender/warning +DEPRECATION WARNING: $extender: + ~ .d is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c.x", ".c", "+ ~ .d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> multiple_combinators/trailing/selector/input.scss +a {b: selector-extend(".c.x > ~", ".c", ".d")} + +<===> multiple_combinators/trailing/selector/output.css +a { + b: .c.x > ~; +} + +<===> multiple_combinators/trailing/selector/warning +DEPRECATION WARNING: $selector: .c.x > ~ is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c.x > ~", ".c", ".d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> multiple_combinators/trailing/extender/input.scss +a {b: selector-extend(".c.x", ".c", ".d + +")} + +<===> multiple_combinators/trailing/extender/output.css +a { + b: .c.x; +} + +<===> multiple_combinators/trailing/extender/warning +DEPRECATION WARNING: $extender: .d + + is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c.x", ".c", ".d + +")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet diff --git a/spec/core_functions/selector/extend/complex/without_unification.hrx b/spec/core_functions/selector/extend/complex/without_unification.hrx new file mode 100644 index 0000000000..b15fa787ca --- /dev/null +++ b/spec/core_functions/selector/extend/complex/without_unification.hrx @@ -0,0 +1,387 @@ +<===> parent/without_grandparent/simple/input.scss +a {b: selector-extend(".c .d", ".c", ".e")} + +<===> parent/without_grandparent/simple/output.css +a { + b: .c .d, .e .d; +} + +<===> +================================================================================ +<===> parent/without_grandparent/complex/input.scss +a {b: selector-extend(".c .d", ".c", ".e .f")} + +<===> parent/without_grandparent/complex/output.css +a { + b: .c .d, .e .f .d; +} + +<===> +================================================================================ +<===> parent/without_grandparent/list/input.scss +a {b: selector-extend(".c .d", ".c", ".e, .f")} + +<===> parent/without_grandparent/list/output.css +a { + b: .c .d, .e .d, .f .d; +} + +<===> +================================================================================ +<===> parent/with_grandparent/simple/input.scss +a {b: selector-extend(".c .d .e", ".d", ".f")} + +<===> parent/with_grandparent/simple/output.css +a { + b: .c .d .e, .c .f .e; +} + +<===> +================================================================================ +<===> parent/with_grandparent/complex/input.scss +a {b: selector-extend(".c .d .e", ".d", ".f .g")} + +<===> parent/with_grandparent/complex/output.css +a { + b: .c .d .e, .c .f .g .e, .f .c .g .e; +} + +<===> +================================================================================ +<===> parent/with_grandparent/list/input.scss +a {b: selector-extend(".c .d .e", ".d", ".f, .g")} + +<===> parent/with_grandparent/list/output.css +a { + b: .c .d .e, .c .f .e, .c .g .e; +} + +<===> +================================================================================ +<===> leading_combinator/selector/input.scss +a {b: selector-extend("> .c", ".c", ".d")} + +<===> leading_combinator/selector/output.css +a { + b: > .c, > .d; +} + +<===> leading_combinator/selector/warning +DEPRECATION WARNING: $selector: > .c is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend("> .c", ".c", ".d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> leading_combinator/extender/input.scss +a {b: selector-extend(".c", ".c", "+ .d")} + +<===> leading_combinator/extender/output.css +a { + b: .c, + .d; +} + +<===> leading_combinator/extender/warning +DEPRECATION WARNING: $extender: + .d is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c", ".c", "+ .d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> leading_combinator/both/input.scss +a {b: selector-extend("~ .c", ".c", "+ .d")} + +<===> leading_combinator/both/output.css +a { + b: ~ .c; +} + +<===> leading_combinator/both/warning +DEPRECATION WARNING: $selector: ~ .c is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend("~ .c", ".c", "+ .d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +DEPRECATION WARNING: $extender: + .d is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend("~ .c", ".c", "+ .d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> trailing_combinator/selector/input.scss +a {b: selector-extend(".c +", ".c", ".d")} + +<===> trailing_combinator/selector/output.css +a { + b: .c +, .d +; +} + +<===> trailing_combinator/selector/warning +DEPRECATION WARNING: $selector: .c + is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c +", ".c", ".d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> trailing_combinator/extender/child/input.scss +a {b: selector-extend(".c .d", ".c", ".e >")} + +<===> trailing_combinator/extender/child/output.css +a { + b: .c .d, .e > .d; +} + +<===> trailing_combinator/extender/child/warning +DEPRECATION WARNING: $extender: .e > is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c .d", ".c", ".e >")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> trailing_combinator/extender/sibling/input.scss +a {b: selector-extend(".c .d", ".c", ".e ~")} + +<===> trailing_combinator/extender/sibling/output.css +a { + b: .c .d, .e ~ .d; +} + +<===> trailing_combinator/extender/sibling/warning +DEPRECATION WARNING: $extender: .e ~ is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c .d", ".c", ".e ~")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> trailing_combinator/extender/next_sibling/input.scss +a {b: selector-extend(".c .d", ".c", ".e +")} + +<===> trailing_combinator/extender/next_sibling/output.css +a { + b: .c .d, .e + .d; +} + +<===> trailing_combinator/extender/next_sibling/warning +DEPRECATION WARNING: $extender: .e + is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c .d", ".c", ".e +")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> trailing_combinator/both/input.scss +a {b: selector-extend(".c ~", ".c", ".d >")} + +<===> trailing_combinator/both/output.css +a { + b: .c ~; +} + +<===> trailing_combinator/both/warning +DEPRECATION WARNING: $selector: .c ~ is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c ~", ".c", ".d >")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +DEPRECATION WARNING: $extender: .d > is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c ~", ".c", ".d >")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> multiple_combinators/middle/selector/input.scss +a {b: selector-extend(".c ~ ~ .d", ".c", ".e")} + +<===> multiple_combinators/middle/selector/output.css +a { + b: .c ~ ~ .d; +} + +<===> multiple_combinators/middle/selector/warning +DEPRECATION WARNING: $selector: .c ~ ~ .d is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c ~ ~ .d", ".c", ".e")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> multiple_combinators/middle/extender/input.scss +a {b: selector-extend(".c", ".c", ".d ~ + .e")} + +<===> multiple_combinators/middle/extender/output.css +a { + b: .c; +} + +<===> multiple_combinators/middle/extender/warning +DEPRECATION WARNING: $extender: .d ~ + .e is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c", ".c", ".d ~ + .e")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> multiple_combinators/leading/selector/input.scss +a {b: selector-extend("> + .c", ".c", ".d")} + +<===> multiple_combinators/leading/selector/output.css +a { + b: > + .c; +} + +<===> multiple_combinators/leading/selector/warning +DEPRECATION WARNING: $selector: > + .c is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend("> + .c", ".c", ".d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> multiple_combinators/leading/extender/input.scss +a {b: selector-extend(".c", ".c", "+ ~ .d")} + +<===> multiple_combinators/leading/extender/output.css +a { + b: .c; +} + +<===> multiple_combinators/leading/extender/warning +DEPRECATION WARNING: $extender: + ~ .d is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c", ".c", "+ ~ .d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> multiple_combinators/trailing/selector/input.scss +a {b: selector-extend(".c > ~", ".c", ".d")} + +<===> multiple_combinators/trailing/selector/output.css +a { + b: .c > ~; +} + +<===> multiple_combinators/trailing/selector/warning +DEPRECATION WARNING: $selector: .c > ~ is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c > ~", ".c", ".d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> multiple_combinators/trailing/extender/input.scss +a {b: selector-extend(".c", ".c", ".d + +")} + +<===> multiple_combinators/trailing/extender/output.css +a { + b: .c; +} + +<===> multiple_combinators/trailing/extender/warning +DEPRECATION WARNING: $extender: .d + + is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-extend(".c", ".c", ".d + +")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet diff --git a/spec/core_functions/selector/is_superselector/complex/bogus.hrx b/spec/core_functions/selector/is_superselector/complex/bogus.hrx new file mode 100644 index 0000000000..261567d1f4 --- /dev/null +++ b/spec/core_functions/selector/is_superselector/complex/bogus.hrx @@ -0,0 +1,41 @@ +<===> super/input.scss +a {b: is-superselector("> c", "c")} + +<===> super/output.css +a { + b: false; +} + +<===> super/warning +DEPRECATION WARNING: $super: > c is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: is-superselector("> c", "c")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +<===> +================================================================================ +<===> sub/input.scss +a {b: is-superselector("c", "d + ~ c")} + +<===> sub/output.css +a { + b: false; +} + +<===> sub/warning +DEPRECATION WARNING: $sub: d + ~ c is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: is-superselector("c", "d + ~ c")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet diff --git a/spec/core_functions/selector/nest/combinator.hrx b/spec/core_functions/selector/nest/combinator.hrx new file mode 100644 index 0000000000..5fc67247fd --- /dev/null +++ b/spec/core_functions/selector/nest/combinator.hrx @@ -0,0 +1,117 @@ +<===> leading/initial/input.scss +a {b: selector-nest("> c", "d")} + +<===> leading/initial/output.css +a { + b: > c d; +} + +<===> +================================================================================ +<===> leading/final/input.scss +a {b: selector-nest("c", "+ d")} + +<===> leading/final/output.css +a { + b: c + d; +} + +<===> +================================================================================ +<===> trailing/initial/input.scss +a {b: selector-nest("c ~", "d")} + +<===> trailing/initial/output.css +a { + b: c ~ d; +} + +<===> +================================================================================ +<===> trailing/final/input.scss +a {b: selector-nest("c", "d >")} + +<===> trailing/final/output.css +a { + b: c d >; +} + +<===> +================================================================================ +<===> multiple/middle/input.scss +a {b: selector-nest("c > > d", "e")} + +<===> multiple/middle/output.css +a { + b: c > > d e; +} + +<===> +================================================================================ +<===> multiple/leading/initial/input.scss +a {b: selector-nest("~ ~ c", "d")} + +<===> multiple/leading/initial/output.css +a { + b: ~ ~ c d; +} + +<===> +================================================================================ +<===> multiple/leading/final/input.scss +a {b: selector-nest("c", "+ > d")} + +<===> multiple/leading/final/output.css +a { + b: c + > d; +} + +<===> +================================================================================ +<===> multiple/trailing/initial/input.scss +a {b: selector-nest("c > ~", "d")} + +<===> multiple/trailing/initial/output.css +a { + b: c > ~ d; +} + +<===> +================================================================================ +<===> multiple/trailing/final/input.scss +a {b: selector-nest("c", "d + >")} + +<===> multiple/trailing/final/output.css +a { + b: c d + >; +} + +<===> +================================================================================ +<===> only/before/input.scss +a {b: selector-nest("~", "c")} + +<===> only/before/output.css +a { + b: ~ c; +} + +<===> +================================================================================ +<===> only/after/input.scss +a {b: selector-nest("c", "+")} + +<===> only/after/output.css +a { + b: c +; +} + +<===> +================================================================================ +<===> only/between/input.scss +a {b: selector-nest("c", ">", "d")} + +<===> only/between/output.css +a { + b: c > d; +} diff --git a/spec/core_functions/selector/parse/selector.hrx b/spec/core_functions/selector/parse/selector.hrx index ae7276ac23..f996476ce1 100644 --- a/spec/core_functions/selector/parse/selector.hrx +++ b/spec/core_functions/selector/parse/selector.hrx @@ -251,6 +251,81 @@ a { structure: true; } +<===> +================================================================================ +<===> complex/bogus/leading/input.scss +$result: selector-parse("> b"); +a { + result: $result; + structure: $result == (">" b,); +} + +<===> complex/bogus/leading/output.css +a { + result: > b; + structure: true; +} + +<===> +================================================================================ +<===> complex/bogus/trailing/input.scss +$result: selector-parse("b +"); +a { + result: $result; + structure: $result == (b "+",); +} + +<===> complex/bogus/trailing/output.css +a { + result: b +; + structure: true; +} + +<===> +================================================================================ +<===> complex/bogus/multiple/middle/input.scss +$result: selector-parse("b + ~ c"); +a { + result: $result; + structure: $result == (b "+" "~" c,); +} + +<===> complex/bogus/multiple/middle/output.css +a { + result: b + ~ c; + structure: true; +} + +<===> +================================================================================ +<===> complex/bogus/multiple/trailing/input.scss +$result: selector-parse("b ~~"); +a { + result: $result; + structure: $result == (b "~" "~",); +} + +<===> complex/bogus/multiple/trailing/output.css +a { + result: b ~ ~; + structure: true; +} + +<===> +================================================================================ +<===> complex/bogus/only/input.scss +$result: selector-parse(">"); +a { + result: $result; + structure: $result == (append((), ">"),); +} + +<===> complex/bogus/only/output.css +a { + result: >; + structure: true; +} + <===> ================================================================================ <===> list/input.scss diff --git a/spec/core_functions/selector/unify/complex/combinators.hrx b/spec/core_functions/selector/unify/complex/combinators.hrx index 1ac74b4797..812502e212 100644 --- a/spec/core_functions/selector/unify/complex/combinators.hrx +++ b/spec/core_functions/selector/unify/complex/combinators.hrx @@ -343,6 +343,18 @@ a { b: > .c.d; } +<===> initial/only_one/selector1/warning +DEPRECATION WARNING: $selector1: > .c is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-unify("> .c", ".d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + <===> ================================================================================ <===> initial/only_one/selector2/input.scss @@ -353,6 +365,18 @@ a { b: ~ .c.d; } +<===> initial/only_one/selector2/warning +DEPRECATION WARNING: $selector2: ~ .d is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-unify(".c", "~ .d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + <===> ================================================================================ <===> initial/same/input.scss @@ -363,15 +387,58 @@ a { b: + .c.d; } +<===> initial/same/warning +DEPRECATION WARNING: $selector1: + .c is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-unify("+ .c", "+ .d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +DEPRECATION WARNING: $selector2: + .d is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-unify("+ .c", "+ .d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + <===> ================================================================================ <===> initial/supersequence/contiguous/input.scss a {b: selector-unify("+ ~ > .c", "> + ~ > > .d")} <===> initial/supersequence/contiguous/output.css -a { - b: > + ~ > > .c.d; -} + +<===> initial/supersequence/contiguous/warning +DEPRECATION WARNING: $selector1: + ~ > .c is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-unify("+ ~ > .c", "> + ~ > > .d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +DEPRECATION WARNING: $selector2: > + ~ > > .d is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-unify("+ ~ > .c", "> + ~ > > .d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet <===> ================================================================================ @@ -379,9 +446,29 @@ a { a {b: selector-unify("+ ~ > .c", "+ > ~ ~ > .d")} <===> initial/supersequence/non_contiguous/output.css -a { - b: + > ~ ~ > .c.d; -} + +<===> initial/supersequence/non_contiguous/warning +DEPRECATION WARNING: $selector1: + ~ > .c is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-unify("+ ~ > .c", "+ > ~ ~ > .d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +DEPRECATION WARNING: $selector2: + > ~ ~ > .d is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-unify("+ ~ > .c", "+ > ~ ~ > .d")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet <===> ================================================================================ @@ -393,6 +480,29 @@ a { b: null; } +<===> initial/different/warning +DEPRECATION WARNING: $selector1: + ~ > .c is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: inspect(selector-unify("+ ~ > .c", "+ > ~ ~ .d"))} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:15 root stylesheet + +DEPRECATION WARNING: $selector2: + > ~ ~ .d is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: inspect(selector-unify("+ ~ > .c", "+ > ~ ~ .d"))} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:15 root stylesheet + <===> ================================================================================ <===> multiple/isolated/input.scss @@ -416,9 +526,29 @@ random. Any of these specs should pass with any combination of combinators. a {b: selector-unify(".c + ~ > .d", ".e + ~ > .f")} <===> multiple/in_a_row/same/output.css -a { - b: .c .e + ~ > .d.f, .e .c + ~ > .d.f; -} + +<===> multiple/in_a_row/same/warning +DEPRECATION WARNING: $selector1: .c + ~ > .d is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-unify(".c + ~ > .d", ".e + ~ > .f")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +DEPRECATION WARNING: $selector2: .e + ~ > .f is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-unify(".c + ~ > .d", ".e + ~ > .f")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet <===> ================================================================================ @@ -426,9 +556,29 @@ a { a {b: selector-unify(".c + ~ > .d", ".e > + ~ > > .f")} <===> multiple/in_a_row/supersequence/contiguous/output.css -a { - b: .c .e > + ~ > > .d.f, .e .c > + ~ > > .d.f; -} + +<===> multiple/in_a_row/supersequence/contiguous/warning +DEPRECATION WARNING: $selector1: .c + ~ > .d is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-unify(".c + ~ > .d", ".e > + ~ > > .f")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +DEPRECATION WARNING: $selector2: .e > + ~ > > .f is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-unify(".c + ~ > .d", ".e > + ~ > > .f")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet <===> ================================================================================ @@ -436,9 +586,29 @@ a { a {b: selector-unify(".c + ~ > .d", ".e + > ~ ~ > .f")} <===> multiple/in_a_row/supersequence/non_contiguous/output.css -a { - b: .c .e + > ~ ~ > .d.f, .e .c + > ~ ~ > .d.f; -} + +<===> multiple/in_a_row/supersequence/non_contiguous/warning +DEPRECATION WARNING: $selector1: .c + ~ > .d is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-unify(".c + ~ > .d", ".e + > ~ ~ > .f")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet + +DEPRECATION WARNING: $selector2: .e + > ~ ~ > .f is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: selector-unify(".c + ~ > .d", ".e + > ~ ~ > .f")} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:7 root stylesheet <===> ================================================================================ @@ -449,3 +619,26 @@ a {b: inspect(selector-unify(".c + ~ > .d", ".e + > ~ ~ .f"))} a { b: null; } + +<===> multiple/in_a_row/different/warning +DEPRECATION WARNING: $selector1: .c + ~ > .d is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: inspect(selector-unify(".c + ~ > .d", ".e + > ~ ~ .f"))} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:15 root stylesheet + +DEPRECATION WARNING: $selector2: .e + > ~ ~ .f is not valid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a {b: inspect(selector-unify(".c + ~ > .d", ".e + > ~ ~ .f"))} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ' + input.scss 1:15 root stylesheet diff --git a/spec/css/selector/combinator.hrx b/spec/css/selector/combinator.hrx new file mode 100644 index 0000000000..8f4f36f8c9 --- /dev/null +++ b/spec/css/selector/combinator.hrx @@ -0,0 +1,569 @@ +<===> middle/single/child/input.scss +a > b {c: d} + +<===> middle/single/child/output.css +a > b { + c: d; +} + +<===> +================================================================================ +<===> middle/single/next_sibling/input.scss +a + b {c: d} + +<===> middle/single/next_sibling/output.css +a + b { + c: d; +} + +<===> +================================================================================ +<===> middle/single/sibling/input.scss +a ~ b {c: d} + +<===> middle/single/sibling/output.css +a ~ b { + c: d; +} + +<===> +================================================================================ +<===> middle/multiple/whitespace/input.scss +a > + b {c: d} + +<===> middle/multiple/whitespace/output.css + +<===> middle/multiple/whitespace/warning +DEPRECATION WARNING: The selector "a > + b" 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 | a > + b {c: d} + | ^^^^^^^^ + ' + input.scss 1:1 root stylesheet + +<===> +================================================================================ +<===> middle/multiple/no_whitespace/input.scss +a~>b {c: d} + +<===> middle/multiple/no_whitespace/output.css + +<===> middle/multiple/no_whitespace/warning +DEPRECATION WARNING: The selector "a ~ > b" 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 | a~>b {c: d} + | ^^^^^ + ' + input.scss 1:1 root stylesheet + +<===> +================================================================================ +<===> leading/single/child/input.scss +> a {b: c} + +<===> leading/single/child/output.css +> a { + b: c; +} + +<===> leading/single/child/warning +DEPRECATION WARNING: The selector "> a" is invalid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | > a {b: c} + | ^^^^ + ' + input.scss 1:1 root stylesheet + +<===> +================================================================================ +<===> leading/single/next_sibling/input.scss ++ a {b: c} + +<===> leading/single/next_sibling/output.css ++ a { + b: c; +} + +<===> leading/single/next_sibling/warning +DEPRECATION WARNING: The selector "+ a" is invalid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | + a {b: c} + | ^^^^ + ' + input.scss 1:1 root stylesheet + +<===> +================================================================================ +<===> leading/single/sibling/input.scss +~ a {b: c} + +<===> leading/single/sibling/output.css +~ a { + b: c; +} + +<===> leading/single/sibling/warning +DEPRECATION WARNING: The selector "~ a" is invalid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | ~ a {b: c} + | ^^^^ + ' + input.scss 1:1 root stylesheet + +<===> +================================================================================ +<===> leading/multiple/whitespace/input.scss ++ ~ a {b: c} + +<===> leading/multiple/whitespace/output.css + +<===> leading/multiple/whitespace/warning +DEPRECATION WARNING: The selector "+ ~ 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 | + ~ a {b: c} + | ^^^^^^ + ' + input.scss 1:1 root stylesheet + +<===> +================================================================================ +<===> leading/multiple/no_whitespace/input.scss +> > a {b: c} + +<===> leading/multiple/no_whitespace/output.css + +<===> leading/multiple/no_whitespace/warning +DEPRECATION WARNING: The selector "> > 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 | > > a {b: c} + | ^^^^^^ + ' + input.scss 1:1 root stylesheet + +<===> +================================================================================ +<===> trailing/single/child/input.scss +a > {b: c} + +<===> trailing/single/child/output.css + +<===> trailing/single/child/warning +DEPRECATION WARNING: The selector "a >" is only valid for nesting and shouldn't +have children other than style rules. 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 | a > {b: c} + | ^^^^ invalid selector + | ==== this is not a style rule + ' + input.scss 1:1 root stylesheet + +<===> +================================================================================ +<===> trailing/single/next_sibling/input.scss +a + {b: c} + +<===> trailing/single/next_sibling/output.css + +<===> trailing/single/next_sibling/warning +DEPRECATION WARNING: The selector "a +" is only valid for nesting and shouldn't +have children other than style rules. 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 | a + {b: c} + | ^^^^ invalid selector + | ==== this is not a style rule + ' + input.scss 1:1 root stylesheet + +<===> +================================================================================ +<===> trailing/single/sibling/input.scss +a ~ {b: c} + +<===> trailing/single/sibling/output.css + +<===> trailing/single/sibling/warning +DEPRECATION WARNING: The selector "a ~" is only valid for nesting and shouldn't +have children other than style rules. 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 | a ~ {b: c} + | ^^^^ invalid selector + | ==== this is not a style rule + ' + input.scss 1:1 root stylesheet + +<===> +================================================================================ +<===> trailing/multiple/whitespace/input.scss +a + ~ {b: c} + +<===> trailing/multiple/whitespace/output.css + +<===> trailing/multiple/whitespace/warning +DEPRECATION WARNING: The selector "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 | a + ~ {b: c} + | ^^^^^^ + ' + input.scss 1:1 root stylesheet + +<===> +================================================================================ +<===> trailing/multiple/no_whitespace/input.scss +a > > {b: c} + +<===> trailing/multiple/no_whitespace/output.css + +<===> trailing/multiple/no_whitespace/warning +DEPRECATION WARNING: The selector "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 | a > > {b: c} + | ^^^^^^ + ' + input.scss 1:1 root stylesheet + +<===> +================================================================================ +<===> selector_pseudo/middle/single/child/input.scss +:is(a > b) {c: d} + +<===> selector_pseudo/middle/single/child/output.css +:is(a > b) { + c: d; +} + +<===> +================================================================================ +<===> selector_pseudo/middle/single/next_sibling/input.scss +:is(a + b) {c: d} + +<===> selector_pseudo/middle/single/next_sibling/output.css +:is(a + b) { + c: d; +} + +<===> +================================================================================ +<===> selector_pseudo/middle/single/sibling/input.scss +:is(a ~ b) {c: d} + +<===> selector_pseudo/middle/single/sibling/output.css +:is(a ~ b) { + c: d; +} + +<===> +================================================================================ +<===> selector_pseudo/middle/multiple/input.scss +:is(a > + b) {c: d} + +<===> selector_pseudo/middle/multiple/output.css + +<===> selector_pseudo/middle/multiple/warning +DEPRECATION WARNING: The selector ":is(a > + b)" 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: d} + | ^^^^^^^^^^^^^ + ' + input.scss 1:1 root stylesheet + +<===> +================================================================================ +<===> selector_pseudo/leading/single/child/input.scss +:is(> a) {b: c} + +<===> selector_pseudo/leading/single/child/output.css + +<===> selector_pseudo/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 + +<===> +================================================================================ +<===> selector_pseudo/leading/single/next_sibling/input.scss +:is(+ a) {b: c} + +<===> selector_pseudo/leading/single/next_sibling/output.css + +<===> selector_pseudo/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. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | :is(+ a) {b: c} + | ^^^^^^^^^ + ' + input.scss 1:1 root stylesheet + +<===> +================================================================================ +<===> selector_pseudo/leading/single/sibling/input.scss +:is(~ a) {b: c} + +<===> selector_pseudo/leading/single/sibling/output.css + +<===> selector_pseudo/leading/single/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. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | :is(~ a) {b: c} + | ^^^^^^^^^ + ' + input.scss 1:1 root stylesheet + +<===> +================================================================================ +<===> selector_pseudo/leading/multiple/input.scss +:is(+ ~ a) {b: c} + +<===> selector_pseudo/leading/multiple/output.css + +<===> selector_pseudo/leading/multiple/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 + +<===> +================================================================================ +<===> selector_pseudo/trailing/single/child/input.scss +:is(a >) {b: c} + +<===> selector_pseudo/trailing/single/child/output.css + +<===> selector_pseudo/trailing/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 + +<===> +================================================================================ +<===> selector_pseudo/trailing/single/next_sibling/input.scss +:is(a +) {b: c} + +<===> selector_pseudo/trailing/single/next_sibling/output.css + +<===> selector_pseudo/trailing/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. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | :is(a +) {b: c} + | ^^^^^^^^^ + ' + input.scss 1:1 root stylesheet + +<===> +================================================================================ +<===> selector_pseudo/trailing/single/sibling/input.scss +:is(a ~) {b: c} + +<===> selector_pseudo/trailing/single/sibling/output.css + +<===> selector_pseudo/trailing/single/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. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | :is(a ~) {b: c} + | ^^^^^^^^^ + ' + input.scss 1:1 root stylesheet + +<===> +================================================================================ +<===> selector_pseudo/trailing/multiple/input.scss +:is(a +) {b: c} + +<===> selector_pseudo/trailing/multiple/output.css + +<===> selector_pseudo/trailing/multiple/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/leading/single/child/input.scss +:is(> a) {b: c} + +<===> has/leading/single/child/output.css + +<===> has/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/leading/single/next_sibling/input.scss +:is(+ a) {b: c} + +<===> has/leading/single/next_sibling/output.css + +<===> has/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. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | :is(+ a) {b: c} + | ^^^^^^^^^ + ' + input.scss 1:1 root stylesheet + +<===> +================================================================================ +<===> has/leading/single/sibling/input.scss +:is(~ a) {b: c} + +<===> has/leading/single/sibling/output.css + +<===> has/leading/single/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. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | :is(~ a) {b: c} + | ^^^^^^^^^ + ' + input.scss 1:1 root stylesheet + +<===> +================================================================================ +<===> has/leading/multiple/input.scss +:is(+ ~ a) {b: c} + +<===> has/leading/multiple/output.css + +<===> has/leading/multiple/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 + +<===> +================================================================================ +<===> only_one_bogus/input.scss +a, + b {c: d} + +<===> only_one_bogus/output.css +a, + b { + c: d; +} + +<===> only_one_bogus/warning +DEPRECATION WARNING: The selector "+ b" is invalid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | a, + b {c: d} + | ^^^^^^^ + ' + input.scss 1:1 root stylesheet diff --git a/spec/directives/extend/bogus.hrx b/spec/directives/extend/bogus.hrx new file mode 100644 index 0000000000..4ca93e90a8 --- /dev/null +++ b/spec/directives/extend/bogus.hrx @@ -0,0 +1,141 @@ +<===> leading/input.scss +a {b: c} +> d {@extend a} + +<===> leading/output.css +a, > d { + b: c; +} + +<===> leading/warning +DEPRECATION WARNING: The selector "> d" is invalid CSS and shouldn't be an extender. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +2 | > d {@extend a} + | ^^^^ invalid selector + | ========= @extend rule + ' + input.scss 2:1 root stylesheet + +<===> +================================================================================ +<===> trailing/input.scss +a {b: c} +d + {@extend a} + +<===> trailing/output.css +a { + b: c; +} + +<===> trailing/warning +DEPRECATION WARNING: The selector "d +" is invalid CSS and shouldn't be an extender. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +2 | d + {@extend a} + | ^^^^ invalid selector + | ========= @extend rule + ' + input.scss 2:1 root stylesheet + +<===> +================================================================================ +<===> multi/leading/input.scss +a {b: c} ++ ~ d {@extend a} + +<===> multi/leading/output.css +a { + b: c; +} + +<===> multi/leading/warning +DEPRECATION WARNING: The selector "+ ~ d" is invalid CSS and can't be an extender. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +2 | + ~ d {@extend a} + | ^^^^^^ invalid selector + | ========= @extend rule + ' + input.scss 2:1 root stylesheet + +<===> +================================================================================ +<===> multi/trailing/input.scss +a {b: c} +d > + {@extend a} + +<===> multi/trailing/output.css +a { + b: c; +} + +<===> multi/trailing/warning +DEPRECATION WARNING: The selector "d > +" is invalid CSS and can't be an extender. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +2 | d > + {@extend a} + | ^^^^^^ invalid selector + | ========= @extend rule + ' + input.scss 2:1 root stylesheet + +<===> +================================================================================ +<===> multi/middle/input.scss +a {b: c} +d ~ > c {@extend a} + +<===> multi/middle/output.css +a { + b: c; +} + +<===> multi/middle/warning +DEPRECATION WARNING: The selector "d ~ > c" is invalid CSS and can't be an extender. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +2 | d ~ > c {@extend a} + | ^^^^^^^^ invalid selector + | ========= @extend rule + ' + input.scss 2:1 root stylesheet + +<===> +================================================================================ +<===> only/input.scss +a {b: c} ++ {@extend a} + +<===> only/output.css +a { + b: c; +} + +<===> only/warning +DEPRECATION WARNING: The selector "+" is invalid CSS and shouldn't be an extender. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +2 | + {@extend a} + | ^^ invalid selector + | ========= @extend rule + ' + input.scss 2:1 root stylesheet diff --git a/spec/directives/extend/pseudo.hrx b/spec/directives/extend/pseudo.hrx index dd5aba0718..c4527e8c98 100644 --- a/spec/directives/extend/pseudo.hrx +++ b/spec/directives/extend/pseudo.hrx @@ -13,6 +13,6 @@ downstream {@extend midstream} upstream {a: b} <===> into_pseudo/extends_after/output.css -upstream, :is(midstream, downstream) { +upstream, :is(midstream), :is(midstream, downstream) { a: b; } diff --git a/spec/libsass-closed-issues/issue_1601.hrx b/spec/libsass-closed-issues/issue_1601.hrx index 77cb2efe4e..e6304c90ab 100644 --- a/spec/libsass-closed-issues/issue_1601.hrx +++ b/spec/libsass-closed-issues/issue_1601.hrx @@ -7,7 +7,7 @@ <===> error Error: Parent ".code.ruby >" is incompatible with this selector. , -2 | &.ruby { +2 | &.ruby { | ^^^^^^^ ' input.scss 2:5 root stylesheet diff --git a/spec/libsass-closed-issues/issue_439.hrx b/spec/libsass-closed-issues/issue_439.hrx index 1003240ffd..4b5becd6e4 100644 --- a/spec/libsass-closed-issues/issue_439.hrx +++ b/spec/libsass-closed-issues/issue_439.hrx @@ -13,6 +13,17 @@ ul > { } <===> output.css -ul > + li + li:first-child + li + li { - background: #ccc; -} + +<===> warning +DEPRECATION WARNING: The selector "ul > + li + li:first-child + li + li" is invalid CSS and can't be an extender. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +6 | #{$selector} { @extend %#{$placeholder}; } + | ^^^^^^^^^^^^^ invalid selector + | ======================== @extend rule + ' + input.scss 6:5 odd() + input.scss 11:3 root stylesheet diff --git a/spec/non_conformant/extend-tests/129_test_nested_extender_with_hacky_selector.hrx b/spec/non_conformant/extend-tests/129_test_nested_extender_with_hacky_selector.hrx index 3f19cda346..12d4b70815 100644 --- a/spec/non_conformant/extend-tests/129_test_nested_extender_with_hacky_selector.hrx +++ b/spec/non_conformant/extend-tests/129_test_nested_extender_with_hacky_selector.hrx @@ -3,6 +3,19 @@ foo + > > + bar {@extend .foo} <===> output.css -.baz .foo, .baz foo + > > + bar, foo .baz + > > + bar { +.baz .foo { a: b; } + +<===> warning +DEPRECATION WARNING: The selector "foo + > > + bar" is invalid CSS and can't be an extender. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +2 | foo + > > + bar {@extend .foo} + | ^^^^^^^^^^^^^^^^ invalid selector + | ============ @extend rule + ' + input.scss 2:1 root stylesheet diff --git a/spec/non_conformant/extend-tests/130_test_nested_extender_with_hacky_selector.hrx b/spec/non_conformant/extend-tests/130_test_nested_extender_with_hacky_selector.hrx index 660dacced4..55bdce58c9 100644 --- a/spec/non_conformant/extend-tests/130_test_nested_extender_with_hacky_selector.hrx +++ b/spec/non_conformant/extend-tests/130_test_nested_extender_with_hacky_selector.hrx @@ -3,6 +3,19 @@ > > bar {@extend .foo} <===> output.css -.baz .foo, > > .baz bar { +.baz .foo { a: b; } + +<===> warning +DEPRECATION WARNING: The selector "> > bar" is invalid CSS and can't be an extender. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +2 | > > bar {@extend .foo} + | ^^^^^^^^ invalid selector + | ============ @extend rule + ' + input.scss 2:1 root stylesheet diff --git a/spec/non_conformant/extend-tests/133_test_combinator_unification_for_hacky_combinators.hrx b/spec/non_conformant/extend-tests/133_test_combinator_unification_for_hacky_combinators.hrx index b40cc2eb84..b41dc16f1c 100644 --- a/spec/non_conformant/extend-tests/133_test_combinator_unification_for_hacky_combinators.hrx +++ b/spec/non_conformant/extend-tests/133_test_combinator_unification_for_hacky_combinators.hrx @@ -3,6 +3,15 @@ .b y {@extend x} <===> output.css -.a > + x, .a .b > + y, .b .a > + y { - a: b; -} + +<===> warning +DEPRECATION WARNING: The selector ".a > + x" 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 | .a > + x {a: b} + | ^^^^^^^^^ + ' + input.scss 1:1 root stylesheet diff --git a/spec/non_conformant/extend-tests/134_test_combinator_unification_for_hacky_combinators.hrx b/spec/non_conformant/extend-tests/134_test_combinator_unification_for_hacky_combinators.hrx index f12ccc5343..d02a534a6a 100644 --- a/spec/non_conformant/extend-tests/134_test_combinator_unification_for_hacky_combinators.hrx +++ b/spec/non_conformant/extend-tests/134_test_combinator_unification_for_hacky_combinators.hrx @@ -3,6 +3,19 @@ .b > + y {@extend x} <===> output.css -.a x, .a .b > + y, .b .a > + y { +.a x { a: b; } + +<===> warning +DEPRECATION WARNING: The selector ".b > + y" is invalid CSS and can't be an extender. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +2 | .b > + y {@extend x} + | ^^^^^^^^^ invalid selector + | ========= @extend rule + ' + input.scss 2:1 root stylesheet diff --git a/spec/non_conformant/extend-tests/135_test_combinator_unification_for_hacky_combinators.hrx b/spec/non_conformant/extend-tests/135_test_combinator_unification_for_hacky_combinators.hrx index d74a79087f..6f0bdf6ee5 100644 --- a/spec/non_conformant/extend-tests/135_test_combinator_unification_for_hacky_combinators.hrx +++ b/spec/non_conformant/extend-tests/135_test_combinator_unification_for_hacky_combinators.hrx @@ -3,6 +3,27 @@ .b > + y {@extend x} <===> output.css -.a > + x, .a .b > + y, .b .a > + y { - a: b; -} + +<===> warning +DEPRECATION WARNING: The selector ".a > + x" 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 | .a > + x {a: b} + | ^^^^^^^^^ + ' + input.scss 1:1 root stylesheet + +DEPRECATION WARNING: The selector ".b > + y" is invalid CSS and can't be an extender. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +2 | .b > + y {@extend x} + | ^^^^^^^^^ invalid selector + | ========= @extend rule + ' + input.scss 2:1 root stylesheet diff --git a/spec/non_conformant/extend-tests/136_test_combinator_unification_for_hacky_combinators.hrx b/spec/non_conformant/extend-tests/136_test_combinator_unification_for_hacky_combinators.hrx index ca2254a018..2e4a046581 100644 --- a/spec/non_conformant/extend-tests/136_test_combinator_unification_for_hacky_combinators.hrx +++ b/spec/non_conformant/extend-tests/136_test_combinator_unification_for_hacky_combinators.hrx @@ -3,6 +3,27 @@ .b > + y {@extend x} <===> output.css -.a ~ > + x, .a .b ~ > + y, .b .a ~ > + y { - a: b; -} + +<===> warning +DEPRECATION WARNING: The selector ".a ~ > + x" 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 | .a ~ > + x {a: b} + | ^^^^^^^^^^^ + ' + input.scss 1:1 root stylesheet + +DEPRECATION WARNING: The selector ".b > + y" is invalid CSS and can't be an extender. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +2 | .b > + y {@extend x} + | ^^^^^^^^^ invalid selector + | ========= @extend rule + ' + input.scss 2:1 root stylesheet diff --git a/spec/non_conformant/extend-tests/137_test_combinator_unification_for_hacky_combinators.hrx b/spec/non_conformant/extend-tests/137_test_combinator_unification_for_hacky_combinators.hrx index 88f3b26c7a..d558c7bfcb 100644 --- a/spec/non_conformant/extend-tests/137_test_combinator_unification_for_hacky_combinators.hrx +++ b/spec/non_conformant/extend-tests/137_test_combinator_unification_for_hacky_combinators.hrx @@ -3,6 +3,27 @@ .b > + y {@extend x} <===> output.css -.a + > x { - a: b; -} + +<===> warning +DEPRECATION WARNING: The selector ".a + > x" 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 | .a + > x {a: b} + | ^^^^^^^^^ + ' + input.scss 1:1 root stylesheet + +DEPRECATION WARNING: The selector ".b > + y" is invalid CSS and can't be an extender. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +2 | .b > + y {@extend x} + | ^^^^^^^^^ invalid selector + | ========= @extend rule + ' + input.scss 2:1 root stylesheet diff --git a/spec/non_conformant/extend-tests/138_test_combinator_unification_for_hacky_combinators.hrx b/spec/non_conformant/extend-tests/138_test_combinator_unification_for_hacky_combinators.hrx index 88f3b26c7a..d558c7bfcb 100644 --- a/spec/non_conformant/extend-tests/138_test_combinator_unification_for_hacky_combinators.hrx +++ b/spec/non_conformant/extend-tests/138_test_combinator_unification_for_hacky_combinators.hrx @@ -3,6 +3,27 @@ .b > + y {@extend x} <===> output.css -.a + > x { - a: b; -} + +<===> warning +DEPRECATION WARNING: The selector ".a + > x" 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 | .a + > x {a: b} + | ^^^^^^^^^ + ' + input.scss 1:1 root stylesheet + +DEPRECATION WARNING: The selector ".b > + y" is invalid CSS and can't be an extender. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +2 | .b > + y {@extend x} + | ^^^^^^^^^ invalid selector + | ========= @extend rule + ' + input.scss 2:1 root stylesheet diff --git a/spec/non_conformant/extend-tests/139_test_combinator_unification_for_hacky_combinators.hrx b/spec/non_conformant/extend-tests/139_test_combinator_unification_for_hacky_combinators.hrx index 517add1e13..06ff2ca030 100644 --- a/spec/non_conformant/extend-tests/139_test_combinator_unification_for_hacky_combinators.hrx +++ b/spec/non_conformant/extend-tests/139_test_combinator_unification_for_hacky_combinators.hrx @@ -3,6 +3,27 @@ .c > + .d > y {@extend x} <===> output.css -.a ~ > + .b > x, .a .c ~ > + .d.b > y, .c .a ~ > + .d.b > y { - a: b; -} + +<===> warning +DEPRECATION WARNING: The selector ".a ~ > + .b > x" 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 | .a ~ > + .b > x {a: b} + | ^^^^^^^^^^^^^^^^ + ' + input.scss 1:1 root stylesheet + +DEPRECATION WARNING: The selector ".c > + .d > y" is invalid CSS and can't be an extender. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +2 | .c > + .d > y {@extend x} + | ^^^^^^^^^^^^^^ invalid selector + | ========= @extend rule + ' + input.scss 2:1 root stylesheet diff --git a/spec/non_conformant/extend-tests/224_test_nested_selector_with_child_selector_hack_extendee.hrx b/spec/non_conformant/extend-tests/224_test_nested_selector_with_child_selector_hack_extendee.hrx index 804ed30b66..6d08feb50f 100644 --- a/spec/non_conformant/extend-tests/224_test_nested_selector_with_child_selector_hack_extendee.hrx +++ b/spec/non_conformant/extend-tests/224_test_nested_selector_with_child_selector_hack_extendee.hrx @@ -6,3 +6,15 @@ foo bar {@extend .foo} > .foo, > foo bar { a: b; } + +<===> warning +DEPRECATION WARNING: The selector "> .foo" is invalid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | > .foo {a: b} + | ^^^^^^^ + ' + input.scss 1:1 root stylesheet diff --git a/spec/non_conformant/extend-tests/225_test_nested_selector_with_child_selector_hack_extender.hrx b/spec/non_conformant/extend-tests/225_test_nested_selector_with_child_selector_hack_extender.hrx index 291bf28789..92ebb776b9 100644 --- a/spec/non_conformant/extend-tests/225_test_nested_selector_with_child_selector_hack_extender.hrx +++ b/spec/non_conformant/extend-tests/225_test_nested_selector_with_child_selector_hack_extender.hrx @@ -6,3 +6,16 @@ .foo .bar, > .foo foo bar, > foo .foo bar { a: b; } + +<===> warning +DEPRECATION WARNING: The selector "> foo bar" is invalid CSS and shouldn't be an extender. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +2 | > foo bar {@extend .bar} + | ^^^^^^^^^^ invalid selector + | ============ @extend rule + ' + input.scss 2:1 root stylesheet diff --git a/spec/non_conformant/extend-tests/226_test_nested_selector_with_child_selector_hack_extender_and_extendee.hrx b/spec/non_conformant/extend-tests/226_test_nested_selector_with_child_selector_hack_extender_and_extendee.hrx index b6ea890f88..8e00631ed9 100644 --- a/spec/non_conformant/extend-tests/226_test_nested_selector_with_child_selector_hack_extender_and_extendee.hrx +++ b/spec/non_conformant/extend-tests/226_test_nested_selector_with_child_selector_hack_extender_and_extendee.hrx @@ -6,3 +6,27 @@ > .foo, > foo bar { a: b; } + +<===> warning +DEPRECATION WARNING: The selector "> .foo" is invalid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | > .foo {a: b} + | ^^^^^^^ + ' + input.scss 1:1 root stylesheet + +DEPRECATION WARNING: The selector "> foo bar" is invalid CSS and shouldn't be an extender. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +2 | > foo bar {@extend .foo} + | ^^^^^^^^^^ invalid selector + | ============ @extend rule + ' + input.scss 2:1 root stylesheet diff --git a/spec/non_conformant/extend-tests/227_test_nested_with_child_hack_extender_and_sibling_extendee.hrx b/spec/non_conformant/extend-tests/227_test_nested_with_child_hack_extender_and_sibling_extendee.hrx index 245cb4019d..ee9a08fdd1 100644 --- a/spec/non_conformant/extend-tests/227_test_nested_with_child_hack_extender_and_sibling_extendee.hrx +++ b/spec/non_conformant/extend-tests/227_test_nested_with_child_hack_extender_and_sibling_extendee.hrx @@ -6,3 +6,27 @@ ~ .foo { a: b; } + +<===> warning +DEPRECATION WARNING: The selector "~ .foo" is invalid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | ~ .foo {a: b} + | ^^^^^^^ + ' + input.scss 1:1 root stylesheet + +DEPRECATION WARNING: The selector "> foo bar" is invalid CSS and shouldn't be an extender. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +2 | > foo bar {@extend .foo} + | ^^^^^^^^^^ invalid selector + | ============ @extend rule + ' + input.scss 2:1 root stylesheet diff --git a/spec/non_conformant/extend-tests/228_test_nested_with_child_selector_hack_extender_extendee_newline.hrx b/spec/non_conformant/extend-tests/228_test_nested_with_child_selector_hack_extender_extendee_newline.hrx index 8962af649c..a69fda8fd3 100644 --- a/spec/non_conformant/extend-tests/228_test_nested_with_child_selector_hack_extender_extendee_newline.hrx +++ b/spec/non_conformant/extend-tests/228_test_nested_with_child_selector_hack_extender_extendee_newline.hrx @@ -8,3 +8,28 @@ flip, > foo bar { a: b; } + +<===> warning +DEPRECATION WARNING: The selector "> .foo" is invalid CSS. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | > .foo {a: b} + | ^^^^^^^ + ' + input.scss 1:1 root stylesheet + +DEPRECATION WARNING: The selector "> foo bar" is invalid CSS and shouldn't be an extender. +This will be an error in Dart Sass 2.0.0. + +More info: https://sass-lang.com/d/bogus-combinators + + , +2 | / flip, +3 | | > foo bar {@extend .foo} + | '----------^ invalid selector + | ============ @extend rule + ' + input.scss 2:1 root stylesheet diff --git a/spec/non_conformant/sass/selectors.hrx b/spec/non_conformant/sass/selectors.hrx index 4133b108bc..c26b149448 100644 --- a/spec/non_conformant/sass/selectors.hrx +++ b/spec/non_conformant/sass/selectors.hrx @@ -32,15 +32,6 @@ commas .test { foo: bar; } -.test ~ { - tilde: true; -} -.test + { - adjancent: true; -} -.test > { - child: true; -} .test * { universal: true; } @@ -61,3 +52,46 @@ commas and, commas indented { x: y; } + +<===> warning +DEPRECATION WARNING: The selector ".test ~" is only valid for nesting and shouldn't +have children other than style rules. 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 + + , +3 | ~ + | ^ invalid selector +4 | tilde: true + | =========== this is not a style rule + ' + input.sass 3:3 root stylesheet + +DEPRECATION WARNING: The selector ".test +" is only valid for nesting and shouldn't +have children other than style rules. 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 + + , +5 | + + | ^ invalid selector +6 | adjancent: true + | =============== this is not a style rule + ' + input.sass 5:3 root stylesheet + +DEPRECATION WARNING: The selector ".test >" is only valid for nesting and shouldn't +have children other than style rules. 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 + + , +7 | > + | ^ invalid selector +8 | child: true + | =========== this is not a style rule + ' + input.sass 7:3 root stylesheet diff --git a/spec/non_conformant/scss/css_selector_hacks.hrx b/spec/non_conformant/scss/css_selector_hacks.hrx index 82858c308f..265773fef7 100644 --- a/spec/non_conformant/scss/css_selector_hacks.hrx +++ b/spec/non_conformant/scss/css_selector_hacks.hrx @@ -3,6 +3,15 @@ a: b; } <===> output.css -> > E { - a: b; -} + +<===> warning +DEPRECATION WARNING: The selector "> > E" 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 | > > E { + | ^^^^^^ + ' + input.scss 1:1 root stylesheet diff --git a/spec/non_conformant/scss/weird-selectors.hrx b/spec/non_conformant/scss/weird-selectors.hrx index e337100975..efef6daa65 100644 --- a/spec/non_conformant/scss/weird-selectors.hrx +++ b/spec/non_conformant/scss/weird-selectors.hrx @@ -13,14 +13,37 @@ E > > { } } <===> output.css -> > E { - color: red; -} -E > > { - color: red; -} +<===> warning +DEPRECATION WARNING: The selector "> > E" is invalid CSS. It will be omitted from the generated CSS. +This will be an error in Dart Sass 2.0.0. -> > E > > > > F > > { - color: red; -} +More info: https://sass-lang.com/d/bogus-combinators + + , +1 | > > E { + | ^^^^^^ + ' + input.scss 1:1 root stylesheet + +DEPRECATION WARNING: The selector "E > >" 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 + + , +5 | E > > { + | ^^^^^^ + ' + input.scss 5:1 root stylesheet + +DEPRECATION WARNING: The selector "> > E > > > > F > >" 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 + + , +10 | > > F > > { + | ^^^^^^^^^^ + ' + input.scss 10:3 root stylesheet