fix: repeating non-parent selectors
This commit is contained in:
parent
ec5f4d19cc
commit
58a80eca7e
4 changed files with 63 additions and 15 deletions
|
|
@ -112,7 +112,8 @@ pub fn styly_macro_impl(input: TokenStream, source_path: Option<PathBuf>) -> Tok
|
|||
let scope_members = scope
|
||||
.hashed_selectors
|
||||
.iter()
|
||||
.unique()
|
||||
// not pretty sure about the best way to do this
|
||||
.unique_by(|hs| hs.sel.as_arbitrary().ident.clone())
|
||||
.filter_map(|hs| {
|
||||
hs.html_ident.clone().map(|html| {
|
||||
let name = match hs.sel {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,13 @@
|
|||
&__blist {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
&.sub {
|
||||
margin: 0;
|
||||
}
|
||||
.bus & {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.el2 {
|
||||
|
|
@ -21,4 +28,12 @@
|
|||
background: black;
|
||||
}
|
||||
}
|
||||
|
||||
&.sub {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.bus {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -538,34 +538,50 @@ snapshot_kind: text
|
|||
background: #000;
|
||||
}
|
||||
|
||||
.YYYksiQMfU3exD720ckMbA.el1 {
|
||||
.n9m9Me_zRl6xP8NIGObY_A.el1 {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.YYYksiQMfU3exD720ckMbA.el1-mob {
|
||||
.n9m9Me_zRl6xP8NIGObY_A.el1-mob {
|
||||
color: #00f;
|
||||
}
|
||||
|
||||
.YYYksiQMfU3exD720ckMbA.el1__blist {
|
||||
.n9m9Me_zRl6xP8NIGObY_A.el1__blist {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.YYYksiQMfU3exD720ckMbA.el2 {
|
||||
.n9m9Me_zRl6xP8NIGObY_A.el1.n9m9Me_zRl6xP8NIGObY_A.sub {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.n9m9Me_zRl6xP8NIGObY_A.bus .n9m9Me_zRl6xP8NIGObY_A.el1 {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.n9m9Me_zRl6xP8NIGObY_A.el2 {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.YYYksiQMfU3exD720ckMbA.el2-mob {
|
||||
.n9m9Me_zRl6xP8NIGObY_A.el2-mob {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.YYYksiQMfU3exD720ckMbA.el2__blist {
|
||||
.n9m9Me_zRl6xP8NIGObY_A.el2__blist {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.YYYksiQMfU3exD720ckMbA.el2__blist-mob {
|
||||
.n9m9Me_zRl6xP8NIGObY_A.el2__blist-mob {
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.n9m9Me_zRl6xP8NIGObY_A.el2.n9m9Me_zRl6xP8NIGObY_A.sub {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.n9m9Me_zRl6xP8NIGObY_A.el2 .n9m9Me_zRl6xP8NIGObY_A.bus {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wZIQboPSLZ8aKu0MjXHwYg.p1 {
|
||||
font-size: 10px;
|
||||
color: #fff;
|
||||
|
|
|
|||
|
|
@ -4,30 +4,46 @@ assertion_line: 172
|
|||
input_file: tests/sabry_output/scopes/repeating_selector_scss.css
|
||||
snapshot_kind: text
|
||||
---
|
||||
.YYYksiQMfU3exD720ckMbA.el1 {
|
||||
.n9m9Me_zRl6xP8NIGObY_A.el1 {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.YYYksiQMfU3exD720ckMbA.el1-mob {
|
||||
.n9m9Me_zRl6xP8NIGObY_A.el1-mob {
|
||||
color: #00f;
|
||||
}
|
||||
|
||||
.YYYksiQMfU3exD720ckMbA.el1__blist {
|
||||
.n9m9Me_zRl6xP8NIGObY_A.el1__blist {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.YYYksiQMfU3exD720ckMbA.el2 {
|
||||
.n9m9Me_zRl6xP8NIGObY_A.el1.n9m9Me_zRl6xP8NIGObY_A.sub {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.n9m9Me_zRl6xP8NIGObY_A.bus .n9m9Me_zRl6xP8NIGObY_A.el1 {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.n9m9Me_zRl6xP8NIGObY_A.el2 {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.YYYksiQMfU3exD720ckMbA.el2-mob {
|
||||
.n9m9Me_zRl6xP8NIGObY_A.el2-mob {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.YYYksiQMfU3exD720ckMbA.el2__blist {
|
||||
.n9m9Me_zRl6xP8NIGObY_A.el2__blist {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.YYYksiQMfU3exD720ckMbA.el2__blist-mob {
|
||||
.n9m9Me_zRl6xP8NIGObY_A.el2__blist-mob {
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.n9m9Me_zRl6xP8NIGObY_A.el2.n9m9Me_zRl6xP8NIGObY_A.sub {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.n9m9Me_zRl6xP8NIGObY_A.el2 .n9m9Me_zRl6xP8NIGObY_A.bus {
|
||||
margin: 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue