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 10.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  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. text-align:left;
  165. .star {
  166. clear:none;
  167. margin-left:@quart * 1.15;
  168. }
  169. .avaliability {
  170. text-align:left;
  171. }
  172. .product_price {
  173. position:static;
  174. h4 {
  175. margin-bottom:0px;
  176. display:inline;
  177. span, del {
  178. float:none;
  179. }
  180. }
  181. form {
  182. input#id_quantity {
  183. width: auto;
  184. }
  185. .btn {
  186. width:auto;
  187. display:block;
  188. padding: 5px 14px 6px;
  189. margin-top:5px;
  190. }
  191. }
  192. }
  193. .image_container {
  194. width:@quart;
  195. float:left;
  196. margin-right:15px;
  197. margin-bottom:80px;
  198. }
  199. }
  200. }
  201. }
  202. .star {
  203. padding-left:70px;
  204. background:url(../../img/ui/bg-stars-small.png) 0px -4px no-repeat;
  205. height:11px;
  206. line-height:11px;
  207. }
  208. .star.One {
  209. background-position: 0px -18px;
  210. }
  211. .star.Two {
  212. background-position: 0px -32px;
  213. }
  214. .star.Three {
  215. background-position: 0px -47px;
  216. }
  217. .star.Four {
  218. background-position: 0px -61px;
  219. }
  220. .star.Five {
  221. background-position: 0px -75px;
  222. }
  223. .review_content {
  224. div {
  225. border:none;
  226. }
  227. }
  228. .review_votes {
  229. div {
  230. padding:0px;
  231. }
  232. }
  233. .footer_links {
  234. border-bottom:none;
  235. li {
  236. border-left:none;
  237. margin:0px;
  238. padding:0px;
  239. }
  240. }
  241. .navbar #browse {
  242. ul {
  243. width:auto!important;
  244. }
  245. li {
  246. border:none!important;
  247. }
  248. .dropdown-menu {
  249. margin: 0;
  250. }
  251. .nav.sub-nav {
  252. position:static;
  253. visibility:visible;
  254. li {
  255. a {
  256. padding: 6px 15px;
  257. }
  258. }
  259. }
  260. }
  261. #browse .dropdown-menu > li:hover .sub-nav,
  262. #browse .dropdown-menu > li > a:hover .sub-nav,
  263. #browse .dropdown-menu > li:hover {
  264. background:none;
  265. border:none;
  266. -webkit-box-shadow: none;
  267. -moz-box-shadow: none;
  268. box-shadow: none;
  269. -webkit-background-clip: none;
  270. -moz-background-clip: none;
  271. background-clip: none;
  272. }
  273. .header {
  274. text-shadow:none;
  275. }
  276. .alert {
  277. /* Position alerts at the bottom of the browser window*/
  278. position: static;
  279. width: auto;
  280. margin-bottom:0px;
  281. }
  282. }
  283. // LANDSCAPE PHONE TO SMALL DESKTOP & PORTRAIT TABLET
  284. // --------------------------------------------------
  285. @media (max-width: 768px) {
  286. // GRID & CONTAINERS
  287. // -----------------
  288. // Remove width from containers
  289. .container {
  290. width: auto;
  291. padding: 0 20px;
  292. }
  293. // Fluid rows
  294. .row-fluid {
  295. width: 100%;
  296. }
  297. // Undo negative margin on rows
  298. .row {
  299. margin-left: 0;
  300. }
  301. // Make all columns even
  302. .row > [class*="span"],
  303. .row-fluid > [class*="span"] {
  304. float: none;
  305. display: block;
  306. width: auto;
  307. margin: 0;
  308. }
  309. }
  310. // PORTRAIT TABLET TO DEFAULT DESKTOP
  311. // ----------------------------------
  312. @media (min-width: 768px) and (max-width: 980px) {
  313. // Fixed grid
  314. #gridSystem > .generate(12, 42px, 20px);
  315. // Fluid grid
  316. #fluidGridSystem > .generate(12, 5.801104972%, 2.762430939%);
  317. // Input grid
  318. #inputGridSystem > .generate(12, 42px, 20px);
  319. }
  320. // TABLETS AND BELOW
  321. // -----------------
  322. @media (max-width: 980px) {
  323. // UNFIX THE TOPBAR
  324. // ----------------
  325. // Remove any padding from the body
  326. body {
  327. padding-top: 0;
  328. }
  329. // Unfix the navbar
  330. .navbar-fixed-top {
  331. position: static;
  332. margin-bottom: @baseLineHeight;
  333. }
  334. .navbar-fixed-top .navbar-inner {
  335. padding: 5px;
  336. }
  337. .navbar .container {
  338. width: auto;
  339. padding: 0;
  340. }
  341. // Account for brand name
  342. .navbar .brand {
  343. padding-left: 10px;
  344. padding-right: 10px;
  345. margin: 0 0 0 -5px;
  346. }
  347. // Nav collapse clears brand
  348. .navbar .nav-collapse {
  349. clear: left;
  350. }
  351. // Block-level the nav
  352. .navbar .nav {
  353. float: none;
  354. margin: 0 0 (@baseLineHeight / 2);
  355. }
  356. .navbar .nav > li {
  357. float: none;
  358. }
  359. .navbar .nav > li > a {
  360. margin-bottom: 2px;
  361. }
  362. .navbar .nav > .divider-vertical {
  363. display: none;
  364. }
  365. // Nav and dropdown links in navbar
  366. .navbar .nav > li > a,
  367. .navbar .dropdown-menu a {
  368. padding: 6px 15px;
  369. font-weight: bold;
  370. color: @navbarLinkColor;
  371. .border-radius(3px);
  372. }
  373. .navbar .dropdown-menu li + li a {
  374. margin-bottom: 2px;
  375. }
  376. .navbar .nav > li > a:hover,
  377. .navbar .dropdown-menu a:hover {
  378. background-color: @navbarBackground;
  379. }
  380. // Dropdowns in the navbar
  381. .navbar .dropdown-menu {
  382. position: static;
  383. top: auto;
  384. left: auto;
  385. float: none;
  386. display: block;
  387. max-width: none;
  388. margin: 0 15px;
  389. padding: 0;
  390. background-color: transparent;
  391. border: none;
  392. .border-radius(0);
  393. .box-shadow(none);
  394. }
  395. .navbar .dropdown-menu:before,
  396. .navbar .dropdown-menu:after {
  397. display: none;
  398. }
  399. .navbar .dropdown-menu .divider {
  400. display: none;
  401. }
  402. // Forms in navbar
  403. .navbar-form,
  404. .navbar-search {
  405. float: none;
  406. padding: (@baseLineHeight / 2) 15px;
  407. margin: (@baseLineHeight / 2) 0;
  408. border-top: 1px solid @navbarBackground;
  409. border-bottom: 1px solid @navbarBackground;
  410. @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);
  411. .box-shadow(@shadow);
  412. }
  413. // Pull right (secondary) nav content
  414. .navbar .nav.pull-right {
  415. float: none;
  416. margin-left: 0;
  417. }
  418. // Static navbar
  419. .navbar-static .navbar-inner {
  420. padding-left: 10px;
  421. padding-right: 10px;
  422. }
  423. // Navbar button
  424. .btn-navbar {
  425. display: block;
  426. }
  427. // Hide everything in the navbar save .brand and toggle button */
  428. .nav-collapse {
  429. overflow: hidden;
  430. height: 0;
  431. }
  432. }
  433. // DEFAULT DESKTOP
  434. // ---------------
  435. @media (min-width: 980px) {
  436. .nav-collapse.collapse {
  437. height: auto !important;
  438. }
  439. }
  440. // LARGE DESKTOP & UP
  441. // ------------------
  442. @media (min-width: 1200px) {
  443. // Fixed grid
  444. #gridSystem > .generate(12, 70px, 30px);
  445. // Fluid grid
  446. #fluidGridSystem > .generate(12, 5.982905983%, 2.564102564%);
  447. // Input grid
  448. #inputGridSystem > .generate(12, 70px, 30px);
  449. // Thumbnails
  450. .thumbnails {
  451. margin-left: -30px;
  452. }
  453. .thumbnails > li {
  454. margin-left: 30px;
  455. }
  456. }