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.

responsive.less 9.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. /*!
  2. * Bootstrap Responsive v2.0.0
  3. *
  4. * Copyright 2012 Twitter, Inc
  5. * Licensed under the Apache License v2.0
  6. * http://www.apache.org/licenses/LICENSE-2.0
  7. *
  8. * Designed and built with all the love in the world @twitter by @mdo and @fat.
  9. */
  10. // Responsive.less
  11. // For phone and tablet devices
  12. // -------------------------------------------------------------
  13. // REPEAT VARIABLES & MIXINS
  14. // -------------------------
  15. // Required since we compile the responsive stuff separately
  16. @import "bootstrap/variables.less"; // Modify this for custom colors, font-sizes, etc
  17. @import "bootstrap/mixins.less";
  18. // Oscar variables and mixins
  19. @import "page/osc_mixins.less"; // Kept separtate for bootstrap updates - but should be imported into bootstap mixins.
  20. // RESPONSIVE CLASSES
  21. // ------------------
  22. // Hide from screenreaders and browsers
  23. // Credit: HTML5 Boilerplate
  24. .hidden {
  25. display: none;
  26. visibility: hidden;
  27. }
  28. // UP TO LANDSCAPE PHONE
  29. // ---------------------
  30. @media (max-width: 480px) {
  31. // Smooth out the collapsing/expanding nav
  32. .nav-collapse {
  33. -webkit-transform: translate3d(0, 0, 0); // activate the GPU
  34. }
  35. // Block level the page header small tag for readability
  36. .page-header h1 small {
  37. display: block;
  38. line-height: @baseLineHeight;
  39. }
  40. // Make span* classes full width
  41. input[class*="span"],
  42. select[class*="span"],
  43. textarea[class*="span"],
  44. .uneditable-input {
  45. display: block;
  46. width: 100%;
  47. height: 28px; /* Make inputs at least the height of their button counterpart */
  48. /* Makes inputs behave like true block-level elements */
  49. -webkit-box-sizing: border-box; /* Older Webkit */
  50. -moz-box-sizing: border-box; /* Older FF */
  51. -ms-box-sizing: border-box; /* IE8 */
  52. box-sizing: border-box; /* CSS3 spec*/
  53. }
  54. // But don't let it screw up prepend/append inputs
  55. .input-prepend input[class*="span"],
  56. .input-append input[class*="span"] {
  57. width: auto;
  58. }
  59. // Update checkboxes for iOS
  60. input[type="checkbox"],
  61. input[type="radio"] {
  62. border: 1px solid #ccc;
  63. }
  64. // Remove the horizontal form styles
  65. .form-horizontal .control-group > label {
  66. float: none;
  67. width: auto;
  68. padding-top: 0;
  69. text-align: left;
  70. }
  71. // Move over all input controls and content
  72. .form-horizontal .controls {
  73. margin-left: 0;
  74. }
  75. // Move the options list down to align with labels
  76. .form-horizontal .control-list {
  77. padding-top: 0; // has to be padding because margin collaspes
  78. }
  79. // Move over buttons in .form-actions to align with .controls
  80. .form-horizontal .form-actions {
  81. padding-left: 10px;
  82. padding-right: 10px;
  83. }
  84. // Modals
  85. .modal {
  86. position: absolute;
  87. top: 10px;
  88. left: 10px;
  89. right: 10px;
  90. width: auto;
  91. margin: 0;
  92. &.fade.in { top: auto; }
  93. }
  94. .modal-header .close {
  95. padding: 10px;
  96. margin: -10px;
  97. }
  98. // Carousel
  99. .carousel-caption {
  100. position: static;
  101. }
  102. .cart,
  103. h1.span6
  104. {
  105. display:none!important;
  106. }
  107. .navbar.accounts {
  108. margin-bottom:0px;
  109. .brand.hidden {
  110. display: inline;
  111. padding:6px 10px;
  112. font-size:18px;
  113. }
  114. span {
  115. display:none;
  116. }
  117. .nav > li {
  118. float:left;
  119. }
  120. }
  121. .navbar.primary {
  122. margin-top:0px;
  123. .brand.hidden {
  124. display: inline;
  125. visibility: visible;
  126. }
  127. .navbar-inner {
  128. .border-radius(0px);
  129. }
  130. }
  131. .brand.hidden {
  132. visibility: visible;
  133. }
  134. /*Remove float, widths, heights*/
  135. .product_title,
  136. .product_assets,
  137. .product_description,
  138. .product_related,
  139. .review_content,
  140. .review_votes,
  141. .main,
  142. .products li,
  143. .five li,
  144. .four li,
  145. .three li,
  146. .two li,
  147. .product_pod .product_price,
  148. .footer_links li,
  149. .footer_links .top_page {
  150. float:none;
  151. margin:0px;
  152. width:auto;
  153. height:auto;
  154. }
  155. .products {
  156. li {
  157. border-bottom:1px solid @grayLighter;
  158. padding-bottom:@baseLineHeight;
  159. margin-bottom:@baseLineHeight;
  160. .product_pod {
  161. margin-bottom:15px;
  162. height:auto!important;
  163. padding:0px;
  164. .star {
  165. clear:none;
  166. margin-left:@quart * 1.15;
  167. }
  168. .avaliability {
  169. text-align:left;
  170. }
  171. .product_price {
  172. h4 {
  173. margin-bottom:0px;
  174. display:inline;
  175. span, del {
  176. float:none;
  177. }
  178. }
  179. .btn {
  180. width:auto;
  181. display:block;
  182. padding: 5px 14px 6px;
  183. margin-top:5px;
  184. }
  185. }
  186. .image_container {
  187. width:@quart;
  188. float:left;
  189. margin-right:15px;
  190. margin-bottom:0px;
  191. }
  192. .product_price {
  193. position:static;
  194. }
  195. }
  196. }
  197. }
  198. .star {
  199. padding-left:70px;
  200. background:url(../../img/ui/bg-stars-small.png) 0px -4px no-repeat;
  201. height:11px;
  202. line-height:11px;
  203. }
  204. .star.One {
  205. background-position: 0px -18px;
  206. }
  207. .star.Two {
  208. background-position: 0px -32px;
  209. }
  210. .star.Three {
  211. background-position: 0px -47px;
  212. }
  213. .star.Four {
  214. background-position: 0px -61px;
  215. }
  216. .star.Five {
  217. background-position: 0px -75px;
  218. }
  219. .review_content {
  220. div {
  221. border:none;
  222. }
  223. }
  224. .review_votes {
  225. div {
  226. padding:0px;
  227. }
  228. }
  229. .footer_links {
  230. border-bottom:none;
  231. li {
  232. border-left:none;
  233. margin:0px;
  234. padding:0px;
  235. }
  236. }
  237. .navbar #browse {
  238. ul {
  239. width:auto!important;
  240. }
  241. li {
  242. border:none!important;
  243. }
  244. .dropdown-menu {
  245. margin: 0;
  246. }
  247. .nav.sub-nav {
  248. position:static;
  249. visibility:visible;
  250. li {
  251. a {
  252. padding: 6px 15px;
  253. }
  254. }
  255. }
  256. }
  257. #browse .dropdown-menu > li:hover .sub-nav,
  258. #browse .dropdown-menu > li > a:hover .sub-nav,
  259. #browse .dropdown-menu > li:hover {
  260. background:none;
  261. border:none;
  262. -webkit-box-shadow: none;
  263. -moz-box-shadow: none;
  264. box-shadow: none;
  265. -webkit-background-clip: none;
  266. -moz-background-clip: none;
  267. background-clip: none;
  268. }
  269. .header {
  270. text-shadow:none;
  271. }
  272. .alert {
  273. /* Position alerts at the bottom of the browser window*/
  274. position: static;
  275. width: auto;
  276. margin-bottom:0px;
  277. }
  278. }
  279. // LANDSCAPE PHONE TO SMALL DESKTOP & PORTRAIT TABLET
  280. // --------------------------------------------------
  281. @media (max-width: 768px) {
  282. // GRID & CONTAINERS
  283. // -----------------
  284. // Remove width from containers
  285. .container {
  286. width: auto;
  287. padding: 0 20px;
  288. }
  289. // Fluid rows
  290. .row-fluid {
  291. width: 100%;
  292. }
  293. // Undo negative margin on rows
  294. .row {
  295. margin-left: 0;
  296. }
  297. // Make all columns even
  298. .row > [class*="span"],
  299. .row-fluid > [class*="span"] {
  300. float: none;
  301. display: block;
  302. width: auto;
  303. margin: 0;
  304. }
  305. }
  306. // PORTRAIT TABLET TO DEFAULT DESKTOP
  307. // ----------------------------------
  308. @media (min-width: 768px) and (max-width: 980px) {
  309. // Fixed grid
  310. #gridSystem > .generate(12, 42px, 20px);
  311. // Fluid grid
  312. #fluidGridSystem > .generate(12, 5.801104972%, 2.762430939%);
  313. // Input grid
  314. #inputGridSystem > .generate(12, 42px, 20px);
  315. }
  316. // TABLETS AND BELOW
  317. // -----------------
  318. @media (max-width: 980px) {
  319. // UNFIX THE TOPBAR
  320. // ----------------
  321. // Remove any padding from the body
  322. body {
  323. padding-top: 0;
  324. }
  325. // Unfix the navbar
  326. .navbar-fixed-top {
  327. position: static;
  328. margin-bottom: @baseLineHeight;
  329. }
  330. .navbar-fixed-top .navbar-inner {
  331. padding: 5px;
  332. }
  333. .navbar .container {
  334. width: auto;
  335. padding: 0;
  336. }
  337. // Account for brand name
  338. .navbar .brand {
  339. padding-left: 10px;
  340. padding-right: 10px;
  341. margin: 0 0 0 -5px;
  342. }
  343. // Nav collapse clears brand
  344. .navbar .nav-collapse {
  345. clear: left;
  346. }
  347. // Block-level the nav
  348. .navbar .nav {
  349. float: none;
  350. margin: 0 0 (@baseLineHeight / 2);
  351. }
  352. .navbar .nav > li {
  353. float: none;
  354. }
  355. .navbar .nav > li > a {
  356. margin-bottom: 2px;
  357. }
  358. .navbar .nav > .divider-vertical {
  359. display: none;
  360. }
  361. // Nav and dropdown links in navbar
  362. .navbar .nav > li > a,
  363. .navbar .dropdown-menu a {
  364. padding: 6px 15px;
  365. font-weight: bold;
  366. color: @navbarLinkColor;
  367. .border-radius(3px);
  368. }
  369. .navbar .dropdown-menu li + li a {
  370. margin-bottom: 2px;
  371. }
  372. .navbar .nav > li > a:hover,
  373. .navbar .dropdown-menu a:hover {
  374. background-color: @navbarBackground;
  375. }
  376. // Dropdowns in the navbar
  377. .navbar .dropdown-menu {
  378. position: static;
  379. top: auto;
  380. left: auto;
  381. float: none;
  382. display: block;
  383. max-width: none;
  384. margin: 0 15px;
  385. padding: 0;
  386. background-color: transparent;
  387. border: none;
  388. .border-radius(0);
  389. .box-shadow(none);
  390. }
  391. .navbar .dropdown-menu:before,
  392. .navbar .dropdown-menu:after {
  393. display: none;
  394. }
  395. .navbar .dropdown-menu .divider {
  396. display: none;
  397. }
  398. // Forms in navbar
  399. .navbar-form,
  400. .navbar-search {
  401. float: none;
  402. padding: (@baseLineHeight / 2) 15px;
  403. margin: (@baseLineHeight / 2) 0;
  404. border-top: 1px solid @navbarBackground;
  405. border-bottom: 1px solid @navbarBackground;
  406. @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);
  407. .box-shadow(@shadow);
  408. }
  409. // Pull right (secondary) nav content
  410. .navbar .nav.pull-right {
  411. float: none;
  412. margin-left: 0;
  413. }
  414. // Static navbar
  415. .navbar-static .navbar-inner {
  416. padding-left: 10px;
  417. padding-right: 10px;
  418. }
  419. // Navbar button
  420. .btn-navbar {
  421. display: block;
  422. }
  423. // Hide everything in the navbar save .brand and toggle button */
  424. .nav-collapse {
  425. overflow: hidden;
  426. height: 0;
  427. }
  428. }
  429. // DEFAULT DESKTOP
  430. // ---------------
  431. @media (min-width: 980px) {
  432. .nav-collapse.collapse {
  433. height: auto !important;
  434. }
  435. }
  436. // LARGE DESKTOP & UP
  437. // ------------------
  438. @media (min-width: 1200px) {
  439. // Fixed grid
  440. #gridSystem > .generate(12, 70px, 30px);
  441. // Fluid grid
  442. #fluidGridSystem > .generate(12, 5.982905983%, 2.564102564%);
  443. // Input grid
  444. #inputGridSystem > .generate(12, 70px, 30px);
  445. // Thumbnails
  446. .thumbnails {
  447. margin-left: -30px;
  448. }
  449. .thumbnails > li {
  450. margin-left: 30px;
  451. }
  452. }