sass-mediaqueries
sass-mediaqueries copied to clipboard
Min, max range contained in a single variable?
Would it be possible to add support for a single variable containing a comma-separated range, something like:
$small_display: 768px, 960px;
So that it could be used as follows:
@include screen($small_display) { }
(Forgive me if this is already possible and I just don't understand the syntax.)
That's a great idea. Currently it's not possible but for sure I want to implement it.
Thanks.
To have all in a single parameter would be really cool to have. Thought about it today myself. I wrote a small mixing that exactly does that. There is a lot in this example to improve but it works ;)
$humptieDumptie: (0, 320, "landscape");
@mixin mqx($test){
@include screen(nth($test, 1), nth($test, 2), nth($test, 3)){
@content;
}
}
@include mqx($humptieDumptie){
font-weight: bold;
}
That works to :)
I will add support for a single variable (I just wanted to release 1.6.0
first because with generator it's much easier.
Thanx!