Created
April 18, 2015 10:43
-
-
Save vsxed/72f65ceac6d0f7847045 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
// ---- | |
// Sass (v3.4.12) | |
// Compass (v1.0.3) | |
// ---- | |
// Will result in wrong output | |
$list1: ( | |
('value1', 'value2', 'value3', 'value4', 'value5', 'value6') | |
); | |
// This will output the code as expected | |
$list2: ( | |
('value1', 'value2', 'value3', 'value4', 'value5', 'value6'), | |
); | |
@mixin inc-font($font, $fontfamily, $path, $icon-font-suffix: ''){ | |
font-family: '#{$fontfamily}'; | |
src: '#{$path}/#{$font}.eot#{$icon-font-suffix}'; | |
src: url('#{$path}/#{$font}.eot#{$icon-font-suffix}') format('embedded-opentype'); | |
} | |
/* | |
* @each-loop with $list1 | |
* => should be broken | |
*/ | |
@each $font-family, $font-file, $font-weight, $font-style, $font-path, $icon-font-suffix in $list1 { | |
/* Font: #{$font-family}: #{$font-weight} | #{$font-style} */ | |
@font-face { | |
@include inc-font($font-file, $font-family, $font-path, $icon-font-suffix); | |
font-weight: $font-weight; | |
font-style: $font-style; | |
} | |
} | |
/* | |
* @each-loop with $list2 | |
* => should be all correct | |
*/ | |
@each $font-family, $font-file, $font-weight, $font-style, $font-path, $icon-font-suffix in $list2 { | |
/* Font: #{$font-family}: #{$font-weight} | #{$font-style} */ | |
@font-face { | |
@include inc-font($font-file, $font-family, $font-path, $icon-font-suffix); | |
font-weight: $font-weight; | |
font-style: $font-style; | |
} | |
} | |
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
/* | |
* @each-loop with $list1 | |
* => should be broken | |
*/ | |
/* Font: value1: | */ | |
@font-face { | |
font-family: "value1"; | |
src: "/.eot"; | |
src: url("/.eot") format("embedded-opentype"); | |
} | |
/* Font: value2: | */ | |
@font-face { | |
font-family: "value2"; | |
src: "/.eot"; | |
src: url("/.eot") format("embedded-opentype"); | |
} | |
/* Font: value3: | */ | |
@font-face { | |
font-family: "value3"; | |
src: "/.eot"; | |
src: url("/.eot") format("embedded-opentype"); | |
} | |
/* Font: value4: | */ | |
@font-face { | |
font-family: "value4"; | |
src: "/.eot"; | |
src: url("/.eot") format("embedded-opentype"); | |
} | |
/* Font: value5: | */ | |
@font-face { | |
font-family: "value5"; | |
src: "/.eot"; | |
src: url("/.eot") format("embedded-opentype"); | |
} | |
/* Font: value6: | */ | |
@font-face { | |
font-family: "value6"; | |
src: "/.eot"; | |
src: url("/.eot") format("embedded-opentype"); | |
} | |
/* | |
* @each-loop with $list2 | |
* => should be all correct | |
*/ | |
/* Font: value1: value3 | value4 */ | |
@font-face { | |
font-family: "value1"; | |
src: "value5/value2.eotvalue6"; | |
src: url("value5/value2.eotvalue6") format("embedded-opentype"); | |
font-weight: "value3"; | |
font-style: "value4"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment