Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

responsive-utilities.less 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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. }