diff --git a/spec/core_functions/selector/unify/complex/combinators/child.hrx b/spec/core_functions/selector/unify/complex/combinators/child.hrx index 02ed415a6..3dff66727 100644 --- a/spec/core_functions/selector/unify/complex/combinators/child.hrx +++ b/spec/core_functions/selector/unify/complex/combinators/child.hrx @@ -48,7 +48,7 @@ a {b: selector.unify(".c > .d", ".e > .f")} <===> and_child/distinct/output.css a { - b: .e.c > .d.f; + b: .c.e > .d.f; } <===> @@ -70,7 +70,7 @@ a {b: selector.unify(".c.s1-1 > .s1-2", ".c.s2-1 > .s2-2")} <===> and_child/overlap/output.css a { - b: .c.s2-1.s1-1 > .s1-2.s2-2; + b: .c.s1-1.s2-1 > .s1-2.s2-2; } <===> diff --git a/spec/core_functions/selector/unify/complex/combinators/multiple.hrx b/spec/core_functions/selector/unify/complex/combinators/multiple.hrx index de40f3110..e1393fd27 100644 --- a/spec/core_functions/selector/unify/complex/combinators/multiple.hrx +++ b/spec/core_functions/selector/unify/complex/combinators/multiple.hrx @@ -4,7 +4,7 @@ a {b: selector.unify(".c > .d + .e", ".f .g ~ .h")} <===> isolated/output.css a { - b: .f .c > .g ~ .d + .e.h, .f .c > .d.g + .e.h; + b: .f .c > .g ~ .d + .e.h, .f .c > .g.d + .e.h; } <===> diff --git a/spec/core_functions/selector/unify/complex/combinators/next_sibling.hrx b/spec/core_functions/selector/unify/complex/combinators/next_sibling.hrx index eaf45a435..250ec9cde 100644 --- a/spec/core_functions/selector/unify/complex/combinators/next_sibling.hrx +++ b/spec/core_functions/selector/unify/complex/combinators/next_sibling.hrx @@ -26,7 +26,7 @@ a {b: selector.unify(".c + .d", ".e ~ .f")} <===> and_sibling/distinct/output.css a { - b: .e ~ .c + .d.f, .c.e + .d.f; + b: .e ~ .c + .d.f, .e.c + .d.f; } <===> @@ -59,7 +59,7 @@ a {b: selector.unify(".c.s1-1 + .s1-2", ".c.s2-1 ~ .s2-2")} <===> and_sibling/overlap/output.css a { - b: .c.s2-1 ~ .c.s1-1 + .s1-2.s2-2, .c.s1-1.s2-1 + .s1-2.s2-2; + b: .c.s2-1 ~ .c.s1-1 + .s1-2.s2-2, .c.s2-1.s1-1 + .s1-2.s2-2; } <===> @@ -81,7 +81,7 @@ a {b: selector.unify(".c + .d", ".e + .f")} <===> and_next_sibling/distinct/output.css a { - b: .e.c + .d.f; + b: .c.e + .d.f; } <===> @@ -103,7 +103,7 @@ a {b: selector.unify(".c.s1-1 + .s1-2", ".c.s2-1 + .s2-2")} <===> and_next_sibling/overlap/output.css a { - b: .c.s2-1.s1-1 + .s1-2.s2-2; + b: .c.s1-1.s2-1 + .s1-2.s2-2; } <===> diff --git a/spec/core_functions/selector/unify/complex/combinators/sibling.hrx b/spec/core_functions/selector/unify/complex/combinators/sibling.hrx index bd58fabb1..b55610fe7 100644 --- a/spec/core_functions/selector/unify/complex/combinators/sibling.hrx +++ b/spec/core_functions/selector/unify/complex/combinators/sibling.hrx @@ -26,7 +26,7 @@ a {b: selector.unify(".c ~ .d", ".e ~ .f")} <===> and_sibling/distinct/output.css a { - b: .c ~ .e ~ .d.f, .e ~ .c ~ .d.f, .e.c ~ .d.f; + b: .c ~ .e ~ .d.f, .e ~ .c ~ .d.f, .c.e ~ .d.f; } <===> @@ -59,7 +59,7 @@ a {b: selector.unify(".c.s1-1 ~ .s1-2", ".c.s2-1 ~ .s2-2")} <===> and_sibling/overlap/output.css a { - b: .c.s1-1 ~ .c.s2-1 ~ .s1-2.s2-2, .c.s2-1 ~ .c.s1-1 ~ .s1-2.s2-2, .c.s2-1.s1-1 ~ .s1-2.s2-2; + b: .c.s1-1 ~ .c.s2-1 ~ .s1-2.s2-2, .c.s2-1 ~ .c.s1-1 ~ .s1-2.s2-2, .c.s1-1.s2-1 ~ .s1-2.s2-2; } <===> @@ -81,7 +81,7 @@ a {b: selector.unify(".c ~ .d", ".e + .f")} <===> and_next_sibling/distinct/output.css a { - b: .c ~ .e + .d.f, .e.c + .d.f; + b: .c ~ .e + .d.f, .c.e + .d.f; } <===> @@ -114,7 +114,7 @@ a {b: selector.unify(".c.s1-1 ~ .s1-2", ".c.s2-1 + .s2-2")} <===> and_next_sibling/overlap/output.css a { - b: .c.s1-1 ~ .c.s2-1 + .s1-2.s2-2, .c.s2-1.s1-1 + .s1-2.s2-2; + b: .c.s1-1 ~ .c.s2-1 + .s1-2.s2-2, .c.s1-1.s2-1 + .s1-2.s2-2; } <===> diff --git a/spec/core_functions/selector/unify/complex/rootish.hrx b/spec/core_functions/selector/unify/complex/rootish.hrx index 797a05a45..9c6483d07 100644 --- a/spec/core_functions/selector/unify/complex/rootish.hrx +++ b/spec/core_functions/selector/unify/complex/rootish.hrx @@ -77,7 +77,7 @@ a {b: selector.unify(".c:root .d", ".e:root .f")} <===> root/in_both/can_unify/output.css a { - b: .e.c:root .d.f; + b: .c.e:root .d.f; } <===> @@ -121,5 +121,5 @@ a {b: selector.unify(":root .c .d", ":scope .e .f")} <===> mixed/output.css a { - b: :scope:root .c .e .d.f, :scope:root .e .c .d.f; + b: :root:scope .c .e .d.f, :root:scope .e .c .d.f; } diff --git a/spec/core_functions/selector/unify/compound.hrx b/spec/core_functions/selector/unify/compound.hrx index d289d4be0..86d6e7e75 100644 --- a/spec/core_functions/selector/unify/compound.hrx +++ b/spec/core_functions/selector/unify/compound.hrx @@ -94,3 +94,66 @@ a {b: selector.unify(":c", "::d")} a { b: :c::d; } + +<===> +================================================================================ +<===> order/do_not_cross_pseudo_element/pseudo_class_and_element/into_simple/input.scss +@use "sass:selector"; +a {b: selector.unify(".x::scrollbar:horizontal", ".y")} + +<===> order/do_not_cross_pseudo_element/pseudo_class_and_element/into_simple/output.css +a { + b: .x.y::scrollbar:horizontal; +} + +<===> +================================================================================ +<===> order/do_not_cross_pseudo_element/pseudo_class_and_element/into_pseudo_element/input.scss +@use "sass:selector"; +a {b: selector.unify("::bar:baz", ":foo")} + +<===> order/do_not_cross_pseudo_element/pseudo_class_and_element/into_pseudo_element/output.css +a { + b: :foo::bar:baz; +} + +<===> +================================================================================ +<===> order/do_not_cross_pseudo_element/pseudo_class_and_element/into_same_pseudo_element_and_different_pseudo_class/input.scss +@use "sass:selector"; +a {b: selector.unify("::foo:bar", "::foo:baz")} + +<===> order/do_not_cross_pseudo_element/pseudo_class_and_element/into_same_pseudo_element_and_different_pseudo_class/output.css +a { + b: ::foo:bar:baz; +} + +<===> +================================================================================ +<===> order/do_not_cross_pseudo_element/pseudo_class_and_element/into_different_pseudo_element_and_different_pseudo_class/input.scss +@use "sass:selector"; +a {b: selector.unify("::foo:bar", "::other:baz")} + +<===> order/do_not_cross_pseudo_element/pseudo_class_and_element/into_different_pseudo_element_and_different_pseudo_class/output.css + +<===> +================================================================================ +<===> order/do_not_cross_pseudo_element/simple/into_pseudo_class_and_element/input.scss +@use "sass:selector"; +a {b: selector.unify(".x", ".y::scrollbar:horizontal")} + +<===> order/do_not_cross_pseudo_element/simple/into_pseudo_class_and_element/output.css +a { + b: .x.y::scrollbar:horizontal; +} + +<===> +================================================================================ +<===> order/do_not_cross_pseudo_element/pseudo_element/into_pseudo_class_and_element/input.scss +@use "sass:selector"; +a {b: selector.unify(":foo", "::bar:baz")} + +<===> order/do_not_cross_pseudo_element/pseudo_element/into_pseudo_class_and_element/output.css +a { + b: :foo::bar:baz; +} diff --git a/spec/non_conformant/extend-tests/127_test_nested_extender_with_early_child_selector.hrx b/spec/non_conformant/extend-tests/127_test_nested_extender_with_early_child_selector.hrx index ee0517c56..dfe06d43d 100644 --- a/spec/non_conformant/extend-tests/127_test_nested_extender_with_early_child_selector.hrx +++ b/spec/non_conformant/extend-tests/127_test_nested_extender_with_early_child_selector.hrx @@ -3,6 +3,6 @@ .bip > .baz {@extend .bar} <===> output.css -.foo > .bar, .bip.foo > .baz { +.foo > .bar, .foo.bip > .baz { a: b; } diff --git a/spec/non_conformant/extend-tests/142_test_combinator_unification_double_tilde.hrx b/spec/non_conformant/extend-tests/142_test_combinator_unification_double_tilde.hrx index 806c90047..771417d52 100644 --- a/spec/non_conformant/extend-tests/142_test_combinator_unification_double_tilde.hrx +++ b/spec/non_conformant/extend-tests/142_test_combinator_unification_double_tilde.hrx @@ -3,6 +3,6 @@ .b ~ y {@extend x} <===> output.css -.a ~ x, .a ~ .b ~ y, .b ~ .a ~ y, .b.a ~ y { +.a ~ x, .a ~ .b ~ y, .b ~ .a ~ y, .a.b ~ y { a: b; } diff --git a/spec/non_conformant/extend-tests/146_test_combinator_unification_tilde_plus.hrx b/spec/non_conformant/extend-tests/146_test_combinator_unification_tilde_plus.hrx index 59d8cb9fc..8000958c5 100644 --- a/spec/non_conformant/extend-tests/146_test_combinator_unification_tilde_plus.hrx +++ b/spec/non_conformant/extend-tests/146_test_combinator_unification_tilde_plus.hrx @@ -3,6 +3,6 @@ .b ~ y {@extend x} <===> output.css -.a + x, .b ~ .a + y, .a.b + y { +.a + x, .b ~ .a + y, .b.a + y { a: b; } diff --git a/spec/non_conformant/extend-tests/150_test_combinator_unification_tilde_plus.hrx b/spec/non_conformant/extend-tests/150_test_combinator_unification_tilde_plus.hrx index 1fa111c52..5fb3cc419 100644 --- a/spec/non_conformant/extend-tests/150_test_combinator_unification_tilde_plus.hrx +++ b/spec/non_conformant/extend-tests/150_test_combinator_unification_tilde_plus.hrx @@ -3,6 +3,6 @@ .b + y {@extend x} <===> output.css -.a ~ x, .a ~ .b + y, .b.a + y { +.a ~ x, .a ~ .b + y, .a.b + y { a: b; } diff --git a/spec/non_conformant/extend-tests/156_test_combinator_unification_double_angle.hrx b/spec/non_conformant/extend-tests/156_test_combinator_unification_double_angle.hrx index 04bd14b38..f8b3a80ca 100644 --- a/spec/non_conformant/extend-tests/156_test_combinator_unification_double_angle.hrx +++ b/spec/non_conformant/extend-tests/156_test_combinator_unification_double_angle.hrx @@ -3,6 +3,6 @@ .b > y {@extend x} <===> output.css -.a.b > x, .b.a > y { +.a.b > x, .a.b > y { a: b; } diff --git a/spec/non_conformant/extend-tests/158_test_combinator_unification_double_angle.hrx b/spec/non_conformant/extend-tests/158_test_combinator_unification_double_angle.hrx index 73a7163c4..a8ea01cb2 100644 --- a/spec/non_conformant/extend-tests/158_test_combinator_unification_double_angle.hrx +++ b/spec/non_conformant/extend-tests/158_test_combinator_unification_double_angle.hrx @@ -3,6 +3,6 @@ .b > y {@extend x} <===> output.css -.a > x, .b.a > y { +.a > x, .a.b > y { a: b; } diff --git a/spec/non_conformant/extend-tests/160_test_combinator_unification_double_plus.hrx b/spec/non_conformant/extend-tests/160_test_combinator_unification_double_plus.hrx index 8eec12932..999d8826a 100644 --- a/spec/non_conformant/extend-tests/160_test_combinator_unification_double_plus.hrx +++ b/spec/non_conformant/extend-tests/160_test_combinator_unification_double_plus.hrx @@ -3,6 +3,6 @@ .b + y {@extend x} <===> output.css -.a.b + x, .b.a + y { +.a.b + x, .a.b + y { a: b; } diff --git a/spec/non_conformant/extend-tests/162_test_combinator_unification_double_plus.hrx b/spec/non_conformant/extend-tests/162_test_combinator_unification_double_plus.hrx index 6541a108e..203d39bc9 100644 --- a/spec/non_conformant/extend-tests/162_test_combinator_unification_double_plus.hrx +++ b/spec/non_conformant/extend-tests/162_test_combinator_unification_double_plus.hrx @@ -3,6 +3,6 @@ .b + y {@extend x} <===> output.css -.a + x, .b.a + y { +.a + x, .a.b + y { a: b; } diff --git a/spec/non_conformant/extend-tests/176_test_combinator_unification_nested.hrx b/spec/non_conformant/extend-tests/176_test_combinator_unification_nested.hrx index c9514486f..6f9b5f06a 100644 --- a/spec/non_conformant/extend-tests/176_test_combinator_unification_nested.hrx +++ b/spec/non_conformant/extend-tests/176_test_combinator_unification_nested.hrx @@ -3,6 +3,6 @@ .c > .d + y {@extend x} <===> output.css -.a > .b + x, .c.a > .d.b + y { +.a > .b + x, .a.c > .b.d + y { a: b; } diff --git a/spec/non_conformant/extend-tests/177_test_combinator_unification_nested.hrx b/spec/non_conformant/extend-tests/177_test_combinator_unification_nested.hrx index c9a5d448e..5deeba7f4 100644 --- a/spec/non_conformant/extend-tests/177_test_combinator_unification_nested.hrx +++ b/spec/non_conformant/extend-tests/177_test_combinator_unification_nested.hrx @@ -3,6 +3,6 @@ .c > y {@extend x} <===> output.css -.a > .b + x, .c.a > .b + y { +.a > .b + x, .a.c > .b + y { a: b; } diff --git a/spec/non_conformant/extend-tests/178_test_combinator_unification_with_newlines.hrx b/spec/non_conformant/extend-tests/178_test_combinator_unification_with_newlines.hrx index 3ff32b60c..c23361da7 100644 --- a/spec/non_conformant/extend-tests/178_test_combinator_unification_with_newlines.hrx +++ b/spec/non_conformant/extend-tests/178_test_combinator_unification_with_newlines.hrx @@ -7,6 +7,6 @@ y {@extend x} <===> output.css -.a > .b + x, .c.a > .d.b + y { +.a > .b + x, .a.c > .b.d + y { a: b; } diff --git a/spec/non_conformant/extend-tests/238_unify_root_pseudoelement.hrx b/spec/non_conformant/extend-tests/238_unify_root_pseudoelement.hrx index eba8e5167..daa003471 100644 --- a/spec/non_conformant/extend-tests/238_unify_root_pseudoelement.hrx +++ b/spec/non_conformant/extend-tests/238_unify_root_pseudoelement.hrx @@ -20,7 +20,7 @@ xml:root .bang-3 { @extend .bar-3} test: 1; } -.foo-2:root .bar-2, .baz-2.foo-2:root .bang-2 { +.foo-2:root .bar-2, .foo-2.baz-2:root .bang-2 { test: 2; } @@ -28,6 +28,6 @@ html:root .bar-3 { test: 3; } -.foo-4:root > .bar-4 .x-4, .baz-4.foo-4:root > .bar-4 .bang-4 .y-4 { +.foo-4:root > .bar-4 .x-4, .foo-4.baz-4:root > .bar-4 .bang-4 .y-4 { test: 4; }