Skip to content

Instantly share code, notes, and snippets.

@AMeijerNL
Created September 25, 2014 11:32
Show Gist options
  • Save AMeijerNL/984e95f68f6329d74aba to your computer and use it in GitHub Desktop.
Save AMeijerNL/984e95f68f6329d74aba to your computer and use it in GitHub Desktop.
Viewport helpers
/* =================================
VIEWPORTS HELPERS
================================= */
.show-from {
&--mobile {
display: none;
@include breakpoint($mq-mobile){
display: initial;
}
}
&--tablet {
display: none;
@include breakpoint($mq-tablet){
display: initial;
}
}
&--destkop {
display: none;
@include breakpoint($mq-desktop){
display: initial;
}
}
}
.show-until {
&--mobile {
@include breakpoint($mq-mobile){
display: none;
}
}
&--tablet {
@include breakpoint($mq-tablet){
display: none;
}
}
&--destkop {
@include breakpoint($mq-desktop){
display: none;
}
}
}
@delaet
Copy link

delaet commented Sep 25, 2014

$map: (mobile: $mq-mobile, tablet: $mq-tablet, destkop: $mq-desktop);

.show-from {
@each $key, $value in $map {
&--#{$key} {
display: none;
@include breakpoint(#{$value}){
display: initial;
}
}
}
}

.show-until {
@each $key, $value in $map {
&--#{$key} {
@include breakpoint($mq-mobile){
display: none;
}
}
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment