OLD | NEW |
(Empty) | |
| 1 /*! |
| 2 * This file is part of website-defaults |
| 3 * Copyright (C) 2016 Eyeo GmbH |
| 4 * |
| 5 * website-defaults is free software: you can redistribute it and/or |
| 6 * modify it under the terms of the GNU General Public License as published by |
| 7 * the Free Software Foundation, either version 3 of the License, or |
| 8 * (at your option) any later version. |
| 9 * |
| 10 * website-defaults is distributed in the hope that it will be useful, |
| 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 * GNU General Public License for more details. |
| 14 * |
| 15 * You should have received a copy of the GNU General Public License |
| 16 * along with website-defaults. If not, see <http://www.gnu.org/licenses/>. |
| 17 */ |
| 18 |
| 19 /******************************************************************************* |
| 20 * Grid component |
| 21 ******************************************************************************/ |
| 22 |
| 23 /** |
| 24 * - .row contains one or more .column(s) |
| 25 * - .row clears .column(s) |
| 26 * - .row negates the left & right padding of it's left-most & right-most |
| 27 * .column(s) while preserving consistent padding between .column(s) |
| 28 */ |
| 29 .row |
| 30 { |
| 31 margin: 0px (-$small-space); |
| 32 } |
| 33 |
| 34 .row:after |
| 35 { |
| 36 display: block; |
| 37 clear: both; |
| 38 content: ""; |
| 39 } |
| 40 |
| 41 /** |
| 42 * - .column is 100% width by default |
| 43 * - Modifier classes are applied to .column to change it's width |
| 44 * - Modifier classes behave differently on different device widths |
| 45 */ |
| 46 .column |
| 47 { |
| 48 position: relative; |
| 49 width: 100%; |
| 50 min-height: 1px; |
| 51 padding: 0px $small-space; |
| 52 } |
| 53 |
| 54 /* - .column(s) within .row .reverse appear in reverse order |
| 55 * - .column(s) within [dir=rtl] appear in reverse order respectively |
| 56 */ |
| 57 |
| 58 .column, |
| 59 [dir="rtl"] .reverse .column |
| 60 { |
| 61 float: left; |
| 62 } |
| 63 |
| 64 .reverse .column, |
| 65 [dir="rtl"] .column |
| 66 { |
| 67 float: right; |
| 68 } |
| 69 |
| 70 @media(min-width: $tablet-breakpoint) |
| 71 { |
| 72 .one-fourth |
| 73 { |
| 74 width: 50%; |
| 75 } |
| 76 } |
| 77 |
| 78 @media(min-width: $desktop-breakpoint) |
| 79 { |
| 80 .one-half |
| 81 { |
| 82 width: 50%; |
| 83 } |
| 84 |
| 85 .one-third |
| 86 { |
| 87 width: 33.333333%; |
| 88 } |
| 89 |
| 90 .two-thirds |
| 91 { |
| 92 width: 66.666667%; |
| 93 } |
| 94 |
| 95 .one-fourth |
| 96 { |
| 97 width: 25%; |
| 98 } |
| 99 |
| 100 .three-fourths |
| 101 { |
| 102 width: 75%; |
| 103 } |
| 104 } |
OLD | NEW |