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

Delta Between Two Patch Sets: scss/_content.scss

Issue 29361647: Issue 4607 - Default content styles (Closed)
Left Patch Set: Removed responsive headings and unnessisary comments Created Nov. 12, 2016, 12:46 a.m.
Right Patch Set: Removed extra list items and changed image text capitilization Created Nov. 17, 2016, 4:17 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
1 /*! 1 /*!
2 * This file is part of universal-design-language 2 * This file is part of universal-design-language
3 * Copyright (C) 2016 Eyeo GmbH 3 * Copyright (C) 2016 Eyeo GmbH
4 * 4 *
5 * universal-design-language is free software: you can redistribute it and/or 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 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 7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version. 8 * (at your option) any later version.
9 * 9 *
10 * universal-design-language is distributed in the hope that it will be useful, 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 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU General Public License 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/>. 16 * along with web.starter-kit. If not, see <http://www.gnu.org/licenses/>.
17 */ 17 */
18 18
19 /*!
20 * This file contains parts of:
21 * - normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css
22 */
23
24 /* UDL content styles 19 /* UDL content styles
25 ******************************************************************************* 20 *******************************************************************************
26 * - Global 21 * - Global
27 * - Headings 22 * - Headings
28 * - Body content 23 * - Body content
29 * - Alignment 24 * - Alignment
30 * - Media queries
31 ******************************************************************************/ 25 ******************************************************************************/
32 26
33 /* Global 27 /* Global
juliandoucette 2016/11/22 00:54:04 @Manvel can you also acknowledge and review the re
saroyanm 2016/11/24 13:26:51 I've noticed that the ticket is out of sync, ex. w
saroyanm 2016/11/24 15:18:42 Acknowledged. We will move forward and add more c
juliandoucette 2016/11/25 16:28:43 Done.
34 ******************************************************************************/ 28 ******************************************************************************/
35 29
36 html 30 html
37 { 31 {
38 font-family: $sans-font; 32 font-family: $primary-font;
39 font-size: $medium-font; 33 font-size: $medium-font;
40 line-height: 1.15; 34 line-height: 1.15;
juliandoucette 2016/11/22 00:54:02 Note: I think I should set the primary foreground
saroyanm 2016/11/24 13:26:52 Agree.
juliandoucette 2016/11/25 16:28:42 Done.
41 } 35 }
42 36
43 /** 37 /**
44 * Center content within a (responsive) fixed width 38 * Center content within a (responsive) fixed width
45 */ 39 */
46 .container 40 .container
juliandoucette 2016/11/22 00:54:04 I'm considering moving this to _reset.scss and ren
saroyanm 2016/11/24 13:26:50 I think we might need in future separate file for
saroyanm 2016/11/24 15:18:44 Acknowledged. We will leave here only "markdown"
juliandoucette 2016/11/25 16:28:41 Done.
47 { 41 {
42 width: $mobile-width;
48 max-width: 100%; 43 max-width: 100%;
49 margin: 0px auto; 44 margin: 0px auto;
50 padding: 0px $small-space; 45 padding: 0px $small-space;
51 } 46 }
52 47
53 .container:after 48 @media(min-width: $tablet-breakpoint)
saroyanm 2016/11/15 14:28:56 Why are we clearing the container ? It's not float
juliandoucette 2016/11/16 14:58:51 Acknowledged.
juliandoucette 2016/11/17 16:09:34 Done.
saroyanm 2016/11/21 18:44:39 I thought we decided to move this rules to the bot
juliandoucette 2016/11/22 00:54:04 Acknowledged. I shouldn't have moved this back.
juliandoucette 2016/11/25 16:28:43 Done.
54 { 49 {
55 display: block; 50 .container
56 clear: both; 51 {
57 content: ""; 52 width: $tablet-width;
saroyanm 2016/11/21 18:44:40 What about calculating container width according t
juliandoucette 2016/11/22 00:54:03 No. I said before that: - The breakpoints are e
saroyanm 2016/11/24 13:26:50 I was suggestion something like -> "$tablet-breakp
saroyanm 2016/11/24 15:18:43 Acknowledged. We will keep variables and not calc
juliandoucette 2016/11/25 16:28:42 Done.
58 } 53 }
59 54 }
60 /** 55
61 * Clear all floating elements 56 @media(min-width: $desktop-breakpoint)
62 */ 57 {
63 .clearfix 58 .container
juliandoucette 2016/11/16 14:58:48 NOTE: We will drop this class and re-add if needed
juliandoucette 2016/11/17 16:09:38 Done.
64 { 59 {
65 display: block; 60 width: $desktop-width;
66 clear: both; 61 }
67 } 62 }
68 63
69 p, 64 p,
70 ol, 65 ol,
71 ul, 66 ul,
72 dl, 67 dl,
73 pre, 68 pre,
74 blockquote 69 blockquote
75 { 70 {
76 /* Set consistent margins (opinionated) */ 71 /* Set consistent margins (opinionated) */
77 margin: $small-space 0px; 72 margin: $small-space 0px;
78 } 73 }
79 74
80 /* Headings 75 /* Headings
81 ******************************************************************************/ 76 ******************************************************************************/
82 77
83 h1, 78 h1,
84 h2, 79 h2,
85 h3, 80 h3,
86 h4, 81 h4,
87 h5, 82 h5,
88 h6 83 h6
89 { 84 {
90 margin: $medium-space 0 $small-space 0; 85 margin: $medium-space 0 $small-space 0;
91 } 86 }
92 87
93 h1 88 h1
94 { 89 {
95 font-size: round($large-font * 1.6); 90 font-size: round($large-font * 1.6);
saroyanm 2016/11/21 18:44:36 I would avoid using SASS methods(like round) until
saroyanm 2016/11/21 18:44:40 Thought: I think you already mentioned that and I
juliandoucette 2016/11/22 00:54:03 The idea here was to base the larger font sizes on
saroyanm 2016/11/24 13:26:49 What about having the floating pixel values ? Anyw
saroyanm 2016/11/24 15:18:43 Acknowledged. We will use Ems for everything conte
juliandoucette 2016/11/25 16:28:44 Done. Except for line-height because of https://d
96 } 91 }
97 92
98 h2 93 h2
99 { 94 {
100 font-size: round($large-font * 1.4); 95 font-size: round($large-font * 1.4);
101 } 96 }
102 97
103 h3 98 h3
104 { 99 {
105 font-size: round($large-font * 1.2); 100 font-size: round($large-font * 1.2);
(...skipping 12 matching lines...) Expand all
118 h6 113 h6
119 { 114 {
120 font-size: $small-font; 115 font-size: $small-font;
121 } 116 }
122 117
123 /* Body content 118 /* Body content
124 ******************************************************************************/ 119 ******************************************************************************/
125 120
126 abbr 121 abbr
127 { 122 {
128 text-decoration: underline dotted; 123 text-decoration: underline dotted;
saroyanm 2016/11/21 18:44:36 Apparently shorthand properties are only supported
juliandoucette 2016/11/22 00:54:03 Acknowledged.
juliandoucette 2016/11/25 16:28:43 Done.
129 cursor: help; 124 cursor: help;
130 } 125 }
131 126
132 b, 127 b,
133 strong 128 strong
134 { 129 {
135 font-weight: $bold-weight; 130 font-weight: $bold-weight;
136 } 131 }
137 132
138 small 133 small
139 { 134 {
140 font-size: $small-font; 135 font-size: $small-font;
141 } 136 }
142 137
143 sup 138 sup
144 { 139 {
145 position: relative; 140 position: relative;
146 top: -0.5em;
saroyanm 2016/11/15 14:28:55 Why are we using EMs here ? I assume this change i
juliandoucette 2016/11/16 14:58:50 Acknowledged. We will remove this in favor of ver
juliandoucette 2016/11/17 16:09:38 Done.
147 font-size: 75%; 141 font-size: 75%;
148 /* Prevent `sub` and `sup` elements from affecting the line height */ 142 vertical-align: super;
saroyanm 2016/11/15 14:28:57 Detail: It's only sup in this case, you can overri
juliandoucette 2016/11/16 14:58:50 Acknowledged. We probably don't need line-height
juliandoucette 2016/11/17 16:09:35 Done.
149 line-height: 0px;
150 vertical-align: baseline;
saroyanm 2016/11/15 14:28:56 Why are we aligning to the baseline ? Doesn't look
juliandoucette 2016/11/16 14:58:48 Acknowledged. We will change this to vertical-ali
juliandoucette 2016/11/17 16:09:36 Done.
151 } 143 }
152 144
153 a, 145 a,
154 a:visited 146 a:visited
155 { 147 {
156 /* Set default color and decoration (opinionated) */
157 color: $accent; 148 color: $accent;
158 /* Remove the gray background on active links in IE 10. */ 149 /* Remove the gray background on active links in IE 10. */
159 background-color: transparent; 150 background-color: transparent;
160 text-decoration: none; 151 text-decoration: none;
161 } 152 }
162 153
163 a:hover, 154 a:hover,
164 a:active, 155 a:active,
165 a:focus 156 a:focus
166 { 157 {
167 /* Set default color and decoration (opinionated) */
saroyanm 2016/11/15 14:28:55 * I can't see default color being set. * I'm not s
juliandoucette 2016/11/16 14:58:50 Acknowledged. I will remove and/or adjust the com
juliandoucette 2016/11/17 16:09:38 Done.
168 text-decoration: underline; 158 text-decoration: underline;
169 } 159 }
170 160
171 img 161 img
172 { 162 {
173 margin: 0px $small-space / 2; 163 /* Make fixed width images responsive */
164 max-width: 100%;
174 /* Remove the border on images inside links in IE 10-. */ 165 /* Remove the border on images inside links in IE 10-. */
175 border-style: none; 166 border-style: none;
176 } 167 }
177 168
178 hr 169 hr
179 { 170 {
180 border-top: 0px; 171 border: 1px solid $secondary-light;
181 border-bottom: 2px solid $gray;
182 } 172 }
183 173
184 [dir="ltr"] blockquote 174 [dir="ltr"] blockquote
185 { 175 {
186 padding-left: $small-space; 176 padding-left: $small-space;
187 border-left: 5px solid $gray; 177 border-left: 5px solid $secondary-light;
188 } 178 }
189 179
190 [dir="rtl"] blockquote 180 [dir="rtl"] blockquote
191 { 181 {
192 padding-right: $small-space; 182 padding-right: $small-space;
193 border-right: 5px solid $gray; 183 border-right: 5px solid $secondary-light;
194 }
195
196 pre
197 {
198 overflow: auto;
199 padding: 0px $small-space;
200 }
201
202 code
203 {
204 padding: 0px $small-space / 4;
205 }
206
207 pre,
208 code
209 {
210 background-color: $gray-light;
211 font-family: $monospace-font;
212 font-size: $medium-font;
213 }
214
215 pre code
216 {
217 padding: 0px;
218 } 184 }
219 185
220 [dir="ltr"] ol, 186 [dir="ltr"] ol,
221 [dir="ltr"] ul 187 [dir="ltr"] ul
222 { 188 {
223 padding-left: $small-space * 1.5; 189 padding-left: $small-space * 1.5;
224 } 190 }
225 191
226 [dir="rtl"] ol, 192 [dir="rtl"] ol,
227 [dir="rtl"] ul 193 [dir="rtl"] ul
(...skipping 25 matching lines...) Expand all
253 /* undo browser default (opinionated)*/ 219 /* undo browser default (opinionated)*/
254 font-weight: $bold-weight; 220 font-weight: $bold-weight;
255 } 221 }
256 222
257 dd 223 dd
258 { 224 {
259 margin: $small-space / 2 0px $small-space 0px; 225 margin: $small-space / 2 0px $small-space 0px;
260 } 226 }
261 227
262 /** 228 /**
263 * Remove list style from vertical lists 229 * Remove list style from vertical lists
juliandoucette 2016/11/27 21:45:36 Note. Removed .unstyled-list because it cannot be
264 */ 230 */
265 .unstyled-list, 231 .unstyled-list,
266 { 232 {
267 list-style-type: none; 233 list-style-type: none;
268 } 234 }
269 235
270 [dir="ltr"] .unstyled-list 236 [dir="ltr"] .unstyled-list
271 { 237 {
272 padding-left: 0px; 238 padding-left: 0px;
273 } 239 }
274 240
275 [dir="rtl"] .unstyled-list 241 [dir="rtl"] .unstyled-list
276 { 242 {
277 padding-right: 0px; 243 padding-right: 0px;
278 } 244 }
279 245
280 [dir="ltr"] .unstyled-list .unstyled-list 246 [dir="ltr"] .unstyled-list .unstyled-list
281 { 247 {
282 padding-left: $medium-space; 248 padding-left: $medium-space;
283 } 249 }
284 250
285 [dir="rtl"] .unstyled-list .unstyled-list 251 [dir="rtl"] .unstyled-list .unstyled-list
286 { 252 {
287 padding-right: $small-space; 253 padding-right: $small-space;
288 } 254 }
289 255
290 audio, 256 /* Alignment
saroyanm 2016/11/15 14:28:57 I think we only need this styles in case we will h
juliandoucette 2016/11/16 14:58:49 Acknowledged. Agreed.
juliandoucette 2016/11/17 16:09:34 Done.
291 video 257 ******************************************************************************/
292 { 258
293 /* undo browser default (opinionated) */ 259 .full-width
260 {
294 display: block; 261 display: block;
295 }
296
297 /**
298 * Embed 16x9 iframe video
299 */
300 .embed
301 {
302 display: block;
303 position: relative;
304 overflow: hidden;
305 padding: 0% 0% 56.25% 0%;
306 }
307
308 .embed iframe
309 {
310 position: absolute;
311 top: 0px;
312 left: 0px;
313 width: 100%;
314 height: 100%;
315 /* undo browser default */
316 border: 0px;
317 }
318
319 /* Alignment
320 ******************************************************************************/
321
322 /**
323 * Clear and stretch element full-width
324 */
325 .full-width
326 {
327 display: block;
328 clear: both;
saroyanm 2016/11/15 14:28:56 Why are we clearing the full width elements ? I t
juliandoucette 2016/11/16 14:58:49 Acknowledged. We can handle this edge case with i
juliandoucette 2016/11/17 16:09:36 Done.
329 overflow: auto;
saroyanm 2016/11/15 14:28:55 Why do we need to set the overflow value here ? I
juliandoucette 2016/11/16 14:58:49 Acknowledged. This addresses an edge case where w
juliandoucette 2016/11/17 16:09:35 Done.
330 width: 100%; 262 width: 100%;
331 margin: $small-space 0px; 263 margin: $small-space 0px;
332 } 264 }
333
334 .float-start,
335 .float-end
336 {
337 display: block;
338 margin: 0px 0px $small-space 0px;
339 }
340
341 /**
342 * Float to start-of-line
343 */
344 [dir="ltr"] .float-start
345 {
346 float: left;
347 margin-right: $small-space;
348 }
349
350 [dir="rtl"] .float-start
351 {
352 float: right;
353 margin-left: $small-space;
354 }
355
356 /**
357 * Float to end-of-line
358 */
359 [dir="ltr"] .float-end
360 {
361 float: right;
362 margin-left: $small-space;
363 }
364
365 [dir="rtl"] .float-end
366 {
367 float: left;
368 margin-right: $small-space;
369 }
370
371 /* Media queries
372 ******************************************************************************/
373
374 @media(min-width: $mobile-breakpoint)
saroyanm 2016/11/15 14:28:56 Seems like we started to support 4 different scree
juliandoucette 2016/11/16 14:58:50 Acknowledged. We will remove mobile-breakpoint an
juliandoucette 2016/11/17 16:09:35 Done.
375 {
376 .container
377 {
378 width: $mobile-width;
379 }
380 }
381
382 @media(min-width: $tablet-breakpoint)
383 {
384 .container
385 {
386 width: $tablet-width;
387 }
388 }
389
390 @media(min-width: $desktop-breakpoint)
391 {
392 .container
393 {
394 width: $desktop-width;
395 }
396 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld