0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-10 22:24:19 +01:00
Bootstrap/scss/_utilities-responsive.scss

149 lines
2.9 KiB
SCSS
Raw Normal View History

2012-06-29 06:46:45 +02:00
//
// Responsive: Utility classes
// --------------------------------------------------
// IE10 in Windows (Phone) 8
//
// Support for responsive views via media queries is kind of borked in IE10, for
// Surface/desktop in split view and for Windows Phone 8. This particular fix
// must be accompanied by a snippet of JavaScript to sniff the user agent and
2013-09-12 01:24:03 +02:00
// apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at
// our Getting Started page for more information on this bug.
//
// For more information, see the following:
//
// Issue: https://github.com/twbs/bootstrap/issues/10497
2014-05-15 01:41:40 +02:00
// Docs: http://getbootstrap.com/getting-started/#support-ie10-width
// Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/
// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/
@-ms-viewport {
width: device-width;
}
.visible-xs-block,
.visible-xs-inline,
.visible-xs-inline-block,
.visible-sm-block,
.visible-sm-inline,
.visible-sm-inline-block,
.visible-md-block,
.visible-md-inline,
.visible-md-inline-block,
.visible-lg-block,
.visible-lg-inline,
.visible-lg-inline-block {
display: none !important;
}
.visible-xs-block {
2014-12-02 23:02:35 +01:00
@include media-xs {
display: block !important;
2014-12-02 23:02:35 +01:00
}
}
.visible-xs-inline {
2014-12-02 23:02:35 +01:00
@include media-xs {
display: inline !important;
2014-12-02 23:02:35 +01:00
}
}
.visible-xs-inline-block {
2014-12-02 23:02:35 +01:00
@include media-xs {
display: inline-block !important;
2014-12-02 23:02:35 +01:00
}
}
.visible-sm-block {
2014-12-02 23:02:35 +01:00
@include media-sm-max {
display: block !important;
2014-12-02 23:02:35 +01:00
}
}
.visible-sm-inline {
2014-12-02 23:02:35 +01:00
@include media-sm-max {
display: inline !important;
2014-12-02 23:02:35 +01:00
}
}
.visible-sm-inline-block {
2014-12-02 23:02:35 +01:00
@include media-sm-max {
display: inline-block !important;
2014-12-02 23:02:35 +01:00
}
}
.visible-md-block {
2014-12-02 23:02:35 +01:00
@include media-md-max {
display: block !important;
2014-12-02 23:02:35 +01:00
}
}
.visible-md-inline {
2014-12-02 23:02:35 +01:00
@include media-md-max {
display: inline !important;
2014-12-02 23:02:35 +01:00
}
}
.visible-md-inline-block {
2014-12-02 23:02:35 +01:00
@include media-md-max {
display: inline-block !important;
2014-12-02 23:02:35 +01:00
}
}
.visible-lg-block {
2014-12-02 23:02:35 +01:00
@include media-lg {
display: block !important;
2014-12-02 23:02:35 +01:00
}
}
.visible-lg-inline {
2014-12-02 23:02:35 +01:00
@include media-lg {
display: inline !important;
2014-12-02 23:02:35 +01:00
}
}
.visible-lg-inline-block {
2014-12-02 23:02:35 +01:00
@include media-lg {
display: inline-block !important;
2014-12-02 23:02:35 +01:00
}
}
2014-12-02 23:02:35 +01:00
@include media-sm-max {
@include responsive-invisibility('.hidden-sm');
}
2014-12-02 23:02:35 +01:00
@include media-md-max {
@include responsive-invisibility('.hidden-md');
}
2014-12-02 23:02:35 +01:00
@include media-lg {
@include responsive-invisibility('.hidden-lg');
}
2013-02-06 07:17:28 +01:00
2013-02-06 07:17:28 +01:00
// Print utilities
//
// Media queries are placed on the inside to be mixin-friendly.
.visible-print-block {
display: none !important;
@media print {
display: block !important;
}
}
.visible-print-inline {
display: none !important;
@media print {
display: inline !important;
}
}
.visible-print-inline-block {
display: none !important;
@media print {
display: inline-block !important;
}
}
2013-10-31 10:32:23 +01:00
.hidden-print {
@media print {
2014-12-02 23:02:35 +01:00
@include responsive-invisibility('.hidden-print');
}
}