Skip to content

Commit

Permalink
Add tests to check pseudo selector overlaps and non-pseudo selector o…
Browse files Browse the repository at this point in the history
…rdering
  • Loading branch information
Goodwine committed Sep 18, 2024
1 parent 432e848 commit f1c3821
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions spec/core_functions/selector/unify/compound.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,37 @@ a {

<===>
================================================================================
<===> full_overlap/input.scss
<===> full_overlap/class/input.scss
@use "sass:selector";
a {b: selector.unify(".c.d", ".c.d")}

<===> full_overlap/output.css
<===> full_overlap/class/output.css
a {
b: .c.d;
}

<===>
================================================================================
<===> full_overlap/pseudo_element/class_after/input.scss
@use "sass:selector";
a {b: selector.unify("::c.d", "::c.d")}

<===> full_overlap/pseudo_element/class_after/output.css
a {
b: ::c.d;
}

<===>
================================================================================
<===> full_overlap/pseudo/different_order/input.scss
@use "sass:selector";
a {b: selector.unify("::c.d", ".d::c")}

<===> full_overlap/pseudo/different_order/output.css
a {
b: ::c.d;
}

<===>
================================================================================
<===> order/preserved_by_default/input.scss
Expand Down Expand Up @@ -157,3 +179,14 @@ a {b: selector.unify(":foo", "::bar:baz")}
a {
b: :foo::bar:baz;
}

<===>
================================================================================
<===> order/cross_pseudo_element/input.scss
@use "sass:selector";
a {b: selector.unify(".x", "::y.z")}

<===> order/cross_pseudo_element/output.css
a {
b: .x.z::y;
}

0 comments on commit f1c3821

Please sign in to comment.