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: Added container & simplified html/scss Created Nov. 10, 2016, 1:22 p.m.
Right Patch Set: See comments for details Created Dec. 1, 2016, 2:05 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
« no previous file with change/comment | « scss/_base.scss ('k') | scss/_variables.scss » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /*! 1 /*!
2 * This file is part of universal-design-language 2 * This file is part of website-defaults
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 * 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 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 * website-defaults 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 website-defaults. If not, see <http://www.gnu.org/licenses/>.
17 */ 17 */
18 18
19 /** UDL content styles */ 19 /*******************************************************************************
20 20 * Content styles
21 /*!
22 * This file contains parts of:
23 * - normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css
saroyanm 2016/11/10 16:30:44 I thought we were planing to move parts of normali
juliandoucette 2016/11/10 17:42:07 We split parts of normalize.css into _reset.scss a
24 */
25
26 /* Table of contents
27 ******************************************************************************* 21 *******************************************************************************
28 * - Document 22 * 1. Document
29 * - Headings 23 * 2. Headings
30 * - Block elements 24 * 3. Body content
31 * - Blockquotes
32 * - Code blocks
33 * - Lists
34 * - Unstyled lists
35 * - Embeds
36 * - Inline elements
37 * - Links
38 * - Images
39 * - Alignment
40 ******************************************************************************/ 25 ******************************************************************************/
41 26
42 /* Document 27 /* Document
43 ******************************************************************************/ 28 ******************************************************************************/
44 29
45 html
46 {
47 font-family: $sans-font;
48 font-size: $medium-font;
49 line-height: 1.15;
saroyanm 2016/11/10 16:30:43 Detail: please specify units where possible.
juliandoucette 2016/11/10 17:42:07 Acknowledged.
juliandoucette 2016/11/11 16:27:10 MDN prefers unit-less numbers for line-height valu
50 }
51
52 /**
53 * A centered, responsive, fixed-width container with small padding
54 */
55 .container,
56 /**
57 * A full-width container with small padding
saroyanm 2016/11/10 16:30:43 The way the comments are written are affecting CSS
juliandoucette 2016/11/10 17:42:08 Acknowledged.
juliandoucette 2016/11/11 16:27:11 Done. - I removed these comments (I don't think w
58 */
59 .container-fluid
60 {
61 width: 540px;
saroyanm 2016/11/10 16:30:45 I thought the plan was to calculate the width from
juliandoucette 2016/11/10 17:42:07 No. There is no algorithm to calculate these width
juliandoucette 2016/11/11 16:27:14 I have included ${device}-${width} variables in _v
62 max-width: 100%;
63 margin: 0px auto;
64 padding: 0px $small-space;
65 }
66
67 .container:after,
saroyanm 2016/11/10 16:30:44 I do not think that this rules belong to current r
juliandoucette 2016/11/10 17:42:09 I think you are wrong. These styles clear containe
juliandoucette 2016/11/11 16:27:14 Done. I separated these classes and added more ex
68 .container-fluid:after,
69 /**
70 * Force any element to clear all
71 */
72 .float:after
juliandoucette 2016/11/10 16:08:07 This is a mistake. ".float" should be ".clearfix".
juliandoucette 2016/11/11 16:27:13 Done.
73 {
74 display: block;
75 clear: both;
76 content: "";
77 }
78
79 @media(min-width: $tablet-breakpoint)
saroyanm 2016/11/10 16:30:46 Note: I do see a reason why @media queries are loc
juliandoucette 2016/11/10 17:42:08 Don't you think that the rules that are applied to
juliandoucette 2016/11/11 16:27:14 Done. Looks like you and Thomas outnumber me on t
80 {
81 .container
82 {
83 width: 720px;
84 }
85 }
86
87 @media(min-width: $desktop-breakpoint)
88 {
89 .container
90 {
91 width: 960px;
92 }
93 }
94
95 h1,
96 h2,
97 h3,
98 h4,
99 h5,
100 h6,
101 p, 30 p,
102 ol, 31 ol,
103 ul, 32 ul,
104 dl, 33 dl,
105 pre, 34 pre,
106 blockquote 35 blockquote
107 { 36 {
108 /* Set consistent margins (opinionated) */ 37 /* Set consistent margins (opinionated) */
109 margin: $small-space 0px; 38 margin: 1em 0em;
110 } 39 }
111 40
112 /* Headings 41 /* Headings
113 ******************************************************************************/ 42 ******************************************************************************/
114 43
115 h1, 44 h1,
saroyanm 2016/11/10 16:30:46 Maybe it's a personal opinion, but I kinda feel li
juliandoucette 2016/11/10 17:42:06 Acknowledged.
juliandoucette 2016/11/11 16:27:12 Done.
116 h2, 45 h2,
117 h3, 46 h3,
118 h4, 47 h4,
119 h5, 48 h5,
120 h6 49 h6
121 { 50 {
122 margin-top: $medium-space; 51 /* Margin on top **only** (opinionated) */
123 } 52 margin: 2em 0em 0em 0em;
124
125 h1,
126 h2
127 {
128 font-weight: $thin-weight;
129 } 53 }
130 54
131 h1 55 h1
132 { 56 {
133 font-size: 48px; 57 font-size: 2em;
134 } 58 }
135 59
136 h2 60 h2
137 { 61 {
138 font-size: 36px; 62 font-size: 1.5em;
139 } 63 }
140 64
141 h3 65 h3
142 { 66 {
143 font-size: 24px; 67 font-size: 1.25em;
144 } 68 }
145 69
146 h4 70 h4
147 { 71 {
148 font-size: 20px; 72 font-size: 1em;
149 } 73 }
150 74
151 h5 75 h5
152 { 76 {
153 font-size: 16px; 77 font-size: 0.8em;
154 } 78 }
155 79
156 h6 80 h6
157 { 81 {
158 font-size: 14px; 82 font-size: 0.7em;
159 } 83 }
160 84
161 /* Block elements 85 /* Body content
162 ******************************************************************************/ 86 ******************************************************************************/
163 87
164 hr 88 abbr
saroyanm 2016/11/10 16:30:46 Detail: In HTML "hr" element is missing.
juliandoucette 2016/11/10 17:42:09 Acknowledged.
juliandoucette 2016/11/11 16:27:11 Done. Added.
165 { 89 {
166 /* Add the correct box sizing in Firefox. */ 90 text-decoration: underline;
saroyanm 2016/11/10 16:30:45 What is the problem with border-box reset we have
juliandoucette 2016/11/10 17:42:06 Acknowledged.
juliandoucette 2016/11/11 16:27:11 Done.
167 box-sizing: content-box;
168 /* Show the overflow in Edge and IE. */
169 overflow: visible;
saroyanm 2016/11/10 16:30:44 Not really sure why we need overflow property on h
juliandoucette 2016/11/10 17:42:10 It depends on how we style hr. The default style i
juliandoucette 2016/11/11 16:27:12 Done. Removed. These styles were not necessary fo
170 height: 0px;
saroyanm 2016/11/10 16:30:45 note: Feels like this style belongs to normalize.c
juliandoucette 2016/11/10 17:42:09 I put the normalize.css things that apply to conte
juliandoucette 2016/11/11 16:27:12 Most of the normalize.css changes are made irrelev
171 border: 1px solid $gray;
172 }
173
174 /* Blockquotes */
175
176 [dir="ltr"] blockquote
177 {
178 padding-left: $small-space;
179 border-left: 5px solid $gray;
180 }
181
182 [dir="rtl"] blockquote
183 {
184 padding-right: $small-space;
185 border-right: 5px solid $gray;
186 }
187
188 /* Code blocks */
189
190 pre
191 {
192 overflow: auto;
193 padding: 0px $small-space;
194 }
195
196 code
197 {
198 padding: 0px $small-space / 4;
199 }
200
201 pre,
202 code
203 {
204 background-color: $gray-light;
205 /* Correct odd font inheritance in all browsers. */
saroyanm 2016/11/10 16:30:45 Detail: seems like this also part of normalization
juliandoucette 2016/11/10 17:42:08 See comment above.
juliandoucette 2016/11/11 16:27:12 Correction: These comments are no longer valid be
206 font-family: $monospace-font;
207 /* Correct the odd font sizing in all browsers. */
208 font-size: $medium-font;
209 }
210
211 pre code
212 {
213 padding: 0px;
214 }
215
216 /* Lists */
217
218 [dir="ltr"] ol,
219 [dir="ltr"] ul
220 {
221 padding-left: $small-space * 1.5;
222 }
223
224 [dir="rtl"] ol,
225 [dir="rtl"] ul
226 {
227 padding-right: $small-space * 1.5;
228 }
229
230 li
231 {
232 margin: $small-space / 2 0px;
233 }
234
235 ol ol,
236 ul ul,
237 ol ul,
238 ul ol
239 {
240 /* prevent double spacing lists */
241 margin: 0px;
242 }
243
244 ol ol
245 {
246 list-style-type: lower-alpha;
247 }
248
249 dt
250 {
251 /* undo browser default (opinionated)*/
252 font-weight: $bold-weight;
253 }
254
255 dd
256 {
257 margin: $small-space / 2 0px $small-space 0px;
258 }
259
260 /** Unstyled lists */
261
262 .unstyled-list,
263 .unstyled-list ul
264 {
265 list-style-type: none;
266 }
267
268 [dir="ltr"] .unstyled-list
269 {
270 padding-left: 0px;
271 }
272
273 [dir="rtl"] .unstyled-list
274 {
275 padding-right: 0px;
276 }
277
278 [dir="ltr"] .unstyled-list ul
279 {
280 padding-left: $medium-space;
281 }
282
283 [dir="rtl"] .unstyled-list ul
284 {
285 padding-right: $small-space;
286 }
287
288 /* Embeds */
289
290 audio,
291 video
292 {
293 /* undo browser default (opinionated) */
294 display: block;
295 }
296
297 /** Responsive 16x9 YouTube video */
298
299 .youtube-16x9
saroyanm 2016/11/10 16:30:44 Why youtube ? I think this style shouldn't have sp
juliandoucette 2016/11/10 17:42:09 Acknowledged. I thought it was simpler for conten
juliandoucette 2016/11/11 16:27:09 Done. I changed it back to .embed and added a com
300 {
301 display: block;
302 position: relative;
303 overflow: hidden;
304 height: 0px;
saroyanm 2016/11/10 16:30:45 I thought we decided to remove this property.
juliandoucette 2016/11/10 17:42:07 Acknowledged.
juliandoucette 2016/11/11 16:27:14 Done.
305 padding: 0% 0% 56.25% 0%;
306 }
307
308 .youtube-16x9 iframe
309 {
310 position: absolute;
311 top: 0px;
312 bottom: 0px;
saroyanm 2016/11/10 16:30:44 I thought we decided to skip this property.
juliandoucette 2016/11/10 17:42:06 Acknowledged.
juliandoucette 2016/11/11 16:27:10 Done.
313 left: 0px;
314 width: 100%;
315 height: 100%;
316 border: 0px;
317 }
318
319 /* Inline elements
320 ******************************************************************************/
321
322 abbr[title]
saroyanm 2016/11/10 16:30:43 I wonder if there will be cases when we will use a
juliandoucette 2016/11/10 17:42:06 Acknowledged. This came from normalize.
juliandoucette 2016/11/11 16:27:10 Done.
323 {
324 /* Remove the bottom border in Firefox 39-. */
saroyanm 2016/11/10 16:30:43 We do support 48.0+ I think make sense to only con
juliandoucette 2016/11/10 17:42:08 Acknowledged. I could have used this link a long
juliandoucette 2016/11/11 16:27:13 Done.
325 border-bottom: none;
326 /* Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. */
327 text-decoration: underline dotted;
328 cursor: help; 91 cursor: help;
329 } 92 }
330 93
331 b, 94 b,
332 strong 95 strong
333 { 96 {
334 font-weight: $bold-weight; 97 font-weight: $bold-weight;
335 } 98 }
336 99
337 small 100 small
338 { 101 {
339 font-size: $small-font; 102 font-size: $small-font;
340 } 103 }
341 104
342 sup 105 sup
343 { 106 {
344 position: relative; 107 position: relative;
345 top: -0.5em;
346 /* Prevent `sub` and `sup` elements from affecting the line height in
saroyanm 2016/11/10 16:30:46 detail: I think this comment should refer to the l
juliandoucette 2016/11/10 17:42:08 Acknowledged. It does, according to normalize.css
juliandoucette 2016/11/11 16:27:10 Done. I moved and shortened the comment.
347 all browsers. */
348 font-size: 75%; 108 font-size: 75%;
349 line-height: 0px; 109 vertical-align: super;
350 vertical-align: baseline;
351 } 110 }
352
353 /* Links */
354 111
355 a, 112 a,
356 a:visited 113 a:visited
357 { 114 {
358 /* Set default color and decoration (opinionated) */
359 color: $accent; 115 color: $accent;
360 /* Remove the gray background on active links in IE 10. */ 116 /* Remove the gray background on active links in IE 10. */
361 background-color: transparent; 117 background-color: transparent;
362 text-decoration: none; 118 text-decoration: none;
119 /* Set default pointer regardless of href (opinionated) */
120 cursor: pointer;
363 } 121 }
364 122
365 a:hover, 123 a:hover,
366 a:active, 124 a:active,
367 a:focus 125 a:focus
368 { 126 {
369 /* Set default color and decoration (opinionated) */
370 text-decoration: underline; 127 text-decoration: underline;
371 } 128 }
372 129
373 /* Images */
374
375 img 130 img
376 { 131 {
377 margin: 0px $small-space / 2; 132 /* Make fixed width images responsive */
133 max-width: 100%;
378 /* Remove the border on images inside links in IE 10-. */ 134 /* Remove the border on images inside links in IE 10-. */
379 border-style: none; 135 border-style: none;
380 } 136 }
381 137
382 /* Alignment 138 hr
383 ******************************************************************************/
384
385 .block,
386 .float-start,
387 .float-end
388 { 139 {
389 display: block; 140 border: 1px solid $secondary-light;
390 margin: 0px 0px $small-space 0px;
391 } 141 }
392 142
393 /** Display full-width */ 143 blockquote
394
395 .block
396 { 144 {
397 display: block; 145 padding-left: 1em;
398 clear: both; 146 border-left: 5px solid $secondary;
399 overflow: auto;
400 width: 100%;
401 margin: $small-space 0px;
402 } 147 }
403 148
404 /** Float to start-of-line */ 149 [dir="rtl"] blockquote
405
406 [dir="ltr"] .float-start
407 { 150 {
408 float: left; 151 padding-right: 1em;
409 margin-right: $small-space; 152 padding-left: 0em;
153 border-right: 5px solid $secondary-light;
154 border-left: 0px;
410 } 155 }
411 156
412 [dir="rtl"] .float-start 157 ol,
158 ul
413 { 159 {
414 float: right; 160 padding-left: 1.5em;
415 margin-left: $small-space;
416 } 161 }
417 162
418 /** Float to end-of-line */ 163 [dir="rtl"] ol,
419 164 [dir="rtl"] ul
420 [dir="ltr"] .float-end
421 { 165 {
422 float: right; 166 padding-right: 2em;
423 margin-left: $small-space; 167 padding-left: 0em;
424 } 168 }
425 169
426 [dir="rtl"] .float-end 170 li
427 { 171 {
428 float: left; 172 margin: 0.5em 0em;
429 margin-right: $small-space;
430 } 173 }
174
175 ol ol,
176 ul ul,
177 ol ul,
178 ul ol
179 {
180 /* prevent double spacing lists */
181 margin: 0em;
182 }
183
184 ol ol
185 {
186 list-style-type: lower-alpha;
187 }
188
189 dt
190 {
191 /* undo browser default (opinionated)*/
192 font-weight: $bold-weight;
193 }
194
195 dd
196 {
197 margin: 0.5em 0em 1em 0em;
198 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld