Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: scss/_grid.scss

Issue 29361708: Issue 4609 - Default grid component (Closed)
Patch Set: Improved demo responsiveness Created Nov. 12, 2016, 2:38 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /*!
2 * This file is part of universal-design-language
3 * Copyright (C) 2016 Eyeo GmbH
4 *
5 * universal-design-language 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 * universal-design-language 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 web.starter-kit. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 /** Grid component */
juliandoucette 2016/11/16 17:17:38 Note: We will test a margin-left + :first-child gr
20
21 /**
22 * .row contains one or more .column(s)
23 * .row clears .column(s)
saroyanm 2016/11/15 16:09:44 Detail: this belong to the selector below I guess.
juliandoucette 2016/11/16 17:17:38 Acknowledged.
24 * .row negates the left & right padding of it's first & last .column(s)
25 * Preserving consistent padding between .column(s)
26 */
27 .row
28 {
29 margin: 0px (-$small-space);
30 }
31
32 .row:after
33 {
34 display: block;
35 clear: both;
36 content: "";
37 }
38
39 /**
40 * .column is 100% width by default
41 * Modifier classes are applied to .column to change it's width
42 * Modifier classes behave differently on different device widths
43 */
44 .column
45 {
46 position: relative;
47 width: 100%;
48 min-height: 1px;
saroyanm 2016/11/15 16:09:44 Deatail: can't see a reason of overwriting the ini
juliandoucette 2016/11/16 17:17:38 Acknowledged. A column must have at least 1px hei
49 padding: 0px $small-space;
50 }
51
52 /*
53 * .column(s) within .row .reverse appear in reverse order
54 * .column(s) within [dir=rtl] appear in reverse order respectively
55 */
56
57 /**
58 * .row .column(s) flow left-to-right
59 * RTL .reverse .row .column(s) flow left-to-right
60 */
61 .column,
62 [dir="rtl"] .reverse .column
63 {
64 float: left;
65 }
66
67 /**
68 * RTL .row .column(s) flow right-to-left
69 * .reverse .row .column(s) flow right-to-left
70 */
71 .reverse .column,
72 [dir="rtl"] .column
73 {
74 float: right;
75 }
76
77 @media(min-width: $tablet-breakpoint)
78 {
79 /**
80 * Change .column to "one-fourth" width
81 * .one-fourth collapses into .one-half within $tablet-breakpoint
82 */
83 .one-fourth
84 {
85 width: 50%;
86 }
87 }
88
89 @media(min-width: $desktop-breakpoint)
90 {
91 /**
92 * Change .column to "one-half" width
93 */
94 .one-half
95 {
96 width: 50%;
97 }
98
99 /**
100 * Change .column to "one-third" width
101 */
102 .one-third
103 {
104 width: 33.333333%;
105 }
106
107 /**
108 * Change .column ot "two-thirds" width
109 */
110 .two-thirds
111 {
112 width: 66.666667%;
113 }
114
115 /**
116 * Change .column to "one-fourth" width
117 */
118 .one-fourth
119 {
120 width: 25%;
121 }
122
123 /**
124 * Change .column to "three-fourths" width
125 */
126 .three-fourths
127 {
128 width: 75%;
129 }
130 }
OLDNEW
« html/grid.html ('K') | « html/grid.html ('k') | scss/main.scss » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld