Created
April 3, 2014 07:41
-
-
Save KittyGiraudel/9949951 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.3.8) | |
// Compass (v1.0.0.alpha.19) | |
// ---- | |
// Hacking made easy | |
// --- | |
// A couple of Sass functions | |
// To ease the pain of dealing | |
// With special values for IE | |
// --- | |
// I can see this being useful | |
// To explain what are those weird `\9` | |
// Especially for new developers | |
// Coming up in a project | |
// Internet Explorer 6 | |
// --- | |
// @param [literal] $value: value for Internet Explorer 6 | |
@function ie6($value) { | |
@return #{'_' + $value}; | |
} | |
@mixin ie6($declarations) { | |
@each $property, $value in $declarations { | |
#{$property}: ie6($value); | |
} | |
} | |
// Internet Explorer 6-7 | |
// --- | |
// @param [literal] $value: value for Internet Explorer 6 and 7 | |
@function ie7($value) { | |
@return #{'!' + $value}; | |
} | |
@mixin ie7($declarations) { | |
@each $property, $value in $declarations { | |
#{$property}: ie7($value); | |
} | |
} | |
// Internet Explorer 6-8 | |
// --- | |
// @param [literal] $value: value for Internet Explorer 6 to 8 | |
@function ie8($value) { | |
@return #{$value + ' \9'}; | |
} | |
@mixin ie8($declarations) { | |
@each $property, $value in $declarations { | |
#{$property}: ie8($value); | |
} | |
} | |
// Internet Explorer 9-10 | |
// --- | |
// @param [literal] $value: value for Internet Explorer 9 and 10 | |
@function ie9($value) { | |
@return #{$value + '\0'}; | |
} | |
@mixin ie9($declarations) { | |
@each $property, $value in $declarations { | |
#{$property}: ie9($value); | |
} | |
} | |
// Internet Explorer 6-10 | |
// --- | |
// @param [literal] $value: value for Internet Explorer 6 to 10 | |
@function ie10($value) { | |
@return #{$value + '\9'}; | |
} | |
@mixin ie10($declarations) { | |
@each $property, $value in $declarations { | |
#{$property}: ie10($value); | |
} | |
} | |
test { | |
/* Internet Explorer 10 */ | |
@include ie10(( | |
property: value | |
)); | |
/* Internet Explorer 9 */ | |
@include ie9(( | |
property: value | |
)); | |
/* Internet Explorer 8 */ | |
@include ie8(( | |
property: value | |
)); | |
/* Internet Explorer 7 */ | |
@include ie7(( | |
property: value | |
)); | |
/* Internet Explorer 6 */ | |
@include ie6(( | |
property: value | |
)); | |
/* For all */ | |
property: value; | |
} |
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 { | |
/* Internet Explorer 10 */ | |
property: value\9; | |
/* Internet Explorer 9 */ | |
property: value\0; | |
/* Internet Explorer 8 */ | |
property: value \9; | |
/* Internet Explorer 7 */ | |
property: !value; | |
/* Internet Explorer 6 */ | |
property: _value; | |
/* For all */ | |
property: value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment