responsive-767px-max.less 3.4 KB

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