Created
January 13, 2015 18:32
-
-
Save tanshio/3e3e6edd4d2b47276d70 to your computer and use it in GitHub Desktop.
scss loop
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
$main-title: ( | |
blog: | |
( | |
width:188px, | |
background-image:url(../images/blog/main-title.png) | |
), | |
archive: | |
( | |
width:162px, | |
background-image:url(../images/archive/main-title.png) | |
), | |
about: | |
( | |
background-image:url(../images/about/main-title.png) | |
), | |
); | |
.maintext{ | |
@each $key, $value in $main-title { | |
&--#{$key} { | |
@extend %main-title__text; | |
@each $key2, $value2 in $value { | |
#{$key2}:$value2 | |
} | |
} | |
} | |
} |
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
$slider_names: blog, archive, about; | |
$slider_start:-100%; | |
@each $class_name in $slider_names { | |
.mainCatch--#{$class_name} { | |
@extend %mainCatch--index--main; | |
left: $slider_start; | |
background: url(../images/home/mainCatch-#{$class_name}.jpg) center center / cover no-repeat; | |
} | |
$slider_start:$slider_start+100; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment