Skip to content
This repository has been archived by the owner on Sep 10, 2019. It is now read-only.

Commit

Permalink
Update visibility classes to match Foundation 5 behavior, fixes #110
Browse files Browse the repository at this point in the history
  • Loading branch information
gakimball committed Dec 1, 2014
1 parent 1cb8ba7 commit ff3bf09
Showing 1 changed file with 37 additions and 17 deletions.
54 changes: 37 additions & 17 deletions scss/components/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,31 @@
- Floating
*/

@mixin show-for($size) {
display: none !important;
@include breakpoint($size) {
display: block !important;
}
}
@mixin show-for-only($size) {
display: none !important;
@include breakpoint($size only) {
display: block;
}
}
@mixin hide-for($size) {
display: block !important;
@include breakpoint($size) {
display: none !important;
}
}
@mixin hide-for-only($size) {
display: block !important;
@include breakpoint($size only) {
display: none !important;
}
}

@include exports(utilities) {
/*
Vertical alignment
Expand Down Expand Up @@ -45,25 +70,20 @@
/*
Visibility
*/
.hide {
display: none !important;
}
.hide { display: none !important; }
.invisible { visibility: hidden; }
@each $size in $breakpoint-classes {
@include breakpoint($size) {
.hide-for-#{$size} {
display: none !important;
}
.show-for-#{$size} {
display: block !important;
}
.hide-for-#{$size} {
@include hide-for($size);
}
@include breakpoint($size only) {
.hide-for-#{$size}-only {
display: none !important;
}
.show-for-#{$size}-only {
display: block !important;
}
.show-for-#{$size} {
@include show-for($size);
}
.hide-for-#{$size}-only {
@include hide-for-only($size);
}
.show-for-#{$size}-only {
@include show-for-only($size);
}
}
@each $orientation in (portrait, landscape) {
Expand Down

0 comments on commit ff3bf09

Please sign in to comment.