No Description

_responsive-utilities.scss 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. //
  2. // Responsive: Utility classes
  3. // --------------------------------------------------
  4. // IE10 in Windows (Phone) 8
  5. //
  6. // Support for responsive views via media queries is kind of borked in IE10, for
  7. // Surface/desktop in split view and for Windows Phone 8. This particular fix
  8. // must be accompanied by a snippet of JavaScript to sniff the user agent and
  9. // apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at
  10. // our Getting Started page for more information on this bug.
  11. //
  12. // For more information, see the following:
  13. //
  14. // Issue: https://github.com/twbs/bootstrap/issues/10497
  15. // Docs: http://getbootstrap.com/getting-started/#support-ie10-width
  16. // Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/
  17. // Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/
  18. @at-root {
  19. @-ms-viewport {
  20. width: device-width;
  21. }
  22. }
  23. // Visibility utilities
  24. // Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as of v3.2.0
  25. @include responsive-invisibility('.visible-xs');
  26. @include responsive-invisibility('.visible-sm');
  27. @include responsive-invisibility('.visible-md');
  28. @include responsive-invisibility('.visible-lg');
  29. .visible-xs-block,
  30. .visible-xs-inline,
  31. .visible-xs-inline-block,
  32. .visible-sm-block,
  33. .visible-sm-inline,
  34. .visible-sm-inline-block,
  35. .visible-md-block,
  36. .visible-md-inline,
  37. .visible-md-inline-block,
  38. .visible-lg-block,
  39. .visible-lg-inline,
  40. .visible-lg-inline-block {
  41. display: none !important;
  42. }
  43. @media (max-width: $screen-xs-max) {
  44. @include responsive-visibility('.visible-xs');
  45. }
  46. .visible-xs-block {
  47. @media (max-width: $screen-xs-max) {
  48. display: block !important;
  49. }
  50. }
  51. .visible-xs-inline {
  52. @media (max-width: $screen-xs-max) {
  53. display: inline !important;
  54. }
  55. }
  56. .visible-xs-inline-block {
  57. @media (max-width: $screen-xs-max) {
  58. display: inline-block !important;
  59. }
  60. }
  61. @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
  62. @include responsive-visibility('.visible-sm');
  63. }
  64. .visible-sm-block {
  65. @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
  66. display: block !important;
  67. }
  68. }
  69. .visible-sm-inline {
  70. @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
  71. display: inline !important;
  72. }
  73. }
  74. .visible-sm-inline-block {
  75. @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
  76. display: inline-block !important;
  77. }
  78. }
  79. @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
  80. @include responsive-visibility('.visible-md');
  81. }
  82. .visible-md-block {
  83. @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
  84. display: block !important;
  85. }
  86. }
  87. .visible-md-inline {
  88. @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
  89. display: inline !important;
  90. }
  91. }
  92. .visible-md-inline-block {
  93. @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
  94. display: inline-block !important;
  95. }
  96. }
  97. @media (min-width: $screen-lg-min) {
  98. @include responsive-visibility('.visible-lg');
  99. }
  100. .visible-lg-block {
  101. @media (min-width: $screen-lg-min) {
  102. display: block !important;
  103. }
  104. }
  105. .visible-lg-inline {
  106. @media (min-width: $screen-lg-min) {
  107. display: inline !important;
  108. }
  109. }
  110. .visible-lg-inline-block {
  111. @media (min-width: $screen-lg-min) {
  112. display: inline-block !important;
  113. }
  114. }
  115. @media (max-width: $screen-xs-max) {
  116. @include responsive-invisibility('.hidden-xs');
  117. }
  118. @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
  119. @include responsive-invisibility('.hidden-sm');
  120. }
  121. @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
  122. @include responsive-invisibility('.hidden-md');
  123. }
  124. @media (min-width: $screen-lg-min) {
  125. @include responsive-invisibility('.hidden-lg');
  126. }
  127. // Print utilities
  128. //
  129. // Media queries are placed on the inside to be mixin-friendly.
  130. // Note: Deprecated .visible-print as of v3.2.0
  131. @include responsive-invisibility('.visible-print');
  132. @media print {
  133. @include responsive-visibility('.visible-print');
  134. }
  135. .visible-print-block {
  136. display: none !important;
  137. @media print {
  138. display: block !important;
  139. }
  140. }
  141. .visible-print-inline {
  142. display: none !important;
  143. @media print {
  144. display: inline !important;
  145. }
  146. }
  147. .visible-print-inline-block {
  148. display: none !important;
  149. @media print {
  150. display: inline-block !important;
  151. }
  152. }
  153. @media print {
  154. @include responsive-invisibility('.hidden-print');
  155. }