responsive-767px-max.less 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. //
  2. // Responsive: Landscape phone to desktop/tablet
  3. // --------------------------------------------------
  4. @media (max-width: 767px) {
  5. // TYPOGRAPHY
  6. // ----------
  7. // Reset horizontal dl
  8. .dl-horizontal {
  9. dt {
  10. float: none;
  11. clear: none;
  12. width: auto;
  13. text-align: left;
  14. }
  15. dd {
  16. margin-left: 0;
  17. }
  18. }
  19. // GRID & CONTAINERS
  20. // -----------------
  21. // Remove width from containers
  22. .container {
  23. width: auto;
  24. }
  25. // Fluid rows
  26. .row-fluid {
  27. width: 100%;
  28. }
  29. // Undo negative margin on rows and thumbnails
  30. .row,
  31. .thumbnails {
  32. margin-left: 0;
  33. }
  34. .thumbnails > li {
  35. float: none;
  36. margin-left: 0; // Reset the default margin for all li elements when no .span* classes are present
  37. }
  38. // Make all grid-sized elements block level again
  39. [class*="span"],
  40. .uneditable-input[class*="span"], // Makes uneditable inputs full-width when using grid sizing
  41. .row-fluid [class*="span"] {
  42. float: none;
  43. display: block;
  44. width: 100%;
  45. margin-left: 0;
  46. .box-sizing(border-box);
  47. }
  48. .span12,
  49. .row-fluid .span12 {
  50. width: 100%;
  51. .box-sizing(border-box);
  52. }
  53. .row-fluid [class*="offset"]:first-child {
  54. margin-left: 0;
  55. }
  56. // FORM FIELDS
  57. // -----------
  58. // Make span* classes full width
  59. .input-large,
  60. .input-xlarge,
  61. .input-xxlarge,
  62. input[class*="span"],
  63. select[class*="span"],
  64. textarea[class*="span"],
  65. .uneditable-input {
  66. .input-block-level();
  67. }
  68. // But don't let it screw up prepend/append inputs
  69. .input-prepend input,
  70. .input-append input,
  71. .input-prepend input[class*="span"],
  72. .input-append input[class*="span"] {
  73. display: inline-block; // redeclare so they don't wrap to new lines
  74. width: auto;
  75. }
  76. .controls-row [class*="span"] + [class*="span"] {
  77. margin-left: 0;
  78. }
  79. // Modals
  80. .modal {
  81. position: fixed;
  82. top: 20px;
  83. left: 20px;
  84. right: 20px;
  85. width: auto;
  86. margin: 0;
  87. &.fade { top: -100px; }
  88. &.fade.in { top: 20px; }
  89. }
  90. }
  91. // UP TO LANDSCAPE PHONE
  92. // ---------------------
  93. @media (max-width: 480px) {
  94. // Smooth out the collapsing/expanding nav
  95. .nav-collapse {
  96. -webkit-transform: translate3d(0, 0, 0); // activate the GPU
  97. }
  98. // Block level the page header small tag for readability
  99. .page-header h1 small {
  100. display: block;
  101. line-height: @baseLineHeight;
  102. }
  103. // Update checkboxes for iOS
  104. input[type="checkbox"],
  105. input[type="radio"] {
  106. border: 1px solid #ccc;
  107. }
  108. // Remove the horizontal form styles
  109. .form-horizontal {
  110. .control-label {
  111. float: none;
  112. width: auto;
  113. padding-top: 0;
  114. text-align: left;
  115. }
  116. // Move over all input controls and content
  117. .controls {
  118. margin-left: 0;
  119. }
  120. // Move the options list down to align with labels
  121. .control-list {
  122. padding-top: 0; // has to be padding because margin collaspes
  123. }
  124. // Move over buttons in .form-actions to align with .controls
  125. .form-actions {
  126. padding-left: 10px;
  127. padding-right: 10px;
  128. }
  129. }
  130. // Medias
  131. // Reset float and spacing to stack
  132. .media .pull-left,
  133. .media .pull-right {
  134. float: none;
  135. display: block;
  136. margin-bottom: 10px;
  137. }
  138. // Remove side margins since we stack instead of indent
  139. .media-object {
  140. margin-right: 0;
  141. margin-left: 0;
  142. }
  143. // Modals
  144. .modal {
  145. top: 10px;
  146. left: 10px;
  147. right: 10px;
  148. }
  149. .modal-header .close {
  150. padding: 10px;
  151. margin: -10px;
  152. }
  153. // Carousel
  154. .carousel-caption {
  155. position: static;
  156. }
  157. }