Created
December 16, 2011 21:42
-
-
Save adarowski/1488128 to your computer and use it in GitHub Desktop.
Why are Sass evangelists so obnoxious?
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
Why are Sass evangelists so obnoxious? Because we get to turn: | |
span.icon | |
@for $quantity from 1 through 7 | |
@for $severity from 1 through 10 | |
&.rating-severity-#{$quantity}-#{$severity} | |
height: ($quantity*2) + 8px | |
width: ($quantity*2) + 8px | |
@if $severity == 1 | |
background-color: $seizure_severity_1 | |
@else if $severity == 2 | |
background-color: $seizure_severity_1 | |
@else if $severity == 3 | |
background-color: $seizure_severity_2 | |
@else if $severity == 4 | |
background-color: $seizure_severity_2 | |
@else if $severity == 5 | |
background-color: $seizure_severity_3 | |
@else if $severity == 6 | |
background-color: $seizure_severity_3 | |
@else if $severity == 7 | |
background-color: $seizure_severity_4 | |
@else if $severity == 8 | |
background-color: $seizure_severity_4 | |
@else if $severity == 9 | |
background-color: $seizure_severity_5 | |
@else if $severity == 10 | |
background-color: $seizure_severity_5 | |
Into: | |
span.icon.rating-severity-1-1 { | |
height: 10px; | |
width: 10px; | |
background-color: #ffc3d4; | |
} | |
span.icon.rating-severity-1-2 { | |
height: 10px; | |
width: 10px; | |
background-color: #ffc3d4; | |
} | |
span.icon.rating-severity-1-3 { | |
height: 10px; | |
width: 10px; | |
background-color: #ff7295; | |
} | |
span.icon.rating-severity-1-4 { | |
height: 10px; | |
width: 10px; | |
background-color: #ff7295; | |
} | |
span.icon.rating-severity-1-5 { | |
height: 10px; | |
width: 10px; | |
background-color: #ff184a; | |
} | |
span.icon.rating-severity-1-6 { | |
height: 10px; | |
width: 10px; | |
background-color: #ff184a; | |
} | |
span.icon.rating-severity-1-7 { | |
height: 10px; | |
width: 10px; | |
background-color: #ae0037; | |
} | |
span.icon.rating-severity-1-8 { | |
height: 10px; | |
width: 10px; | |
background-color: #ae0037; | |
} | |
span.icon.rating-severity-1-9 { | |
height: 10px; | |
width: 10px; | |
background-color: #4c001e; | |
} | |
span.icon.rating-severity-1-10 { | |
height: 10px; | |
width: 10px; | |
background-color: #4c001e; | |
} | |
span.icon.rating-severity-2-1 { | |
height: 12px; | |
width: 12px; | |
background-color: #ffc3d4; | |
} | |
span.icon.rating-severity-2-2 { | |
height: 12px; | |
width: 12px; | |
background-color: #ffc3d4; | |
} | |
span.icon.rating-severity-2-3 { | |
height: 12px; | |
width: 12px; | |
background-color: #ff7295; | |
} | |
span.icon.rating-severity-2-4 { | |
height: 12px; | |
width: 12px; | |
background-color: #ff7295; | |
} | |
span.icon.rating-severity-2-5 { | |
height: 12px; | |
width: 12px; | |
background-color: #ff184a; | |
} | |
span.icon.rating-severity-2-6 { | |
height: 12px; | |
width: 12px; | |
background-color: #ff184a; | |
} | |
span.icon.rating-severity-2-7 { | |
height: 12px; | |
width: 12px; | |
background-color: #ae0037; | |
} | |
span.icon.rating-severity-2-8 { | |
height: 12px; | |
width: 12px; | |
background-color: #ae0037; | |
} | |
span.icon.rating-severity-2-9 { | |
height: 12px; | |
width: 12px; | |
background-color: #4c001e; | |
} | |
span.icon.rating-severity-2-10 { | |
height: 12px; | |
width: 12px; | |
background-color: #4c001e; | |
} | |
span.icon.rating-severity-3-1 { | |
height: 14px; | |
width: 14px; | |
background-color: #ffc3d4; | |
} | |
span.icon.rating-severity-3-2 { | |
height: 14px; | |
width: 14px; | |
background-color: #ffc3d4; | |
} | |
span.icon.rating-severity-3-3 { | |
height: 14px; | |
width: 14px; | |
background-color: #ff7295; | |
} | |
span.icon.rating-severity-3-4 { | |
height: 14px; | |
width: 14px; | |
background-color: #ff7295; | |
} | |
span.icon.rating-severity-3-5 { | |
height: 14px; | |
width: 14px; | |
background-color: #ff184a; | |
} | |
span.icon.rating-severity-3-6 { | |
height: 14px; | |
width: 14px; | |
background-color: #ff184a; | |
} | |
span.icon.rating-severity-3-7 { | |
height: 14px; | |
width: 14px; | |
background-color: #ae0037; | |
} | |
span.icon.rating-severity-3-8 { | |
height: 14px; | |
width: 14px; | |
background-color: #ae0037; | |
} | |
span.icon.rating-severity-3-9 { | |
height: 14px; | |
width: 14px; | |
background-color: #4c001e; | |
} | |
span.icon.rating-severity-3-10 { | |
height: 14px; | |
width: 14px; | |
background-color: #4c001e; | |
} | |
span.icon.rating-severity-4-1 { | |
height: 16px; | |
width: 16px; | |
background-color: #ffc3d4; | |
} | |
span.icon.rating-severity-4-2 { | |
height: 16px; | |
width: 16px; | |
background-color: #ffc3d4; | |
} | |
span.icon.rating-severity-4-3 { | |
height: 16px; | |
width: 16px; | |
background-color: #ff7295; | |
} | |
span.icon.rating-severity-4-4 { | |
height: 16px; | |
width: 16px; | |
background-color: #ff7295; | |
} | |
span.icon.rating-severity-4-5 { | |
height: 16px; | |
width: 16px; | |
background-color: #ff184a; | |
} | |
span.icon.rating-severity-4-6 { | |
height: 16px; | |
width: 16px; | |
background-color: #ff184a; | |
} | |
span.icon.rating-severity-4-7 { | |
height: 16px; | |
width: 16px; | |
background-color: #ae0037; | |
} | |
span.icon.rating-severity-4-8 { | |
height: 16px; | |
width: 16px; | |
background-color: #ae0037; | |
} | |
span.icon.rating-severity-4-9 { | |
height: 16px; | |
width: 16px; | |
background-color: #4c001e; | |
} | |
span.icon.rating-severity-4-10 { | |
height: 16px; | |
width: 16px; | |
background-color: #4c001e; | |
} | |
span.icon.rating-severity-5-1 { | |
height: 18px; | |
width: 18px; | |
background-color: #ffc3d4; | |
} | |
span.icon.rating-severity-5-2 { | |
height: 18px; | |
width: 18px; | |
background-color: #ffc3d4; | |
} | |
span.icon.rating-severity-5-3 { | |
height: 18px; | |
width: 18px; | |
background-color: #ff7295; | |
} | |
span.icon.rating-severity-5-4 { | |
height: 18px; | |
width: 18px; | |
background-color: #ff7295; | |
} | |
span.icon.rating-severity-5-5 { | |
height: 18px; | |
width: 18px; | |
background-color: #ff184a; | |
} | |
span.icon.rating-severity-5-6 { | |
height: 18px; | |
width: 18px; | |
background-color: #ff184a; | |
} | |
span.icon.rating-severity-5-7 { | |
height: 18px; | |
width: 18px; | |
background-color: #ae0037; | |
} | |
span.icon.rating-severity-5-8 { | |
height: 18px; | |
width: 18px; | |
background-color: #ae0037; | |
} | |
span.icon.rating-severity-5-9 { | |
height: 18px; | |
width: 18px; | |
background-color: #4c001e; | |
} | |
span.icon.rating-severity-5-10 { | |
height: 18px; | |
width: 18px; | |
background-color: #4c001e; | |
} | |
span.icon.rating-severity-6-1 { | |
height: 20px; | |
width: 20px; | |
background-color: #ffc3d4; | |
} | |
span.icon.rating-severity-6-2 { | |
height: 20px; | |
width: 20px; | |
background-color: #ffc3d4; | |
} | |
span.icon.rating-severity-6-3 { | |
height: 20px; | |
width: 20px; | |
background-color: #ff7295; | |
} | |
span.icon.rating-severity-6-4 { | |
height: 20px; | |
width: 20px; | |
background-color: #ff7295; | |
} | |
span.icon.rating-severity-6-5 { | |
height: 20px; | |
width: 20px; | |
background-color: #ff184a; | |
} | |
span.icon.rating-severity-6-6 { | |
height: 20px; | |
width: 20px; | |
background-color: #ff184a; | |
} | |
span.icon.rating-severity-6-7 { | |
height: 20px; | |
width: 20px; | |
background-color: #ae0037; | |
} | |
span.icon.rating-severity-6-8 { | |
height: 20px; | |
width: 20px; | |
background-color: #ae0037; | |
} | |
span.icon.rating-severity-6-9 { | |
height: 20px; | |
width: 20px; | |
background-color: #4c001e; | |
} | |
span.icon.rating-severity-6-10 { | |
height: 20px; | |
width: 20px; | |
background-color: #4c001e; | |
} | |
span.icon.rating-severity-7-1 { | |
height: 22px; | |
width: 22px; | |
background-color: #ffc3d4; | |
} | |
span.icon.rating-severity-7-2 { | |
height: 22px; | |
width: 22px; | |
background-color: #ffc3d4; | |
} | |
span.icon.rating-severity-7-3 { | |
height: 22px; | |
width: 22px; | |
background-color: #ff7295; | |
} | |
span.icon.rating-severity-7-4 { | |
height: 22px; | |
width: 22px; | |
background-color: #ff7295; | |
} | |
span.icon.rating-severity-7-5 { | |
height: 22px; | |
width: 22px; | |
background-color: #ff184a; | |
} | |
span.icon.rating-severity-7-6 { | |
height: 22px; | |
width: 22px; | |
background-color: #ff184a; | |
} | |
span.icon.rating-severity-7-7 { | |
height: 22px; | |
width: 22px; | |
background-color: #ae0037; | |
} | |
span.icon.rating-severity-7-8 { | |
height: 22px; | |
width: 22px; | |
background-color: #ae0037; | |
} | |
span.icon.rating-severity-7-9 { | |
height: 22px; | |
width: 22px; | |
background-color: #4c001e; | |
} | |
span.icon.rating-severity-7-10 { | |
height: 22px; | |
width: 22px; | |
background-color: #4c001e; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment