Created
February 22, 2016 08:19
-
-
Save Nilegfx/5dfc2bc44b2cc0ba6ddc to your computer and use it in GitHub Desktop.
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
/* ======== description ======= | |
Author: Ahmed ayoub Hussain | |
should be used in conjunction with Conditional HTML comments in the base layout: | |
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> | |
/* ============================ | |
/* ============ usage ========= | |
@include browser-specifics(ie7){ | |
top: 16px; | |
} | |
=============================== | |
*/ | |
@mixin browser-specifics($browsers,$content_block:false){ | |
//check if multiple browsers passed | |
@if(type-of($browsers) =="list"){ | |
$selector : ""; | |
//change seprator based on how you want the rendered content to be. | |
$seprator : if($content_block, ",", " &,"); | |
@each $browser in $browsers { | |
$selector : $selector + ".#{$browser}#{$seprator}"; | |
} | |
#{$selector}{ | |
@content; | |
} | |
}@else{ | |
//if only one browser | |
@if($content_block){ | |
.#{$browsers}{ | |
@content; | |
} | |
}@else{ | |
.#{$browsers} &{ | |
@content; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment