You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

194 lines
4.2 KiB

4 years ago
  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. @-ms-viewport {
  19. width: device-width;
  20. }
  21. // Visibility utilities
  22. // Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as of v3.2.0
  23. .visible-xs,
  24. .visible-sm,
  25. .visible-md,
  26. .visible-lg {
  27. .responsive-invisibility();
  28. }
  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. .visible-xs {
  44. @media (max-width: @screen-xs-max) {
  45. .responsive-visibility();
  46. }
  47. }
  48. .visible-xs-block {
  49. @media (max-width: @screen-xs-max) {
  50. display: block !important;
  51. }
  52. }
  53. .visible-xs-inline {
  54. @media (max-width: @screen-xs-max) {
  55. display: inline !important;
  56. }
  57. }
  58. .visible-xs-inline-block {
  59. @media (max-width: @screen-xs-max) {
  60. display: inline-block !important;
  61. }
  62. }
  63. .visible-sm {
  64. @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
  65. .responsive-visibility();
  66. }
  67. }
  68. .visible-sm-block {
  69. @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
  70. display: block !important;
  71. }
  72. }
  73. .visible-sm-inline {
  74. @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
  75. display: inline !important;
  76. }
  77. }
  78. .visible-sm-inline-block {
  79. @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
  80. display: inline-block !important;
  81. }
  82. }
  83. .visible-md {
  84. @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
  85. .responsive-visibility();
  86. }
  87. }
  88. .visible-md-block {
  89. @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
  90. display: block !important;
  91. }
  92. }
  93. .visible-md-inline {
  94. @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
  95. display: inline !important;
  96. }
  97. }
  98. .visible-md-inline-block {
  99. @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
  100. display: inline-block !important;
  101. }
  102. }
  103. .visible-lg {
  104. @media (min-width: @screen-lg-min) {
  105. .responsive-visibility();
  106. }
  107. }
  108. .visible-lg-block {
  109. @media (min-width: @screen-lg-min) {
  110. display: block !important;
  111. }
  112. }
  113. .visible-lg-inline {
  114. @media (min-width: @screen-lg-min) {
  115. display: inline !important;
  116. }
  117. }
  118. .visible-lg-inline-block {
  119. @media (min-width: @screen-lg-min) {
  120. display: inline-block !important;
  121. }
  122. }
  123. .hidden-xs {
  124. @media (max-width: @screen-xs-max) {
  125. .responsive-invisibility();
  126. }
  127. }
  128. .hidden-sm {
  129. @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
  130. .responsive-invisibility();
  131. }
  132. }
  133. .hidden-md {
  134. @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
  135. .responsive-invisibility();
  136. }
  137. }
  138. .hidden-lg {
  139. @media (min-width: @screen-lg-min) {
  140. .responsive-invisibility();
  141. }
  142. }
  143. // Print utilities
  144. //
  145. // Media queries are placed on the inside to be mixin-friendly.
  146. // Note: Deprecated .visible-print as of v3.2.0
  147. .visible-print {
  148. .responsive-invisibility();
  149. @media print {
  150. .responsive-visibility();
  151. }
  152. }
  153. .visible-print-block {
  154. display: none !important;
  155. @media print {
  156. display: block !important;
  157. }
  158. }
  159. .visible-print-inline {
  160. display: none !important;
  161. @media print {
  162. display: inline !important;
  163. }
  164. }
  165. .visible-print-inline-block {
  166. display: none !important;
  167. @media print {
  168. display: inline-block !important;
  169. }
  170. }
  171. .hidden-print {
  172. @media print {
  173. .responsive-invisibility();
  174. }
  175. }