Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

responsive.less 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  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. // Navbar Accounts
  103. .navbar.accounts {
  104. margin-bottom:0px;
  105. .brand.hidden {
  106. display: inline;
  107. padding:6px 10px;
  108. font-size:18px;
  109. }
  110. .nav > li {
  111. div,
  112. &:last-child {
  113. display:none;
  114. }
  115. }
  116. }
  117. // Product floats
  118. .product_title,
  119. .product_assets,
  120. .product_description,
  121. .product_related,
  122. .review_content,
  123. .review_votes,
  124. .main,
  125. .products li,
  126. .five li,
  127. .four li,
  128. .three li,
  129. .two li,
  130. .product_pod .product_price,
  131. .footer_links li,
  132. .footer_links .top_page {
  133. float:none;
  134. margin:0px;
  135. width:auto;
  136. height:auto;
  137. }
  138. // Product
  139. .products {
  140. li {
  141. border-bottom:1px solid @grayLighter;
  142. padding-bottom:@baseLineHeight;
  143. margin-bottom:@baseLineHeight;
  144. .product_pod {
  145. margin-bottom:15px;
  146. height:auto!important;
  147. padding:0px;
  148. text-align:left;
  149. .star {
  150. clear:none;
  151. margin-left:@quart * 1.15;
  152. }
  153. .avaliability {
  154. text-align:left;
  155. }
  156. .product_price {
  157. position:static;
  158. h4 {
  159. margin-bottom:0px;
  160. display:inline;
  161. span, del {
  162. float:none;
  163. }
  164. }
  165. form {
  166. input#id_quantity {
  167. width: auto;
  168. }
  169. .btn {
  170. width:auto;
  171. display:block;
  172. padding: 5px 14px 6px;
  173. margin-top:5px;
  174. }
  175. }
  176. }
  177. .image_container {
  178. width:@quart;
  179. float:left;
  180. margin-right:15px;
  181. margin-bottom:80px;
  182. }
  183. }
  184. }
  185. }
  186. // Reviews
  187. .star {
  188. padding-left:70px;
  189. background:url(../img/ui/bg-stars-small.png) 0px -4px no-repeat;
  190. height:11px;
  191. line-height:11px;
  192. }
  193. .star.One {
  194. background-position: 0px -18px;
  195. }
  196. .star.Two {
  197. background-position: 0px -32px;
  198. }
  199. .star.Three {
  200. background-position: 0px -47px;
  201. }
  202. .star.Four {
  203. background-position: 0px -61px;
  204. }
  205. .star.Five {
  206. background-position: 0px -75px;
  207. }
  208. .review_content {
  209. div {
  210. border:none;
  211. }
  212. }
  213. .review_votes {
  214. div {
  215. padding:0px;
  216. }
  217. }
  218. // Footer
  219. .footer_links {
  220. border-bottom:none;
  221. li {
  222. border-left:none;
  223. margin:0px;
  224. padding:0px;
  225. }
  226. }
  227. // Alerts
  228. .alert {
  229. /* Position alerts at the bottom of the browser window*/
  230. position: static;
  231. width: auto;
  232. margin-bottom:0px;
  233. }
  234. }
  235. // LANDSCAPE PHONE TO SMALL DESKTOP & PORTRAIT TABLET
  236. // --------------------------------------------------
  237. @media (max-width: 768px) {
  238. // GRID & CONTAINERS
  239. // -----------------
  240. // Remove width from containers
  241. .container {
  242. width: auto;
  243. padding: 0 20px;
  244. }
  245. // Fluid rows
  246. .row-fluid {
  247. width: 100%;
  248. }
  249. // Undo negative margin on rows
  250. .row {
  251. margin-left: 0;
  252. }
  253. // Make all columns even
  254. .row > [class*="span"],
  255. .row-fluid > [class*="span"] {
  256. float: none;
  257. display: block;
  258. width: auto;
  259. margin: 0;
  260. }
  261. }
  262. // PORTRAIT TABLET TO DEFAULT DESKTOP
  263. // ----------------------------------
  264. @media (min-width: 768px) and (max-width: 980px) {
  265. // Fixed grid
  266. #gridSystem > .generate(12, 42px, 20px);
  267. // Fluid grid
  268. #fluidGridSystem > .generate(12, 5.801104972%, 2.762430939%);
  269. // Input grid
  270. #inputGridSystem > .generate(12, 42px, 20px);
  271. }
  272. // TABLETS AND BELOW
  273. // -----------------
  274. @media (max-width: 980px) {
  275. // UNFIX THE TOPBAR
  276. // ----------------
  277. // Remove any padding from the body
  278. body {
  279. padding-top: 0;
  280. }
  281. // Unfix the navbar
  282. .navbar-fixed-top {
  283. position: static;
  284. margin-bottom: @baseLineHeight;
  285. }
  286. .navbar-fixed-top .navbar-inner {
  287. padding: 5px;
  288. }
  289. .navbar .container {
  290. width: auto;
  291. padding: 0;
  292. }
  293. // Account for brand name
  294. .navbar .brand {
  295. padding-left: 10px;
  296. padding-right: 10px;
  297. margin: 0 0 0 -5px;
  298. }
  299. // Nav collapse clears brand
  300. .navbar .nav-collapse {
  301. clear: both;
  302. }
  303. // Block-level the nav
  304. .navbar .nav {
  305. float: none;
  306. margin: 0 0 (@baseLineHeight / 2);
  307. }
  308. .navbar .nav > li {
  309. float: none;
  310. }
  311. .navbar .nav > li > a {
  312. margin-bottom: 2px;
  313. }
  314. .navbar .nav > .divider-vertical {
  315. display: none;
  316. }
  317. // Nav and dropdown links in navbar
  318. .navbar .nav > li > a,
  319. .navbar .dropdown-menu a {
  320. padding: 6px 15px;
  321. font-weight: bold;
  322. color: @navbarLinkColor;
  323. .border-radius(3px);
  324. }
  325. .navbar .dropdown-menu li + li a {
  326. margin-bottom: 2px;
  327. }
  328. .navbar .nav > li > a:hover,
  329. .navbar .dropdown-menu a:hover {
  330. background-color: @navbarBackground;
  331. }
  332. // Dropdowns in the navbar
  333. .navbar .dropdown-menu {
  334. position: static;
  335. top: auto;
  336. left: auto;
  337. float: none;
  338. display: block;
  339. max-width: none;
  340. margin: 0 15px;
  341. padding: 0;
  342. background-color: transparent;
  343. border: none;
  344. .border-radius(0);
  345. .box-shadow(none);
  346. }
  347. .navbar .dropdown-menu:before,
  348. .navbar .dropdown-menu:after {
  349. display: none;
  350. }
  351. .navbar .dropdown-menu .divider {
  352. display: none;
  353. }
  354. // Forms in navbar
  355. .navbar-form,
  356. .navbar-search {
  357. float: none;
  358. padding: (@baseLineHeight / 2) 15px;
  359. margin: (@baseLineHeight / 2) 0;
  360. border-top: 1px solid @navbarBackground;
  361. border-bottom: 1px solid @navbarBackground;
  362. @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);
  363. .box-shadow(@shadow);
  364. }
  365. // Pull right (secondary) nav content
  366. .navbar .nav.pull-right {
  367. float: none;
  368. margin-left: 0;
  369. }
  370. // Static navbar
  371. .navbar-static .navbar-inner {
  372. padding-left: 10px;
  373. padding-right: 10px;
  374. }
  375. // Navbar button
  376. .btn-navbar {
  377. display: block;
  378. }
  379. // Hide everything in the navbar save .brand and toggle button */
  380. .nav-collapse {
  381. overflow: hidden;
  382. height: 0;
  383. }
  384. // Header
  385. .header {
  386. text-shadow:none;
  387. }
  388. // Cart
  389. .cart,
  390. h1.span6
  391. {
  392. display:none!important;
  393. }
  394. // Navbar Accounts
  395. .navbar.accounts {
  396. margin-bottom:0px;
  397. .brand.hidden {
  398. display: inline;
  399. padding:6px 10px;
  400. font-size:18px;
  401. }
  402. .nav.pull-right {
  403. float:right;
  404. margin-bottom:0px;
  405. }
  406. .nav > li {
  407. float:left;
  408. div {
  409. padding: 6px 15px;
  410. }
  411. }
  412. }
  413. // Navbar Primary
  414. .navbar.primary {
  415. margin-top:0px;
  416. .brand.hidden {
  417. display: inline;
  418. visibility: visible;
  419. }
  420. .navbar-inner {
  421. .border-radius(0px);
  422. }
  423. }
  424. .brand.hidden,
  425. .btn-cart.hidden {
  426. visibility: visible;
  427. }
  428. .btn-cart {
  429. color:#fff;
  430. line-height:12px;
  431. padding:7px 10px 6px;
  432. text-shadow: none;
  433. &:hover {
  434. color:#fff;
  435. }
  436. }
  437. .navbar #browse {
  438. > a {
  439. display:none;
  440. }
  441. ul {
  442. width:auto!important;
  443. }
  444. li {
  445. border:none!important;
  446. }
  447. .dropdown-menu {
  448. margin: 0;
  449. }
  450. .nav.sub-nav {
  451. position:static;
  452. visibility:visible;
  453. li {
  454. a {
  455. padding: 6px 15px;
  456. }
  457. }
  458. }
  459. }
  460. #browse .dropdown-menu > li:hover .sub-nav,
  461. #browse .dropdown-menu > li > a:hover .sub-nav,
  462. #browse .dropdown-menu > li:hover {
  463. background:none;
  464. border:none;
  465. -webkit-box-shadow: none;
  466. -moz-box-shadow: none;
  467. box-shadow: none;
  468. -webkit-background-clip: none;
  469. -moz-background-clip: none;
  470. background-clip: none;
  471. }
  472. }
  473. // DEFAULT DESKTOP
  474. // ---------------
  475. @media (min-width: 980px) {
  476. .nav-collapse.collapse {
  477. height: auto !important;
  478. }
  479. }
  480. // LARGE DESKTOP & UP
  481. // ------------------
  482. @media (min-width: 1200px) {
  483. // Fixed grid
  484. #gridSystem > .generate(12, 70px, 30px);
  485. // Fluid grid
  486. #fluidGridSystem > .generate(12, 5.982905983%, 2.564102564%);
  487. // Input grid
  488. #inputGridSystem > .generate(12, 70px, 30px);
  489. // Thumbnails
  490. .thumbnails {
  491. margin-left: -30px;
  492. }
  493. .thumbnails > li {
  494. margin-left: 30px;
  495. }
  496. }