responsive-767px-max.scss 3.3 KB

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