diff options
| author | Elvis Ratzlaff <[email protected]> | 2013-08-19 00:23:53 -0400 |
|---|---|---|
| committer | Elvis Ratzlaff <[email protected]> | 2013-08-19 00:23:53 -0400 |
| commit | 5b3e6eb563f6f3a5836b89a8b004190e7fd40219 (patch) | |
| tree | 9128becbd33e303f2636d7ffdf777952bdd3d55d | |
| parent | f584500211af84038bcff9b363343eb02cda6ccd (diff) | |
| download | bootstrap-5b3e6eb563f6f3a5836b89a8b004190e7fd40219.tar.xz bootstrap-5b3e6eb563f6f3a5836b89a8b004190e7fd40219.zip | |
make visible/hidden classes mixable
| -rw-r--r-- | less/responsive-utilities.less | 168 |
1 files changed, 120 insertions, 48 deletions
diff --git a/less/responsive-utilities.less b/less/responsive-utilities.less index 062d6820c..b83a75acf 100644 --- a/less/responsive-utilities.less +++ b/less/responsive-utilities.less @@ -36,99 +36,171 @@ // Visibility utilities .visible-xs { - .responsive-visibility(); - @media (min-width: @screen-sm) and (max-width: @screen-sm-max) { - .responsive-invisibility(); + .responsive-invisibility(); + @media (max-width: @screen-phone-max) { + .responsive-visibility(); } - @media (min-width: @screen-md) and (max-width: @screen-md-max) { - .responsive-invisibility(); + &.visible-sm { + @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) { + .responsive-visibility(); + } } - @media (min-width: @screen-lg) { - .responsive-invisibility(); + &.visible-md { + @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) { + .responsive-visibility(); + } + } + &.visible-lg { + @media (min-width: @screen-large-desktop) { + .responsive-visibility(); + } } } .visible-sm { .responsive-invisibility(); - @media (min-width: @screen-sm) and (max-width: @screen-sm-max) { + &.visible-xs { + @media (max-width: @screen-phone-max) { + .responsive-visibility(); + } + } + @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) { .responsive-visibility(); } - @media (min-width: @screen-md) and (max-width: @screen-md-max) { - .responsive-invisibility(); + &.visible-md { + @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) { + .responsive-visibility(); + } } - @media (min-width: @screen-lg) { - .responsive-invisibility(); + &.visible-lg { + @media (min-width: @screen-large-desktop) { + .responsive-visibility(); + } } } .visible-md { .responsive-invisibility(); - @media (min-width: @screen-sm) and (max-width: @screen-sm-max) { - .responsive-invisibility(); + &.visible-xs { + @media (max-width: @screen-phone-max) { + .responsive-visibility(); + } } - @media (min-width: @screen-md) and (max-width: @screen-md-max) { + &.visible-sm { + @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) { + .responsive-visibility(); + } + } + @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) { .responsive-visibility(); } - @media (min-width: @screen-lg) { - .responsive-invisibility(); + &.visible-lg { + @media (min-width: @screen-large-desktop) { + .responsive-visibility(); + } } } .visible-lg { .responsive-invisibility(); - @media (min-width: @screen-sm) and (max-width: @screen-sm-max) { - .responsive-invisibility(); - } - @media (min-width: @screen-md) and (max-width: @screen-md-max) { - .responsive-invisibility(); - } - @media (min-width: @screen-lg) { + &.visible-xs { + @media (max-width: @screen-phone-max) { + .responsive-visibility(); + } + } + &.visible-sm { + @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) { + .responsive-visibility(); + } + } + &.visible-md { + @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) { + .responsive-visibility(); + } + } + @media (min-width: @screen-large-desktop) { .responsive-visibility(); } } .hidden-xs { - .responsive-invisibility(); - @media (min-width: @screen-sm) and (max-width: @screen-sm-max) { - .responsive-visibility(); + .responsive-visibility(); + @media (max-width: @screen-phone-max) { + .responsive-invisibility(); } - @media (min-width: @screen-md) and (max-width: @screen-md-max) { - .responsive-visibility(); + &.hidden-sm { + @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) { + .responsive-invisibility(); + } } - @media (min-width: @screen-lg) { - .responsive-visibility(); + &.hidden-md { + @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) { + .responsive-invisibility(); + } + } + &.hidden-lg { + @media (min-width: @screen-large-desktop) { + .responsive-invisibility(); + } } } .hidden-sm { .responsive-visibility(); - @media (min-width: @screen-sm) and (max-width: @screen-sm-max) { + &.hidden-xs { + @media (max-width: @screen-phone-max) { + .responsive-invisibility(); + } + } + @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) { .responsive-invisibility(); } - @media (min-width: @screen-md) and (max-width: @screen-md-max) { - .responsive-visibility(); + &.hidden-md { + @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) { + .responsive-invisibility(); + } } - @media (min-width: @screen-lg) { - .responsive-visibility(); + &.hidden-lg { + @media (min-width: @screen-large-desktop) { + .responsive-invisibility(); + } } } .hidden-md { .responsive-visibility(); - @media (min-width: @screen-sm) and (max-width: @screen-sm-max) { - .responsive-visibility(); + &.hidden-xs { + @media (max-width: @screen-phone-max) { + .responsive-invisibility(); + } } - @media (min-width: @screen-md) and (max-width: @screen-md-max) { + &.hidden-sm { + @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) { + .responsive-invisibility(); + } + } + @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) { .responsive-invisibility(); } - @media (min-width: @screen-lg) { - .responsive-visibility(); + &.hidden-lg { + @media (min-width: @screen-large-desktop) { + .responsive-invisibility(); + } } } .hidden-lg { .responsive-visibility(); - @media (min-width: @screen-sm) and (max-width: @screen-sm-max) { - .responsive-visibility(); - } - @media (min-width: @screen-md) and (max-width: @screen-md-max) { - .responsive-visibility(); - } - @media (min-width: @screen-lg) { + &.hidden-xs { + @media (max-width: @screen-phone-max) { + .responsive-invisibility(); + } + } + &.hidden-sm { + @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) { + .responsive-invisibility(); + } + } + &.hidden-md { + @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) { + .responsive-invisibility(); + } + } + @media (min-width: @screen-large-desktop) { .responsive-invisibility(); } } |
