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

Unified Diff: scss/_grid.scss

Issue 29361708: Issue 4609 - Default grid component (Closed)
Patch Set: Fixed one-half one-fourth mix-up, added units to 0s, and adjusted content hirarchy Created Nov. 8, 2016, 4:08 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « html/grid.html ('k') | scss/main.scss » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scss/_grid.scss
===================================================================
new file mode 100644
--- /dev/null
+++ b/scss/_grid.scss
@@ -0,0 +1,232 @@
+/*!
+ * This file is part of universal-design-language
+ * Copyright (C) 2016 Eyeo GmbH
+ *
+ * universal-design-language is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * universal-design-language is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with web.starter-kit. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+.container,
saroyanm 2016/11/08 16:19:40 What suppose to be the difference between the cont
juliandoucette 2016/11/09 14:51:16 Acknowledged.
juliandoucette 2016/11/09 14:51:16 We decided to move .container to _content.scss.
juliandoucette 2016/11/09 19:47:18 Done.
+.container-fluid
+{
+ margin: 0px auto;
+ padding: 0px $small-space;
+ max-width: 100%;
+}
+
+.container:after,
saroyanm 2016/11/08 16:19:40 Note: we might use double colon as soon we will dr
juliandoucette 2016/11/09 14:51:16 Acknowledged.
juliandoucette 2016/11/09 19:47:18 Done.
+.container-fluid:after,
+.row:after
+{
+ content: "";
+ display: table;
saroyanm 2016/11/08 16:19:40 I'll suggest to use display: block; I can't see re
juliandoucette 2016/11/09 14:51:16 Acknowledged. I will change this to display:block
juliandoucette 2016/11/09 19:47:18 Done.
+ clear: both;
+}
+
+.row
+{
+ margin: 0px -$small-space;
saroyanm 2016/11/08 16:19:39 Why do we need to use negative margins here ?
juliandoucette 2016/11/09 14:51:16 It should be (-$small-space) to avoid incorrect ca
juliandoucette 2016/11/09 14:51:16 Negative margin reasoning: To add consistent padd
juliandoucette 2016/11/09 19:47:18 Done.
+}
+
+.column
+{
+ position: relative;
+ min-height: 1px;
+ padding: 0px $small-space;
+ width: 100%;
+}
+
+[dir="ltr"] .column
saroyanm 2016/11/08 16:19:39 detail: .column selector should be enough, same ap
juliandoucette 2016/11/09 14:51:16 Acknowledged. This only applies to properties whi
juliandoucette 2016/11/09 19:47:18 Done.
+{
+ float: left;
saroyanm 2016/11/08 16:19:40 I'm not opposed of using floats, because seems lik
juliandoucette 2016/11/09 14:51:16 Julian - Acknowledged. @Thomas's opinion is still
+}
+
+[dir="rtl"] .column
+{
+ float: right;
+}
+
+@media (min-width: $mobile-breakpoint)
+{
+ .container
+ {
+ width: 540px;
saroyanm 2016/11/08 16:19:39 Why is the width specification for the container i
juliandoucette 2016/11/09 14:51:16 Acknowledged. - We are moving container outside -
juliandoucette 2016/11/09 19:47:18 Done.
+ }
+}
+
+@media(min-width: $tablet-breakpoint)
+{
+ .container
+ {
+ width: 720px;
+ }
+
+ .one-fourth
+ {
+ width: 50%;
+ }
+
+ [dir="ltr"] .pull-one-fourth
+ {
+ right: 50%;
+ }
+
+ [dir="rtl"] .pull-one-fourth
+ {
+ left: 50%;
+ }
+
+ [dir="ltr"] .push-one-fourth
+ {
+ left: 50%;
+ }
+
+ [dir="ltr"] .push-one-fourth
+ {
+ right: 50%;
+ }
+}
+
+@media(min-width: $desktop-breakpoint)
saroyanm 2016/11/08 16:19:39 I can't see a reason why we need to specify deskto
juliandoucette 2016/11/09 14:51:16 Acknowledged. - Since we are styling mobile first
juliandoucette 2016/11/09 19:47:18 Done.
+{
+ .container
+ {
+ width: 960px;
+ }
+
+ .one-half
+ {
+ width: 50%;
+ }
+
+ [dir="ltr"] .pull-one-half
+ {
+ right: 50%;
+ }
+
+ [dir="rtl"] .pull-one-half
+ {
+ left: 50%;
+ }
+
+ [dir="ltr"] .push-one-half
+ {
+ left: 50%;
+ }
+
+ [dir="rtl"] .push-one-half
+ {
+ right: 50%;
+ }
+
+ .one-fourth
+ {
+ width: 25%;
+ }
+
+ [dir="ltr"] .pull-one-fourth
saroyanm 2016/11/08 16:19:40 A suggestion regarding pulling and pushing. I'm n
juliandoucette 2016/11/09 14:51:16 Acknowledged. - naming TBD - we'll cover 1/2, 1/3
juliandoucette 2016/11/09 19:47:18 Done.
+ {
+ right: 25%;
+ }
+
+ [dir="rtl"] .pull-one-fourth
+ {
+ left: 25%;
+ }
+
+ [dir="ltr"] .push-one-fourth
+ {
+ left: 25%;
+ }
+
+ [dir="ltr"] .push-one-fourth
+ {
+ right: 25%;
+ }
+
+ .one-third
+ {
+ width: 33.333333%;
+ }
+
+ [dir="ltr"] .pull-one-third
+ {
+ right: 33.333333%;
+ }
+
+ [dir="rtl"] .pull-one-third
+ {
+ left: 33.333333%;
+ }
+
+ [dir="ltr"] .push-one-third
+ {
+ left: 33.333333%;
+ }
+
+ [dir="rtl"] .push-one-third
+ {
+ right: 33.333333%;
+ }
+
+ .two-thirds
+ {
+ width: 66.666667%;
+ }
+
+ [dir="ltr"] .pull-one-third
+ {
+ right: 66.666667%;
+ }
+
+ [dir="rtl"] .pull-one-third
+ {
+ left: 66.666667%;
+ }
+
+ [dir="ltr"] .push-one-third
+ {
+ left: 66.666667%;
+ }
+
+ [dir="rtl"] .push-one-third
+ {
+ right: 66.666667%;
+ }
+
+ .three-fourths
+ {
+ width: 75%;
+ }
+
+ [dir="ltr"] .pull-three-fourths
+ {
+ right: 75%;
+ }
+
+ [dir="rtl"] .pull-three-fourths
+ {
+ left: 75%;
+ }
+
+ [dir="ltr"] .push-three-fourths
+ {
+ left: 75%;
+ }
+
+ [dir="rtl"] .push-three-fourths
+ {
+ right: 75%;
+ }
+
+}
« no previous file with comments | « html/grid.html ('k') | scss/main.scss » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld