Created
November 4, 2020 20:15
-
-
Save josephfusco/169656a4e36b38f425d283b5f5c8da1a to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains 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
.rating { | |
&__bar { | |
// Generate our rating__bar data selectors. | |
@for $i from 0 through 10 { | |
&[data-value="#{$i}"] { | |
&:before{ | |
width: $i * 10%; | |
} | |
&:after{ | |
left: $i * 10%; | |
} | |
} | |
} | |
} | |
} |
This file contains 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
.rating__bar[data-value="0"]:before { | |
width: 0%; | |
} | |
.rating__bar[data-value="0"]:after { | |
left: 0%; | |
} | |
.rating__bar[data-value="1"]:before { | |
width: 10%; | |
} | |
.rating__bar[data-value="1"]:after { | |
left: 10%; | |
} | |
.rating__bar[data-value="2"]:before { | |
width: 20%; | |
} | |
.rating__bar[data-value="2"]:after { | |
left: 20%; | |
} | |
.rating__bar[data-value="3"]:before { | |
width: 30%; | |
} | |
.rating__bar[data-value="3"]:after { | |
left: 30%; | |
} | |
.rating__bar[data-value="4"]:before { | |
width: 40%; | |
} | |
.rating__bar[data-value="4"]:after { | |
left: 40%; | |
} | |
.rating__bar[data-value="5"]:before { | |
width: 50%; | |
} | |
.rating__bar[data-value="5"]:after { | |
left: 50%; | |
} | |
.rating__bar[data-value="6"]:before { | |
width: 60%; | |
} | |
.rating__bar[data-value="6"]:after { | |
left: 60%; | |
} | |
.rating__bar[data-value="7"]:before { | |
width: 70%; | |
} | |
.rating__bar[data-value="7"]:after { | |
left: 70%; | |
} | |
.rating__bar[data-value="8"]:before { | |
width: 80%; | |
} | |
.rating__bar[data-value="8"]:after { | |
left: 80%; | |
} | |
.rating__bar[data-value="9"]:before { | |
width: 90%; | |
} | |
.rating__bar[data-value="9"]:after { | |
left: 90%; | |
} | |
.rating__bar[data-value="10"]:before { | |
width: 100%; | |
} | |
.rating__bar[data-value="10"]:after { | |
left: 100%; | |
} |
This file contains 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.26.11", | |
"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