Skip to content

Commit

Permalink
style: 💄 Replace ::before pseudo-class styles with ::marker (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
Herm71 authored Aug 4, 2023
1 parent fec9088 commit 0d556ea
Showing 1 changed file with 8 additions and 98 deletions.
106 changes: 8 additions & 98 deletions blocks/src/details/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,26 @@
}

&.is-style-default {

summary {
padding-left: 0.5rem;
}
padding-left: 0.5rem;
}

&.is-style-chevron {

summary::before {
summary::marker {
content: "\f345";
}
}

&.is-style-plus {

summary::before {
summary::marker {
content: "\f543";
}
}

&.is-style-check {

summary::before {
summary::marker {
content: "\f147";
}
}
Expand All @@ -61,21 +58,21 @@

&.is-style-chevron {

summary::before {
summary::marker {
content: "\f347";
}
}

&.is-style-plus {

summary::before {
summary::marker {
content: "\f460";
}
}

&.is-style-check {

summary::before {
summary::marker {
content: "\f335";
}
}
Expand All @@ -86,22 +83,9 @@
details.wp-block-ucsc-details[class*="is-style-"]:not([class*="is-style-default"]) {

summary {
list-style: none;
position: relative;
padding-left: 1.25rem;

&::-webkit-details-marker {
display:none;
}

&::before {
color: currentColor;
&::marker {
font-family: dashicons, sans-serif;
position: absolute;
top: 1.3em;
left: 0.1em;
margin-top: -1.3em;

}
}
}
Expand All @@ -111,79 +95,5 @@ details.wp-block-ucsc-details[class*="is-style-"]:not([class*="is-style-default"
details.wp-block-ucsc-details:not([class*="is-style-default"]) {


&.has-small-font-size {

summary {
padding-left: 1rem !important;

}
}

&.has-base-font-size {

summary {
padding-left: 1.25rem !important;

}
}

&.has-one-font-size {

summary {
padding-left: 1.5rem !important;

}
}

&.has-two-font-size {

summary {
padding-left: 1.75rem !important;

}
}

&.has-three-font-size {

summary {
padding-left: 2rem !important;
}
}

&.has-four-font-size {

summary {
padding-left: 2.25rem !important;
}
}

&.has-five-font-size {

summary {
padding-left: 2.75rem !important;
}
}

&.has-six-font-size {

summary {
padding-left: 3.25rem !important;
}
}

&.has-seven-font-size {

summary {
padding-left: 4rem !important;
}
}

&.has-eight-font-size {

summary {
padding-left: 5.5rem !important;
}
}

}

0 comments on commit 0d556ea

Please sign in to comment.