| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 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 /*! | 19 /******************************************************************************* |
| 20 * This file contains parts of: | 20 * Content styles |
| 21 * - normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css | |
| 22 */ | |
| 23 | |
| 24 /* UDL content styles | |
|
juliandoucette
2016/11/11 16:27:19
Combined document title and TOC.
| |
| 25 ******************************************************************************* | 21 ******************************************************************************* |
| 26 * - Global | 22 * 1. Document |
| 27 * - Headings | 23 * 2. Headings |
| 28 * - Body content | 24 * 3. Body content |
|
juliandoucette
2016/11/11 16:27:18
Shortened TOC by removing 1-off elements/classes f
| |
| 29 * - Alignment | |
| 30 * - Responsive | |
| 31 ******************************************************************************/ | 25 ******************************************************************************/ |
| 32 | 26 |
| 33 /* Global | 27 /* Document |
| 34 ******************************************************************************/ | 28 ******************************************************************************/ |
| 35 | |
| 36 html | |
| 37 { | |
| 38 font-family: $sans-font; | |
| 39 font-size: $medium-font; | |
| 40 line-height: 1.15; | |
| 41 } | |
| 42 | |
| 43 /** | |
| 44 * Center content within a (responsive) fixed width | |
| 45 */ | |
| 46 .container | |
|
juliandoucette
2016/11/11 16:27:19
Removed .container-fluid because any block element
| |
| 47 { | |
| 48 max-width: 100%; | |
| 49 margin: 0px auto; | |
| 50 padding: 0px $small-space; | |
| 51 } | |
| 52 | |
| 53 .container:after | |
| 54 { | |
| 55 display: block; | |
| 56 clear: both; | |
| 57 content: ""; | |
| 58 } | |
| 59 | |
| 60 /** | |
| 61 * Clear all floating elements | |
| 62 */ | |
| 63 .clearfix | |
|
juliandoucette
2016/11/11 16:27:19
Separated clearfix because it can apply to contain
| |
| 64 { | |
| 65 display: block; | |
| 66 clear: both; | |
| 67 } | |
| 68 | 29 |
| 69 p, | 30 p, |
| 70 ol, | 31 ol, |
| 71 ul, | 32 ul, |
| 72 dl, | 33 dl, |
| 73 pre, | 34 pre, |
| 74 blockquote | 35 blockquote |
| 75 { | 36 { |
| 76 /* Set consistent margins (opinionated) */ | 37 /* Set consistent margins (opinionated) */ |
| 77 margin: $small-space 0px; | 38 margin: 1em 0em; |
| 78 } | 39 } |
| 79 | 40 |
| 80 /* Headings | 41 /* Headings |
|
juliandoucette
2016/11/11 16:27:18
Adjusted heading margin and font-size to be mobile
| |
| 81 ******************************************************************************/ | 42 ******************************************************************************/ |
| 82 | 43 |
| 83 h1, | 44 h1, |
| 84 h2, | 45 h2, |
| 85 h3, | 46 h3, |
| 86 h4, | 47 h4, |
| 87 h5, | 48 h5, |
| 88 h6 | 49 h6 |
| 89 { | 50 { |
| 90 margin: $small-space 0; | 51 /* Margin on top **only** (opinionated) */ |
| 91 } | 52 margin: 2em 0em 0em 0em; |
| 92 | |
| 93 h1, | |
| 94 h2 | |
| 95 { | |
| 96 font-weight: $thin-weight; | |
| 97 } | 53 } |
| 98 | 54 |
| 99 h1 | 55 h1 |
| 100 { | 56 { |
| 101 font-size: 24px; | 57 font-size: 2em; |
| 102 } | 58 } |
| 103 | 59 |
| 104 h2 | 60 h2 |
| 105 { | 61 { |
| 106 font-size: 22px; | 62 font-size: 1.5em; |
| 107 } | 63 } |
| 108 | 64 |
| 109 h3 | 65 h3 |
| 110 { | 66 { |
| 111 font-size: 18px; | 67 font-size: 1.25em; |
| 112 } | 68 } |
| 113 | 69 |
| 114 h4 | 70 h4 |
| 115 { | 71 { |
| 116 font-size: 16px; | 72 font-size: 1em; |
| 117 } | 73 } |
| 118 | 74 |
| 119 h5 | 75 h5 |
| 120 { | 76 { |
| 121 font-size: 14px; | 77 font-size: 0.8em; |
| 122 } | 78 } |
| 123 | 79 |
| 124 h6 | 80 h6 |
| 125 { | 81 { |
| 126 font-size: 12px; | 82 font-size: 0.7em; |
| 127 } | 83 } |
| 128 | 84 |
| 129 /* Body content | 85 /* Body content |
| 130 ******************************************************************************/ | 86 ******************************************************************************/ |
| 131 | 87 |
| 132 abbr | 88 abbr |
| 133 { | 89 { |
| 134 text-decoration: underline dotted; | 90 text-decoration: underline; |
| 135 cursor: help; | 91 cursor: help; |
| 136 } | 92 } |
| 137 | 93 |
| 138 b, | 94 b, |
| 139 strong | 95 strong |
| 140 { | 96 { |
| 141 font-weight: $bold-weight; | 97 font-weight: $bold-weight; |
| 142 } | 98 } |
| 143 | 99 |
| 144 small | 100 small |
| 145 { | 101 { |
| 146 font-size: $small-font; | 102 font-size: $small-font; |
| 147 } | 103 } |
| 148 | 104 |
| 149 sup | 105 sup |
| 150 { | 106 { |
| 151 position: relative; | 107 position: relative; |
| 152 top: -0.5em; | |
| 153 font-size: 75%; | 108 font-size: 75%; |
| 154 /* Prevent `sub` and `sup` elements from affecting the line height */ | 109 vertical-align: super; |
| 155 line-height: 0px; | |
| 156 vertical-align: baseline; | |
| 157 } | 110 } |
| 158 | 111 |
| 159 a, | 112 a, |
| 160 a:visited | 113 a:visited |
| 161 { | 114 { |
| 162 /* Set default color and decoration (opinionated) */ | |
| 163 color: $accent; | 115 color: $accent; |
| 164 /* Remove the gray background on active links in IE 10. */ | 116 /* Remove the gray background on active links in IE 10. */ |
| 165 background-color: transparent; | 117 background-color: transparent; |
| 166 text-decoration: none; | 118 text-decoration: none; |
| 119 /* Set default pointer regardless of href (opinionated) */ | |
| 120 cursor: pointer; | |
| 167 } | 121 } |
| 168 | 122 |
| 169 a:hover, | 123 a:hover, |
| 170 a:active, | 124 a:active, |
| 171 a:focus | 125 a:focus |
| 172 { | 126 { |
| 173 /* Set default color and decoration (opinionated) */ | |
| 174 text-decoration: underline; | 127 text-decoration: underline; |
| 175 } | 128 } |
| 176 | 129 |
| 177 img | 130 img |
| 178 { | 131 { |
| 179 margin: 0px $small-space / 2; | 132 /* Make fixed width images responsive */ |
| 133 max-width: 100%; | |
| 180 /* Remove the border on images inside links in IE 10-. */ | 134 /* Remove the border on images inside links in IE 10-. */ |
| 181 border-style: none; | 135 border-style: none; |
| 182 } | 136 } |
| 183 | 137 |
| 184 hr | 138 hr |
| 185 { | 139 { |
| 186 border-top: 0px; | 140 border: 1px solid $secondary-light; |
| 187 border-bottom: 2px solid $gray; | |
| 188 } | 141 } |
| 189 | 142 |
| 190 [dir="ltr"] blockquote | 143 blockquote |
| 191 { | 144 { |
| 192 padding-left: $small-space; | 145 padding-left: 1em; |
| 193 border-left: 5px solid $gray; | 146 border-left: 5px solid $secondary; |
| 194 } | 147 } |
| 195 | 148 |
| 196 [dir="rtl"] blockquote | 149 [dir="rtl"] blockquote |
| 197 { | 150 { |
| 198 padding-right: $small-space; | 151 padding-right: 1em; |
| 199 border-right: 5px solid $gray; | 152 padding-left: 0em; |
| 153 border-right: 5px solid $secondary-light; | |
| 154 border-left: 0px; | |
| 200 } | 155 } |
| 201 | 156 |
| 202 pre | 157 ol, |
| 158 ul | |
| 203 { | 159 { |
| 204 overflow: auto; | 160 padding-left: 1.5em; |
| 205 padding: 0px $small-space; | |
| 206 } | |
| 207 | |
| 208 code | |
| 209 { | |
| 210 padding: 0px $small-space / 4; | |
| 211 } | |
| 212 | |
| 213 pre, | |
| 214 code | |
| 215 { | |
| 216 background-color: $gray-light; | |
| 217 font-family: $monospace-font; | |
| 218 font-size: $medium-font; | |
| 219 } | |
| 220 | |
| 221 pre code | |
| 222 { | |
| 223 padding: 0px; | |
| 224 } | |
| 225 | |
| 226 [dir="ltr"] ol, | |
| 227 [dir="ltr"] ul | |
| 228 { | |
| 229 padding-left: $small-space * 1.5; | |
| 230 } | 161 } |
| 231 | 162 |
| 232 [dir="rtl"] ol, | 163 [dir="rtl"] ol, |
| 233 [dir="rtl"] ul | 164 [dir="rtl"] ul |
| 234 { | 165 { |
| 235 padding-right: $small-space * 1.5; | 166 padding-right: 2em; |
| 167 padding-left: 0em; | |
| 236 } | 168 } |
| 237 | 169 |
| 238 li | 170 li |
| 239 { | 171 { |
| 240 margin: $small-space / 2 0px; | 172 margin: 0.5em 0em; |
| 241 } | 173 } |
| 242 | 174 |
| 243 ol ol, | 175 ol ol, |
| 244 ul ul, | 176 ul ul, |
| 245 ol ul, | 177 ol ul, |
| 246 ul ol | 178 ul ol |
| 247 { | 179 { |
| 248 /* prevent double spacing lists */ | 180 /* prevent double spacing lists */ |
| 249 margin: 0px; | 181 margin: 0em; |
| 250 } | 182 } |
| 251 | 183 |
| 252 ol ol | 184 ol ol |
| 253 { | 185 { |
| 254 list-style-type: lower-alpha; | 186 list-style-type: lower-alpha; |
| 255 } | 187 } |
| 256 | 188 |
| 257 dt | 189 dt |
| 258 { | 190 { |
| 259 /* undo browser default (opinionated)*/ | 191 /* undo browser default (opinionated)*/ |
| 260 font-weight: $bold-weight; | 192 font-weight: $bold-weight; |
| 261 } | 193 } |
| 262 | 194 |
| 263 dd | 195 dd |
| 264 { | 196 { |
| 265 margin: $small-space / 2 0px $small-space 0px; | 197 margin: 0.5em 0em 1em 0em; |
| 266 } | 198 } |
| 267 | |
| 268 /** | |
| 269 * Remove list style from vertical lists | |
| 270 */ | |
| 271 .unstyled-list, | |
| 272 { | |
| 273 list-style-type: none; | |
| 274 } | |
| 275 | |
| 276 [dir="ltr"] .unstyled-list | |
| 277 { | |
| 278 padding-left: 0px; | |
| 279 } | |
| 280 | |
| 281 [dir="rtl"] .unstyled-list | |
| 282 { | |
| 283 padding-right: 0px; | |
| 284 } | |
| 285 | |
| 286 [dir="ltr"] .unstyled-list .unstyled-list | |
| 287 { | |
| 288 padding-left: $medium-space; | |
| 289 } | |
| 290 | |
| 291 [dir="rtl"] .unstyled-list .unstyled-list | |
| 292 { | |
| 293 padding-right: $small-space; | |
| 294 } | |
| 295 | |
| 296 audio, | |
| 297 video | |
| 298 { | |
| 299 /* undo browser default (opinionated) */ | |
| 300 display: block; | |
| 301 } | |
| 302 | |
| 303 /** | |
| 304 * Embed 16 by 9 iframe video | |
| 305 */ | |
| 306 .embed | |
| 307 { | |
| 308 display: block; | |
| 309 position: relative; | |
| 310 overflow: hidden; | |
| 311 padding: 0% 0% 56.25% 0%; | |
| 312 } | |
| 313 | |
| 314 .embed iframe | |
| 315 { | |
| 316 position: absolute; | |
| 317 top: 0px; | |
| 318 left: 0px; | |
| 319 width: 100%; | |
| 320 height: 100%; | |
| 321 /* undo browser default */ | |
| 322 border: 0px; | |
| 323 } | |
| 324 | |
| 325 /* Alignment | |
| 326 ******************************************************************************/ | |
| 327 | |
| 328 /** | |
| 329 * Clear and stretch element full-width | |
| 330 */ | |
| 331 .full-width | |
|
juliandoucette
2016/11/11 16:27:18
Changed .block class back to .full-width for simpl
| |
| 332 { | |
| 333 display: block; | |
| 334 clear: both; | |
| 335 overflow: auto; | |
| 336 width: 100%; | |
| 337 margin: $small-space 0px; | |
| 338 } | |
| 339 | |
| 340 .float-start, | |
| 341 .float-end | |
| 342 { | |
| 343 display: block; | |
| 344 margin: 0px 0px $small-space 0px; | |
| 345 } | |
| 346 | |
| 347 /** | |
| 348 * Float to start-of-line | |
| 349 */ | |
| 350 [dir="ltr"] .float-start | |
| 351 { | |
| 352 float: left; | |
| 353 margin-right: $small-space; | |
| 354 } | |
| 355 | |
| 356 [dir="rtl"] .float-start | |
| 357 { | |
| 358 float: right; | |
| 359 margin-left: $small-space; | |
| 360 } | |
| 361 | |
| 362 /** | |
| 363 * Float to end-of-line | |
| 364 */ | |
| 365 [dir="ltr"] .float-end | |
| 366 { | |
| 367 float: right; | |
| 368 margin-left: $small-space; | |
| 369 } | |
| 370 | |
| 371 [dir="rtl"] .float-end | |
| 372 { | |
| 373 float: left; | |
| 374 margin-right: $small-space; | |
| 375 } | |
| 376 | |
| 377 /* Responsive | |
| 378 ******************************************************************************/ | |
| 379 | |
| 380 @media(min-width: $mobile-breakpoint) | |
| 381 { | |
| 382 .container | |
|
juliandoucette
2016/11/11 16:32:44
Moved mobile .container width into media query for
| |
| 383 { | |
| 384 width: $mobile-width; | |
| 385 } | |
| 386 | |
| 387 h1, | |
| 388 h2, | |
| 389 h3, | |
| 390 h4, | |
| 391 h5, | |
| 392 h6 | |
| 393 { | |
| 394 margin: $medium-space 0 $small-space 0; | |
| 395 } | |
| 396 | |
| 397 h1 | |
| 398 { | |
| 399 font-size: 48px; | |
| 400 } | |
| 401 | |
| 402 h2 | |
| 403 { | |
| 404 font-size: 36px; | |
| 405 } | |
| 406 | |
| 407 h3 | |
| 408 { | |
| 409 font-size: 24px; | |
| 410 } | |
| 411 | |
| 412 h4 | |
| 413 { | |
| 414 font-size: 20px; | |
| 415 } | |
| 416 | |
| 417 h5 | |
| 418 { | |
| 419 font-size: 16px; | |
| 420 } | |
| 421 | |
| 422 h6 | |
| 423 { | |
| 424 font-size: 14px; | |
| 425 } | |
| 426 } | |
| 427 | |
| 428 @media(min-width: $tablet-breakpoint) | |
| 429 { | |
| 430 .container | |
| 431 { | |
| 432 width: $tablet-width; | |
| 433 } | |
| 434 } | |
| 435 | |
| 436 @media(min-width: $desktop-breakpoint) | |
| 437 { | |
| 438 .container | |
| 439 { | |
| 440 width: $desktop-width; | |
| 441 } | |
| 442 } | |
| LEFT | RIGHT |