Created
December 8, 2022 17:32
-
-
Save jensgro/a26c6ea8cd191c78a0dbf5be30e3ba5d to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$left-width-initial: 95px; | |
$left-width-sm-up: 110px; | |
$left-width-lg-up: 123px; | |
$image-ml: 16px; | |
$image-path: "test/"; | |
$icon: test; | |
$selector: ""; | |
@mixin icon($icon, $image-path: $image-path) { | |
&:before { | |
content: url("#{$image-path}icons/#{$icon}.svg") | |
} | |
} | |
@mixin icon2($icon, $selector: $selector, $image-path: $image-path) { | |
#{$selector}:before { | |
content: url("#{$image-path}icons/#{$icon}.svg") | |
} | |
} | |
.test { | |
padding-left: $image-ml + $left-width-sm-up; | |
@include icon($icon); | |
} | |
.test2 { | |
$icon: test2; | |
@include icon($icon); | |
} | |
// =========================== | |
.test3 { | |
$selector: ".hgroup [itemprop='headline'], .hgroup .headline"; | |
&[class*="media-gallery"], &[class*="media-imagegallery"] { | |
@include icon2("gallery-24px", $selector); | |
} | |
} | |
.test4 { | |
$selector: ".hgroup a"; | |
&[class*="media-gallery"], &[class*="media-imagegallery"] { | |
@include icon2("gallery-24px", $selector); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.test { | |
padding-left: 126px; | |
} | |
.test:before { | |
content: url("test/icons/test.svg"); | |
} | |
.test2:before { | |
content: url("test/icons/test2.svg"); | |
} | |
.test3[class*=media-gallery] .hgroup [itemprop=headline], .test3[class*=media-gallery] .hgroup .headline:before, .test3[class*=media-imagegallery] .hgroup [itemprop=headline], .test3[class*=media-imagegallery] .hgroup .headline:before { | |
content: url("test/icons/gallery-24px.svg"); | |
} | |
.test4[class*=media-gallery] .hgroup a:before, .test4[class*=media-imagegallery] .hgroup a:before { | |
content: url("test/icons/gallery-24px.svg"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"sass": { | |
"compiler": "dart-sass/1.32.12", | |
"extensions": {}, | |
"syntax": "SCSS", | |
"outputStyle": "expanded" | |
}, | |
"autoprefixer": false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment