├── .gitattributes ├── 01 - Introduction to CSS ├── Listing_1-1.html ├── Listing_1-10.css ├── Listing_1-11.scss ├── Listing_1-12.css ├── Listing_1-13.scss ├── Listing_1-14.html ├── Listing_1-15.css ├── Listing_1-2.css ├── Listing_1-3.css ├── Listing_1-4.html ├── Listing_1-5.html ├── Listing_1-6.html ├── Listing_1-7.css ├── Listing_1-8.css ├── Listing_1-9.scss └── desktop.ini ├── 02 - CSS Selectors ├── Listing_2-1.css ├── Listing_2-10.html ├── Listing_2-2.css ├── Listing_2-3.css ├── Listing_2-4.css ├── Listing_2-5.html ├── Listing_2-6.html ├── Listing_2-7.html ├── Listing_2-8.html ├── Listing_2-9.css └── desktop.ini ├── 03 - Basic CSS Concepts ├── Listing_3-1.html ├── Listing_3-10.css ├── Listing_3-11.css ├── Listing_3-12.html ├── Listing_3-13.html ├── Listing_3-14.html ├── Listing_3-15.html ├── Listing_3-16.html ├── Listing_3-17.html ├── Listing_3-18.html ├── Listing_3-2.html ├── Listing_3-3.css ├── Listing_3-4.html ├── Listing_3-5.html ├── Listing_3-6.html ├── Listing_3-7.html ├── Listing_3-8.html ├── Listing_3-9.css └── desktop.ini ├── 04 - Basic Styling ├── Listing_4-1.html ├── Listing_4-10.html ├── Listing_4-11.html ├── Listing_4-12.html ├── Listing_4-13.html ├── Listing_4-14.html ├── Listing_4-15.html ├── Listing_4-16.html ├── Listing_4-2.html ├── Listing_4-3.html ├── Listing_4-4.html ├── Listing_4-5.css ├── Listing_4-6.html ├── Listing_4-7.html ├── Listing_4-8.html ├── Listing_4-9.html └── desktop.ini ├── 05 - Backgrounds and Gradients ├── Listing_5-1.html ├── Listing_5-10.html ├── Listing_5-11.html ├── Listing_5-12.html ├── Listing_5-13.html ├── Listing_5-14.html ├── Listing_5-15.html ├── Listing_5-16.html ├── Listing_5-17.html ├── Listing_5-18.html ├── Listing_5-19.html ├── Listing_5-2.html ├── Listing_5-20.html ├── Listing_5-21.html ├── Listing_5-22.html ├── Listing_5-23.html ├── Listing_5-24.html ├── Listing_5-25.html ├── Listing_5-26.html ├── Listing_5-27.html ├── Listing_5-28.html ├── Listing_5-3.html ├── Listing_5-4.html ├── Listing_5-5.html ├── Listing_5-6.html ├── Listing_5-7.html ├── Listing_5-8.html ├── Listing_5-9.html ├── desktop.ini ├── mountains.jpg └── tiles.jpg ├── 06 - Text Styling ├── Listing_6-1.css ├── Listing_6-10.html ├── Listing_6-11.html ├── Listing_6-12.html ├── Listing_6-13.html ├── Listing_6-14.html ├── Listing_6-15.html ├── Listing_6-16.html ├── Listing_6-17.css ├── Listing_6-18.css ├── Listing_6-19.html ├── Listing_6-2.html ├── Listing_6-20.html ├── Listing_6-3.html ├── Listing_6-4.html ├── Listing_6-5.html ├── Listing_6-6.html ├── Listing_6-7.html ├── Listing_6-8.html └── Listing_6-9.html ├── 07 - Layout and Positioning ├── Listing_7-1.html ├── Listing_7-10.html ├── Listing_7-11.html ├── Listing_7-12.html ├── Listing_7-13.html ├── Listing_7-14.html ├── Listing_7-15.html ├── Listing_7-16.html ├── Listing_7-17.html ├── Listing_7-2.html ├── Listing_7-3.html ├── Listing_7-4.html ├── Listing_7-5.html ├── Listing_7-6.html ├── Listing_7-7.html ├── Listing_7-8.html ├── Listing_7-9.html └── desktop.ini ├── 08 - Transforms ├── Listing_8-1.html ├── Listing_8-10.html ├── Listing_8-11.html ├── Listing_8-12.html ├── Listing_8-13.html ├── Listing_8-14.html ├── Listing_8-15.html ├── Listing_8-16.html ├── Listing_8-2.html ├── Listing_8-3.html ├── Listing_8-4.html ├── Listing_8-5.html ├── Listing_8-6.html ├── Listing_8-7.html ├── Listing_8-8.html ├── Listing_8-9.html └── desktop.ini ├── 09 - Transitions and Animations ├── Listing_9-1.css ├── Listing_9-10.html ├── Listing_9-11.css ├── Listing_9-2.css ├── Listing_9-3.css ├── Listing_9-4.css ├── Listing_9-5.css ├── Listing_9-6.html ├── Listing_9-7.html ├── Listing_9-8.html ├── Listing_9-9.css └── desktop.ini ├── 10 - Flexbox ├── Listing_10-1.html ├── Listing_10-10.html ├── Listing_10-2.html ├── Listing_10-3.html ├── Listing_10-4.html ├── Listing_10-5.html ├── Listing_10-6.html ├── Listing_10-7.html ├── Listing_10-8.html ├── Listing_10-9.html └── desktop.ini ├── 11 - Responsive Design ├── Listing_11-1.css ├── Listing_11-10.css ├── Listing_11-11.css ├── Listing_11-2.css ├── Listing_11-3.css ├── Listing_11-4.css ├── Listing_11-5.html ├── Listing_11-6.html ├── Listing_11-7.css ├── Listing_11-8.html ├── Listing_11-9.css ├── cat.jpeg └── desktop.ini ├── 12 - CSS Grid ├── Listing_12-1.html ├── Listing_12-10.css ├── Listing_12-11.css ├── Listing_12-12.css ├── Listing_12-13.css ├── Listing_12-14.css ├── Listing_12-15.html ├── Listing_12-16.html ├── Listing_12-2.html ├── Listing_12-3.html ├── Listing_12-4.html ├── Listing_12-5.css ├── Listing_12-6.css ├── Listing_12-7.css ├── Listing_12-8.css ├── Listing_12-9.html └── desktop.ini ├── 9781484262931.jpg ├── Contributing.md ├── LICENSE.txt ├── README.md └── errata.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /01 - Introduction to CSS/Listing_1-1.html: -------------------------------------------------------------------------------- 1 | 4 | Hello world! 5 | 6 | -------------------------------------------------------------------------------- /01 - Introduction to CSS/Listing_1-10.css: -------------------------------------------------------------------------------- 1 | .header { 2 | background-color: red; 3 | } 4 | 5 | .header h1 { 6 | font-size: 24px; 7 | } 8 | -------------------------------------------------------------------------------- /01 - Introduction to CSS/Listing_1-11.scss: -------------------------------------------------------------------------------- 1 | $header-color: red; 2 | 3 | .header { 4 | background-color: $header-color; 5 | } 6 | -------------------------------------------------------------------------------- /01 - Introduction to CSS/Listing_1-12.css: -------------------------------------------------------------------------------- 1 | .header { 2 | display: -webkit-flex; 3 | display: -ms-flexbox; 4 | display: flex; 5 | } 6 | -------------------------------------------------------------------------------- /01 - Introduction to CSS/Listing_1-13.scss: -------------------------------------------------------------------------------- 1 | @mixin flexbox { 2 | display: -webkit-flex; 3 | display: -ms-flexbox; 4 | display: flex; 5 | } 6 | 7 | .header { 8 | @include flexbox; 9 | } 10 | -------------------------------------------------------------------------------- /01 - Introduction to CSS/Listing_1-14.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Hello World

4 |
5 |

Subtitle

6 |

Hello world!

7 |
8 | 9 | 10 | -------------------------------------------------------------------------------- /01 - Introduction to CSS/Listing_1-15.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-size: 16px; 3 | } 4 | 5 | h1 { 6 | font-size: 1.5rem; 7 | color: orangered; 8 | } 9 | 10 | div { 11 | padding: 1rem; 12 | } 13 | 14 | div h2 { 15 | font-size: 1.2rem; 16 | color: blue; 17 | } 18 | 19 | div p { 20 | font-size: 0.9rem; 21 | color: gray; 22 | } 23 | -------------------------------------------------------------------------------- /01 - Introduction to CSS/Listing_1-2.css: -------------------------------------------------------------------------------- 1 | .header { 2 | background-color: red; 3 | background-color: blue; 4 | } 5 | -------------------------------------------------------------------------------- /01 - Introduction to CSS/Listing_1-3.css: -------------------------------------------------------------------------------- 1 | /* This is a comment outside of a rule */ 2 | 3 | .header { 4 | /* This is a comment inside of a rule */ 5 | background-color: red; 6 | } 7 | -------------------------------------------------------------------------------- /01 - Introduction to CSS/Listing_1-4.html: -------------------------------------------------------------------------------- 1 |
2 | Hello world! 3 |
4 | -------------------------------------------------------------------------------- /01 - Introduction to CSS/Listing_1-5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 |
Hello world!
12 | 13 | 14 | -------------------------------------------------------------------------------- /01 - Introduction to CSS/Listing_1-6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
Hello world!
8 | 9 | 10 | -------------------------------------------------------------------------------- /01 - Introduction to CSS/Listing_1-7.css: -------------------------------------------------------------------------------- 1 | div { 2 | background-color: red; 3 | } -------------------------------------------------------------------------------- /01 - Introduction to CSS/Listing_1-8.css: -------------------------------------------------------------------------------- 1 | @keyframes spin { 2 | from { transform: rotate(0); } 3 | to { transform: rotate(360deg); } 4 | } 5 | 6 | @-moz-keyframes spin { 7 | from { -moz-transform: rotate(0); } 8 | to { -moz-transform: rotate(360deg); } 9 | } 10 | 11 | @-webkit-keyframes spin { 12 | from { -webkit-transform: rotate(0); } 13 | to { -webkit-transform: rotate(360deg); } 14 | } 15 | -------------------------------------------------------------------------------- /01 - Introduction to CSS/Listing_1-9.scss: -------------------------------------------------------------------------------- 1 | .header { 2 | background-color: red; 3 | 4 | h1 { 5 | font-size: 24px; 6 | } 7 | } -------------------------------------------------------------------------------- /01 - Introduction to CSS/desktop.ini: -------------------------------------------------------------------------------- 1 | [.ShellClassInfo] 2 | ConfirmFileOp=0 3 | IconResource=C:\Program Files\Google\Drive File Stream\42.0.11.0\GoogleDriveFS.exe,21 4 | -------------------------------------------------------------------------------- /02 - CSS Selectors/Listing_2-1.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | } 4 | -------------------------------------------------------------------------------- /02 - CSS Selectors/Listing_2-10.html: -------------------------------------------------------------------------------- 1 | 11 | 12 |
My Profile
13 | -------------------------------------------------------------------------------- /02 - CSS Selectors/Listing_2-2.css: -------------------------------------------------------------------------------- 1 | p { 2 | margin: 25px; 3 | } 4 | -------------------------------------------------------------------------------- /02 - CSS Selectors/Listing_2-3.css: -------------------------------------------------------------------------------- 1 | #header { 2 | padding: 25px; 3 | } 4 | -------------------------------------------------------------------------------- /02 - CSS Selectors/Listing_2-4.css: -------------------------------------------------------------------------------- 1 | .nav-link { 2 | color: darkcyan; 3 | } 4 | -------------------------------------------------------------------------------- /02 - CSS Selectors/Listing_2-5.html: -------------------------------------------------------------------------------- 1 |
Hello World
2 |
HelloWorld
3 | -------------------------------------------------------------------------------- /02 - CSS Selectors/Listing_2-6.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 | -------------------------------------------------------------------------------- /02 - CSS Selectors/Listing_2-7.html: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /02 - CSS Selectors/Listing_2-8.html: -------------------------------------------------------------------------------- 1 | Google 2 | -------------------------------------------------------------------------------- /02 - CSS Selectors/Listing_2-9.css: -------------------------------------------------------------------------------- 1 | .external-link::after { 2 | content: " (external)" 3 | color: green; 4 | } 5 | -------------------------------------------------------------------------------- /02 - CSS Selectors/desktop.ini: -------------------------------------------------------------------------------- 1 | [.ShellClassInfo] 2 | ConfirmFileOp=0 3 | IconResource=C:\Program Files\Google\Drive File Stream\42.0.11.0\GoogleDriveFS.exe,21 4 | -------------------------------------------------------------------------------- /03 - Basic CSS Concepts/Listing_3-1.html: -------------------------------------------------------------------------------- 1 | 14 | 15 |
Hello world!
16 |
Hello world!
17 | -------------------------------------------------------------------------------- /03 - Basic CSS Concepts/Listing_3-10.css: -------------------------------------------------------------------------------- 1 | .header { 2 | font-size: 24px; 3 | padding: 0.5em; 4 | } 5 | 6 | .header li { 7 | font-size: 0.75em; 8 | } 9 | 10 | .header li a { 11 | font-size: 0.5em; 12 | } 13 | -------------------------------------------------------------------------------- /03 - Basic CSS Concepts/Listing_3-11.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --spacing: 0.5rem 3 | } 4 | 5 | .container { 6 | padding: calc(var(--spacing) * 2); 7 | } 8 | -------------------------------------------------------------------------------- /03 - Basic CSS Concepts/Listing_3-12.html: -------------------------------------------------------------------------------- 1 | 8 | 9 |
10 | This is some really long text that will overflow the container. 11 |
12 | -------------------------------------------------------------------------------- /03 - Basic CSS Concepts/Listing_3-13.html: -------------------------------------------------------------------------------- 1 | 14 | 15 |
16 | 17 | This is some really long text that will overflow the container. 18 |
19 | -------------------------------------------------------------------------------- /03 - Basic CSS Concepts/Listing_3-14.html: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 | This is some really long text that will overflow the container. 12 |
13 | -------------------------------------------------------------------------------- /03 - Basic CSS Concepts/Listing_3-15.html: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 |

Welcome

14 |
15 | -------------------------------------------------------------------------------- /03 - Basic CSS Concepts/Listing_3-16.html: -------------------------------------------------------------------------------- 1 | 11 | 12 |
Hello World!
13 | -------------------------------------------------------------------------------- /03 - Basic CSS Concepts/Listing_3-17.html: -------------------------------------------------------------------------------- 1 | 17 | 18 |
Hello World!
19 | -------------------------------------------------------------------------------- /03 - Basic CSS Concepts/Listing_3-18.html: -------------------------------------------------------------------------------- 1 | 18 | 19 |
20 |
Row one
21 |
Row two
22 |
Row three
23 |
Row four
24 |
Row five
25 |
Row six
26 |
27 | -------------------------------------------------------------------------------- /03 - Basic CSS Concepts/Listing_3-2.html: -------------------------------------------------------------------------------- 1 | 17 | 18 |
Hello world!
19 |
Hello world!
20 | -------------------------------------------------------------------------------- /03 - Basic CSS Concepts/Listing_3-3.css: -------------------------------------------------------------------------------- 1 | .box { 2 | width: 100px; 3 | height: 100px; 4 | padding: 10px; 5 | border: 2px solid red; 6 | } 7 | -------------------------------------------------------------------------------- /03 - Basic CSS Concepts/Listing_3-4.html: -------------------------------------------------------------------------------- 1 | 16 | 17 |
18 |
Hello
19 |
World
20 |
21 | -------------------------------------------------------------------------------- /03 - Basic CSS Concepts/Listing_3-5.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | Hello world, I am demonstrating an inline element. 8 | -------------------------------------------------------------------------------- /03 - Basic CSS Concepts/Listing_3-6.html: -------------------------------------------------------------------------------- 1 | 12 | 13 |
14 | Hello world, I am demonstrating an inline element. 15 |
16 | -------------------------------------------------------------------------------- /03 - Basic CSS Concepts/Listing_3-7.html: -------------------------------------------------------------------------------- 1 | 15 | 16 |
17 | Hello world, I am demonstrating an inline element. 18 |
19 | -------------------------------------------------------------------------------- /03 - Basic CSS Concepts/Listing_3-8.html: -------------------------------------------------------------------------------- 1 | 16 | 17 |
18 | Hello world, I am demonstrating an inline-block element. 19 |
20 | -------------------------------------------------------------------------------- /03 - Basic CSS Concepts/Listing_3-9.css: -------------------------------------------------------------------------------- 1 | .header { 2 | font-size: 24px; 3 | padding: 0.5em; 4 | } 5 | -------------------------------------------------------------------------------- /03 - Basic CSS Concepts/desktop.ini: -------------------------------------------------------------------------------- 1 | [.ShellClassInfo] 2 | ConfirmFileOp=0 3 | IconResource=C:\Program Files\Google\Drive File Stream\42.0.11.0\GoogleDriveFS.exe,21 4 | -------------------------------------------------------------------------------- /04 - Basic Styling/Listing_4-1.html: -------------------------------------------------------------------------------- 1 | 8 | 9 |
Hello world!
10 | -------------------------------------------------------------------------------- /04 - Basic Styling/Listing_4-10.html: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 | -------------------------------------------------------------------------------- /04 - Basic Styling/Listing_4-11.html: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 | -------------------------------------------------------------------------------- /04 - Basic Styling/Listing_4-12.html: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 | -------------------------------------------------------------------------------- /04 - Basic Styling/Listing_4-13.html: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 | -------------------------------------------------------------------------------- /04 - Basic Styling/Listing_4-14.html: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 | -------------------------------------------------------------------------------- /04 - Basic Styling/Listing_4-15.html: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 | -------------------------------------------------------------------------------- /04 - Basic Styling/Listing_4-16.html: -------------------------------------------------------------------------------- 1 | 16 | 17 |
18 |
19 | Hello World! 20 |
21 |
22 | -------------------------------------------------------------------------------- /04 - Basic Styling/Listing_4-2.html: -------------------------------------------------------------------------------- 1 | 8 | 9 |
Hello world!
10 | -------------------------------------------------------------------------------- /04 - Basic Styling/Listing_4-3.html: -------------------------------------------------------------------------------- 1 | 8 | 9 |
Hello world!
10 | -------------------------------------------------------------------------------- /04 - Basic Styling/Listing_4-4.html: -------------------------------------------------------------------------------- 1 | 8 | 9 |
Hello world!
10 | -------------------------------------------------------------------------------- /04 - Basic Styling/Listing_4-5.css: -------------------------------------------------------------------------------- 1 | .container { 2 | border: 5px solid red; 3 | } 4 | -------------------------------------------------------------------------------- /04 - Basic Styling/Listing_4-6.html: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 | -------------------------------------------------------------------------------- /04 - Basic Styling/Listing_4-7.html: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 | -------------------------------------------------------------------------------- /04 - Basic Styling/Listing_4-8.html: -------------------------------------------------------------------------------- 1 | 12 | 13 |
14 | -------------------------------------------------------------------------------- /04 - Basic Styling/Listing_4-9.html: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 | -------------------------------------------------------------------------------- /04 - Basic Styling/desktop.ini: -------------------------------------------------------------------------------- 1 | [.ShellClassInfo] 2 | ConfirmFileOp=0 3 | IconResource=C:\Program Files\Google\Drive File Stream\42.0.11.0\GoogleDriveFS.exe,21 4 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-1.html: -------------------------------------------------------------------------------- 1 | 6 | 7 |
Hello world!
8 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-10.html: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 |

Welcome to my site

12 |
13 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-11.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 |

Welcome to my site

13 |
14 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-12.html: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 |

Welcome to my site

12 |
13 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-13.html: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 |

Welcome to my site

14 |
15 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-14.html: -------------------------------------------------------------------------------- 1 | 8 | 9 |
10 |

Welcome to my site

11 |
12 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-15.html: -------------------------------------------------------------------------------- 1 | 8 | 9 |
10 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-16.html: -------------------------------------------------------------------------------- 1 | 8 | 9 |
10 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-17.html: -------------------------------------------------------------------------------- 1 | 12 | 13 |
14 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-18.html: -------------------------------------------------------------------------------- 1 | 12 | 13 |
14 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-19.html: -------------------------------------------------------------------------------- 1 | 12 | 13 |
14 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-2.html: -------------------------------------------------------------------------------- 1 | 8 | 9 |
10 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-20.html: -------------------------------------------------------------------------------- 1 | 12 | 13 |
14 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-21.html: -------------------------------------------------------------------------------- 1 | 14 | 15 |
16 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-22.html: -------------------------------------------------------------------------------- 1 | 8 | 9 |
10 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-23.html: -------------------------------------------------------------------------------- 1 | 12 | 13 |
14 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-24.html: -------------------------------------------------------------------------------- 1 | 12 | 13 |
14 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-25.html: -------------------------------------------------------------------------------- 1 | 12 | 13 |
14 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-26.html: -------------------------------------------------------------------------------- 1 | 12 | 13 |
14 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-27.html: -------------------------------------------------------------------------------- 1 | 15 | 16 |
17 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-28.html: -------------------------------------------------------------------------------- 1 | 15 | 16 |
17 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-3.html: -------------------------------------------------------------------------------- 1 | 8 | 9 |
10 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-4.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-5.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-6.html: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-7.html: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-8.html: -------------------------------------------------------------------------------- 1 | 8 | 9 |
10 |

Welcome to my site

11 |
12 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/Listing_5-9.html: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 |

Welcome to my site

12 |
13 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/desktop.ini: -------------------------------------------------------------------------------- 1 | [.ShellClassInfo] 2 | ConfirmFileOp=0 3 | IconResource=C:\Program Files\Google\Drive File Stream\42.0.11.0\GoogleDriveFS.exe,21 4 | -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/mountains.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/modern-css/cea922754a117becdfcff9e15002909760d7484b/05 - Backgrounds and Gradients/mountains.jpg -------------------------------------------------------------------------------- /05 - Backgrounds and Gradients/tiles.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/modern-css/cea922754a117becdfcff9e15002909760d7484b/05 - Backgrounds and Gradients/tiles.jpg -------------------------------------------------------------------------------- /06 - Text Styling/Listing_6-1.css: -------------------------------------------------------------------------------- 1 | .hello { 2 | font-family: 3 | Georgia, 4 | 'Times New Roman', 5 | serif; 6 | } 7 | -------------------------------------------------------------------------------- /06 - Text Styling/Listing_6-10.html: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 | Here is some text 10 | with 11 | whitespace. 12 |
13 | -------------------------------------------------------------------------------- /06 - Text Styling/Listing_6-11.html: -------------------------------------------------------------------------------- 1 | 8 | 9 |
10 | Here is some text 11 | with 12 | whitespace. 13 |
14 | -------------------------------------------------------------------------------- /06 - Text Styling/Listing_6-12.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
Here is a really really long string.
12 | -------------------------------------------------------------------------------- /06 - Text Styling/Listing_6-13.html: -------------------------------------------------------------------------------- 1 | 8 | 9 |
Hello world!
10 | -------------------------------------------------------------------------------- /06 - Text Styling/Listing_6-14.html: -------------------------------------------------------------------------------- 1 | 11 | 12 |
Hello world!
13 | -------------------------------------------------------------------------------- /06 - Text Styling/Listing_6-15.html: -------------------------------------------------------------------------------- 1 | 18 | 19 |
20 | Hello 21 | World! 22 |
23 | -------------------------------------------------------------------------------- /06 - Text Styling/Listing_6-16.html: -------------------------------------------------------------------------------- 1 | 20 | 21 |
22 | Hello 23 | World! 24 |
25 | -------------------------------------------------------------------------------- /06 - Text Styling/Listing_6-17.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'SomeWebFont'; 3 | src: 4 | url('/some-font.woff2') format('woff2'), 5 | url('/some-font.woff') format('woff'); 6 | } 7 | 8 | body { 9 | font-family: SomeWebFont, Arial, sans-serif; 10 | } 11 | -------------------------------------------------------------------------------- /06 - Text Styling/Listing_6-18.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'SomeWebFont'; 3 | src: url('/some-font.woff2') format('woff2'); 4 | font-weight: 400; 5 | } 6 | 7 | @font-face { 8 | font-family: 'SomeWebFont'; 9 | src: url('/some-font-bold.woff2') format('woff2'); 10 | font-weight: 700; 11 | } 12 | -------------------------------------------------------------------------------- /06 - Text Styling/Listing_6-19.html: -------------------------------------------------------------------------------- 1 | 8 | 9 |
Hello World!
10 | -------------------------------------------------------------------------------- /06 - Text Styling/Listing_6-2.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | I'm the parent 13 |
14 | I'm the child 15 |
16 |
17 | -------------------------------------------------------------------------------- /06 - Text Styling/Listing_6-20.html: -------------------------------------------------------------------------------- 1 | 8 | 9 |
Hello World!
10 | -------------------------------------------------------------------------------- /06 - Text Styling/Listing_6-3.html: -------------------------------------------------------------------------------- 1 | 14 | 15 |
One
16 |
Two
17 | -------------------------------------------------------------------------------- /06 - Text Styling/Listing_6-4.html: -------------------------------------------------------------------------------- 1 | 14 | 15 |
Underlined text
16 |
Strikethrough text
17 |
No text decoration
18 | -------------------------------------------------------------------------------- /06 - Text Styling/Listing_6-5.html: -------------------------------------------------------------------------------- 1 | 26 | 27 |
Solid blue underline
28 |
Double green underline
29 |
Dotted black underline
30 |
Dashed purple underline
31 |
Wavy red underline
32 | -------------------------------------------------------------------------------- /06 - Text Styling/Listing_6-6.html: -------------------------------------------------------------------------------- 1 | 6 | 7 |
Hello world!
8 | -------------------------------------------------------------------------------- /06 - Text Styling/Listing_6-7.html: -------------------------------------------------------------------------------- 1 | 6 | 7 |
Hello world!
8 | -------------------------------------------------------------------------------- /06 - Text Styling/Listing_6-8.html: -------------------------------------------------------------------------------- 1 | 6 | 7 |
Hello world!
8 | -------------------------------------------------------------------------------- /06 - Text Styling/Listing_6-9.html: -------------------------------------------------------------------------------- 1 | 8 | 9 |
Here is a brief paragraph that has enough content to wrap a few lines.
10 | -------------------------------------------------------------------------------- /07 - Layout and Positioning/Listing_7-1.html: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 |
Hello world!
14 |
15 | -------------------------------------------------------------------------------- /07 - Layout and Positioning/Listing_7-10.html: -------------------------------------------------------------------------------- 1 | 23 | 24 |
25 |
26 |
27 |
28 |
29 | -------------------------------------------------------------------------------- /07 - Layout and Positioning/Listing_7-11.html: -------------------------------------------------------------------------------- 1 | 24 | 25 |
26 |
27 |
28 |
29 |
30 | -------------------------------------------------------------------------------- /07 - Layout and Positioning/Listing_7-12.html: -------------------------------------------------------------------------------- 1 | 26 | 27 |
28 |
29 |
Header
30 |
31 | Some other page content 32 |
33 |
34 | -------------------------------------------------------------------------------- /07 - Layout and Positioning/Listing_7-13.html: -------------------------------------------------------------------------------- 1 | 28 | 29 |
30 |
31 |
Header
32 |
33 | Some other page content 34 |
35 |
36 | -------------------------------------------------------------------------------- /07 - Layout and Positioning/Listing_7-14.html: -------------------------------------------------------------------------------- 1 | 34 | 35 |
36 |
37 |
38 |
39 |
40 |
41 | -------------------------------------------------------------------------------- /07 - Layout and Positioning/Listing_7-15.html: -------------------------------------------------------------------------------- 1 | 13 | 14 |
15 |
16 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec nec sapien 17 | dolor. Nunc condimentum sem nec commodo sollicitudin. 18 |
19 | -------------------------------------------------------------------------------- /07 - Layout and Positioning/Listing_7-16.html: -------------------------------------------------------------------------------- 1 | 21 | 22 |
23 |
24 |
25 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec nec sapien 26 | dolor. Nunc condimentum sem nec commodo sollicitudin. 27 |
28 | -------------------------------------------------------------------------------- /07 - Layout and Positioning/Listing_7-17.html: -------------------------------------------------------------------------------- 1 | 24 | 25 |
26 |
27 |
28 |
29 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec nec sapien 30 | dolor. Nunc condimentum sem nec commodo sollicitudin. 31 |
32 |
33 | -------------------------------------------------------------------------------- /07 - Layout and Positioning/Listing_7-2.html: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 |
Hello world!
14 |
15 | -------------------------------------------------------------------------------- /07 - Layout and Positioning/Listing_7-3.html: -------------------------------------------------------------------------------- 1 | 12 | 13 |
14 |
Hello world!
15 |
16 | -------------------------------------------------------------------------------- /07 - Layout and Positioning/Listing_7-4.html: -------------------------------------------------------------------------------- 1 | 16 | 17 |
18 |
19 |
20 | -------------------------------------------------------------------------------- /07 - Layout and Positioning/Listing_7-5.html: -------------------------------------------------------------------------------- 1 | 13 | 14 |
15 |
Inner
16 |
17 | -------------------------------------------------------------------------------- /07 - Layout and Positioning/Listing_7-6.html: -------------------------------------------------------------------------------- 1 | 14 | 15 |
16 |
Inner
17 |
18 | -------------------------------------------------------------------------------- /07 - Layout and Positioning/Listing_7-7.html: -------------------------------------------------------------------------------- 1 | 19 | 20 |
21 |
22 |
23 | -------------------------------------------------------------------------------- /07 - Layout and Positioning/Listing_7-8.html: -------------------------------------------------------------------------------- 1 | 20 | 21 |
22 |
23 |
24 |
25 |
26 | -------------------------------------------------------------------------------- /07 - Layout and Positioning/Listing_7-9.html: -------------------------------------------------------------------------------- 1 | 22 | 23 |
24 |
25 |
26 |
27 |
28 | -------------------------------------------------------------------------------- /07 - Layout and Positioning/desktop.ini: -------------------------------------------------------------------------------- 1 | [.ShellClassInfo] 2 | ConfirmFileOp=0 3 | IconResource=C:\Program Files\Google\Drive File Stream\42.0.11.0\GoogleDriveFS.exe,21 4 | -------------------------------------------------------------------------------- /08 - Transforms/Listing_8-1.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
Hello World!
12 | -------------------------------------------------------------------------------- /08 - Transforms/Listing_8-10.html: -------------------------------------------------------------------------------- 1 | 16 | 17 |
18 |
19 |
20 | -------------------------------------------------------------------------------- /08 - Transforms/Listing_8-11.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
-------------------------------------------------------------------------------- /08 - Transforms/Listing_8-12.html: -------------------------------------------------------------------------------- 1 | 20 | 21 |
22 | -------------------------------------------------------------------------------- /08 - Transforms/Listing_8-13.html: -------------------------------------------------------------------------------- 1 | 28 | 29 |
30 | -------------------------------------------------------------------------------- /08 - Transforms/Listing_8-14.html: -------------------------------------------------------------------------------- 1 | 27 | 28 |
29 |
30 |
Top
31 |
Bottom
32 |
Left
33 |
Right
34 |
Front
35 |
Back
36 |
37 |
38 | -------------------------------------------------------------------------------- /08 - Transforms/Listing_8-15.html: -------------------------------------------------------------------------------- 1 | 34 | 35 |
36 |
37 |
Top
38 |
Bottom
39 |
Left
40 |
Right
41 |
Front
42 |
Back
43 |
44 |
45 | -------------------------------------------------------------------------------- /08 - Transforms/Listing_8-16.html: -------------------------------------------------------------------------------- 1 | 47 | 48 |
49 |
50 |
Top
51 |
Bottom
52 |
Left
53 |
Right
54 |
Front
55 |
Back
56 |
57 |
58 | -------------------------------------------------------------------------------- /08 - Transforms/Listing_8-2.html: -------------------------------------------------------------------------------- 1 | 11 | 12 |
Hello World!
13 | -------------------------------------------------------------------------------- /08 - Transforms/Listing_8-3.html: -------------------------------------------------------------------------------- 1 | 11 | 12 |
Hello World!
13 | -------------------------------------------------------------------------------- /08 - Transforms/Listing_8-4.html: -------------------------------------------------------------------------------- 1 | 11 | 12 |
Hello World!
13 | -------------------------------------------------------------------------------- /08 - Transforms/Listing_8-5.html: -------------------------------------------------------------------------------- 1 | 21 | 22 |
23 |
24 |
25 | -------------------------------------------------------------------------------- /08 - Transforms/Listing_8-6.html: -------------------------------------------------------------------------------- 1 | 22 | 23 |
24 |
25 |
26 | -------------------------------------------------------------------------------- /08 - Transforms/Listing_8-7.html: -------------------------------------------------------------------------------- 1 | 22 | 23 |
24 |
25 |
26 | -------------------------------------------------------------------------------- /08 - Transforms/Listing_8-8.html: -------------------------------------------------------------------------------- 1 | 10 | 11 |
Hello world!
12 | -------------------------------------------------------------------------------- /08 - Transforms/Listing_8-9.html: -------------------------------------------------------------------------------- 1 | 11 | 12 |
Hello world!
13 | -------------------------------------------------------------------------------- /08 - Transforms/desktop.ini: -------------------------------------------------------------------------------- 1 | [.ShellClassInfo] 2 | ConfirmFileOp=0 3 | IconResource=C:\Program Files\Google\Drive File Stream\42.0.11.0\GoogleDriveFS.exe,21 4 | -------------------------------------------------------------------------------- /09 - Transitions and Animations/Listing_9-1.css: -------------------------------------------------------------------------------- 1 | button.fancy-button { 2 | background: blue; 3 | } 4 | 5 | button.fancy-button:hover { 6 | background: red; 7 | transform: scale(1.1); 8 | } 9 | -------------------------------------------------------------------------------- /09 - Transitions and Animations/Listing_9-10.html: -------------------------------------------------------------------------------- 1 | 18 | 19 |
20 | -------------------------------------------------------------------------------- /09 - Transitions and Animations/Listing_9-11.css: -------------------------------------------------------------------------------- 1 | @media (prefers-reduced-motion: reduce) { 2 | .loader { 3 | animation: none; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /09 - Transitions and Animations/Listing_9-2.css: -------------------------------------------------------------------------------- 1 | button.fancy-button { 2 | background: blue; 3 | transition: 500ms; 4 | } 5 | 6 | button.fancy-button:hover { 7 | background: red; 8 | transform: scale(1.1); 9 | } 10 | -------------------------------------------------------------------------------- /09 - Transitions and Animations/Listing_9-3.css: -------------------------------------------------------------------------------- 1 | button.fancy-button { 2 | background: blue; 3 | transition: background-color 500ms, 4 | transform 500ms 500ms; 5 | } 6 | 7 | button.fancy-button:hover { 8 | background: red; 9 | transform: scale(1.1); 10 | } 11 | -------------------------------------------------------------------------------- /09 - Transitions and Animations/Listing_9-4.css: -------------------------------------------------------------------------------- 1 | button.fancy-button { 2 | background: blue; 3 | transition-property: background-color, transform; 4 | transition-duration: 500ms, 500ms; 5 | transition-delay: 0ms, 500ms; 6 | } 7 | 8 | button.fancy-button:hover { 9 | background: red; 10 | transform: scale(1.1); 11 | } 12 | -------------------------------------------------------------------------------- /09 - Transitions and Animations/Listing_9-5.css: -------------------------------------------------------------------------------- 1 | @keyframes colors { 2 | 0% { 3 | background: red; 4 | } 5 | 6 | 50% { 7 | background: blue; 8 | } 9 | 10 | 100% { 11 | background: green; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /09 - Transitions and Animations/Listing_9-6.html: -------------------------------------------------------------------------------- 1 | 22 | 23 |
24 | -------------------------------------------------------------------------------- /09 - Transitions and Animations/Listing_9-7.html: -------------------------------------------------------------------------------- 1 | 20 | 21 |
22 | -------------------------------------------------------------------------------- /09 - Transitions and Animations/Listing_9-8.html: -------------------------------------------------------------------------------- 1 | 27 | 28 |
29 | -------------------------------------------------------------------------------- /09 - Transitions and Animations/Listing_9-9.css: -------------------------------------------------------------------------------- 1 | .my-element { 2 | will-change: transform, opacity; 3 | } 4 | -------------------------------------------------------------------------------- /09 - Transitions and Animations/desktop.ini: -------------------------------------------------------------------------------- 1 | [.ShellClassInfo] 2 | ConfirmFileOp=0 3 | IconResource=C:\Program Files\Google\Drive File Stream\42.0.11.0\GoogleDriveFS.exe,21 4 | -------------------------------------------------------------------------------- /10 - Flexbox/Listing_10-1.html: -------------------------------------------------------------------------------- 1 | 25 | 26 |
27 |
1
28 |
2
29 |
3
30 |
31 | -------------------------------------------------------------------------------- /10 - Flexbox/Listing_10-10.html: -------------------------------------------------------------------------------- 1 | 47 | 48 |
49 |
Header
50 |
51 | 52 |
Content
53 | 54 |
55 | 56 |
57 | -------------------------------------------------------------------------------- /10 - Flexbox/Listing_10-2.html: -------------------------------------------------------------------------------- 1 | 29 | 30 |
31 |
1
32 |
2
33 |
3
34 |
35 | -------------------------------------------------------------------------------- /10 - Flexbox/Listing_10-3.html: -------------------------------------------------------------------------------- 1 | 29 | 30 |
31 |
Item 1
32 |
Item 2
33 |
Item 3
34 |
35 | -------------------------------------------------------------------------------- /10 - Flexbox/Listing_10-4.html: -------------------------------------------------------------------------------- 1 | 30 | 31 |
32 |
Item 1
33 |
Item 2
34 |
Item 3
35 |
36 | -------------------------------------------------------------------------------- /10 - Flexbox/Listing_10-5.html: -------------------------------------------------------------------------------- 1 | 29 | 30 |
31 |
1
32 |
2
33 |
3
34 |
35 | -------------------------------------------------------------------------------- /10 - Flexbox/Listing_10-6.html: -------------------------------------------------------------------------------- 1 | 30 | 31 |
32 |
1
33 |
2
34 |
3
35 |
36 | -------------------------------------------------------------------------------- /10 - Flexbox/Listing_10-7.html: -------------------------------------------------------------------------------- 1 | 31 | 32 |
33 |
1
34 |
2
35 |
3
36 |
37 | -------------------------------------------------------------------------------- /10 - Flexbox/Listing_10-8.html: -------------------------------------------------------------------------------- 1 | 30 | 31 |
32 |
1
33 |
2
34 |
3
35 |
36 | -------------------------------------------------------------------------------- /10 - Flexbox/Listing_10-9.html: -------------------------------------------------------------------------------- 1 | 17 | 18 |
19 |
20 |
21 | -------------------------------------------------------------------------------- /10 - Flexbox/desktop.ini: -------------------------------------------------------------------------------- 1 | [.ShellClassInfo] 2 | ConfirmFileOp=0 3 | IconResource=C:\Program Files\Google\Drive File Stream\42.0.11.0\GoogleDriveFS.exe,21 4 | -------------------------------------------------------------------------------- /11 - Responsive Design/Listing_11-1.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | color: red; 3 | } 4 | 5 | @media screen and (max-width: 400px) { 6 | h1 { 7 | color: blue; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /11 - Responsive Design/Listing_11-10.css: -------------------------------------------------------------------------------- 1 | @media screen and (max-width: 700px) { 2 | .main { 3 | flex-direction: column; 4 | } 5 | 6 | .sidebar { 7 | flex-direction: row; 8 | justify-content: center; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /11 - Responsive Design/Listing_11-11.css: -------------------------------------------------------------------------------- 1 | @media screen and (max-width: 700px) { 2 | .main { 3 | flex-direction: column; 4 | } 5 | 6 | .sidebar { 7 | flex-direction: row; 8 | justify-content: center; 9 | flex-wrap: wrap; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /11 - Responsive Design/Listing_11-2.css: -------------------------------------------------------------------------------- 1 | @media screen and (max-width: 785px) { 2 | h1 { 3 | font-size: 3rem; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /11 - Responsive Design/Listing_11-3.css: -------------------------------------------------------------------------------- 1 | @media screen and (max-width: 785px) { 2 | h1 { 3 | font-size: 3rem; 4 | } 5 | } 6 | 7 | @media screen and (max-width: 480px) { 8 | h1 { 9 | font-size: 2rem; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /11 - Responsive Design/Listing_11-4.css: -------------------------------------------------------------------------------- 1 | @media screen and (max-width: 785px) { 2 | h1 { 3 | font-size: 3rem; 4 | } 5 | } 6 | 7 | @media screen and (max-width: 480px) { 8 | h1 { 9 | font-size: 2rem; 10 | } 11 | 12 | img { 13 | width: 250px; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /11 - Responsive Design/Listing_11-5.html: -------------------------------------------------------------------------------- 1 | 22 | 23 |
24 |
Flex Item 1
25 |
Flex Item 2
26 |
Flex Item 3
27 |
Flex Item 4
28 |
Flex Item 5
29 |
Flex Item 6
30 |
31 | -------------------------------------------------------------------------------- /11 - Responsive Design/Listing_11-6.html: -------------------------------------------------------------------------------- 1 | 23 | 24 |
25 |
Flex Item 1
26 |
Flex Item 2
27 |
Flex Item 3
28 |
Flex Item 4
29 |
Flex Item 5
30 |
Flex Item 6
31 |
32 | -------------------------------------------------------------------------------- /11 - Responsive Design/Listing_11-7.css: -------------------------------------------------------------------------------- 1 | img { 2 | max-width: 100%; 3 | height: auto; 4 | } 5 | 6 | h1 { 7 | font-size: clamp(48px, 4.8vw, 64px); 8 | } 9 | -------------------------------------------------------------------------------- /11 - Responsive Design/Listing_11-8.html: -------------------------------------------------------------------------------- 1 | 52 | 53 |
54 |
Header
55 |
56 | 61 |
62 | Hello world! 63 |
64 |
65 | Sidebar 2 66 |
67 |
68 | 69 |
70 | -------------------------------------------------------------------------------- /11 - Responsive Design/Listing_11-9.css: -------------------------------------------------------------------------------- 1 | @media screen and (max-width: 700px) { 2 | .main { 3 | flex-direction: column; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /11 - Responsive Design/cat.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/modern-css/cea922754a117becdfcff9e15002909760d7484b/11 - Responsive Design/cat.jpeg -------------------------------------------------------------------------------- /11 - Responsive Design/desktop.ini: -------------------------------------------------------------------------------- 1 | [.ShellClassInfo] 2 | ConfirmFileOp=0 3 | IconResource=C:\Program Files\Google\Drive File Stream\42.0.11.0\GoogleDriveFS.exe,21 4 | -------------------------------------------------------------------------------- /12 - CSS Grid/Listing_12-1.html: -------------------------------------------------------------------------------- 1 | 14 | 15 |
16 |
1
17 |
2
18 |
3
19 |
4
20 |
21 | -------------------------------------------------------------------------------- /12 - CSS Grid/Listing_12-10.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/modern-css/cea922754a117becdfcff9e15002909760d7484b/12 - CSS Grid/Listing_12-10.css -------------------------------------------------------------------------------- /12 - CSS Grid/Listing_12-11.css: -------------------------------------------------------------------------------- 1 | .item1 { 2 | background: skyblue; 3 | grid-row: 2; 4 | grid-column: 3; 5 | } 6 | -------------------------------------------------------------------------------- /12 - CSS Grid/Listing_12-12.css: -------------------------------------------------------------------------------- 1 | .item1 { 2 | background: skyblue; 3 | grid-row: 2; 4 | grid-column: 3; 5 | } 6 | -------------------------------------------------------------------------------- /12 - CSS Grid/Listing_12-13.css: -------------------------------------------------------------------------------- 1 | .item1 { 2 | grid-row: 2; 3 | grid-column: 3 / 5; 4 | } 5 | -------------------------------------------------------------------------------- /12 - CSS Grid/Listing_12-14.css: -------------------------------------------------------------------------------- 1 | .item1 { 2 | grid-row: 2; 3 | grid-column: 3 / span 2; 4 | } 5 | -------------------------------------------------------------------------------- /12 - CSS Grid/Listing_12-15.html: -------------------------------------------------------------------------------- 1 | 30 | 31 |
32 |
Header
33 | 34 |
Content
35 | 36 |
37 | -------------------------------------------------------------------------------- /12 - CSS Grid/Listing_12-16.html: -------------------------------------------------------------------------------- 1 | 34 | 35 |
36 |
Header
37 | 38 |
Content
39 | 40 |
41 | -------------------------------------------------------------------------------- /12 - CSS Grid/Listing_12-2.html: -------------------------------------------------------------------------------- 1 | 14 | 15 |
16 |
1
17 |
2
18 |
3
19 |
4
20 |
5
21 |
6
22 |
23 | -------------------------------------------------------------------------------- /12 - CSS Grid/Listing_12-3.html: -------------------------------------------------------------------------------- 1 | 15 | 16 |
17 |
1
18 |
2
19 |
3
20 |
4
21 |
5
22 |
6
23 |
24 | -------------------------------------------------------------------------------- /12 - CSS Grid/Listing_12-4.html: -------------------------------------------------------------------------------- 1 | 16 | 17 |
18 |
1
19 |
2
20 |
3
21 |
4
22 |
5
23 |
6
24 |
25 | -------------------------------------------------------------------------------- /12 - CSS Grid/Listing_12-5.css: -------------------------------------------------------------------------------- 1 | .container { 2 | display: grid; 3 | grid-template-columns: 200px 1fr 5rem; 4 | grid-template-rows: 5rem 5rem; 5 | } 6 | -------------------------------------------------------------------------------- /12 - CSS Grid/Listing_12-6.css: -------------------------------------------------------------------------------- 1 | .container { 2 | display: grid; 3 | grid-template-columns: 1fr 1fr 1fr 1fr; 4 | grid-template-rows: 5rem; 5 | } 6 | -------------------------------------------------------------------------------- /12 - CSS Grid/Listing_12-7.css: -------------------------------------------------------------------------------- 1 | .container { 2 | display: grid; 3 | grid-template-columns: repeat(4, 1fr); 4 | grid-template-rows: repeat(2, 5rem); 5 | } 6 | -------------------------------------------------------------------------------- /12 - CSS Grid/Listing_12-8.css: -------------------------------------------------------------------------------- 1 | .container { 2 | display: grid; 3 | grid-template-columns: repeat(4, 1fr); 4 | grid-template-rows: repeat(2, minmax(3rem, auto)); 5 | gap: 5px; 6 | width: 15rem; 7 | } 8 | -------------------------------------------------------------------------------- /12 - CSS Grid/Listing_12-9.html: -------------------------------------------------------------------------------- 1 | 14 | 15 |
16 |
1
17 |
2
18 |
3
19 |
4
20 |
5
21 |
6
22 |
7
23 |
24 | -------------------------------------------------------------------------------- /12 - CSS Grid/desktop.ini: -------------------------------------------------------------------------------- 1 | [.ShellClassInfo] 2 | ConfirmFileOp=0 3 | IconResource=C:\Program Files\Google\Drive File Stream\42.0.11.0\GoogleDriveFS.exe,21 4 | -------------------------------------------------------------------------------- /9781484262931.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/modern-css/cea922754a117becdfcff9e15002909760d7484b/9781484262931.jpg -------------------------------------------------------------------------------- /Contributing.md: -------------------------------------------------------------------------------- 1 | # Contributing to Apress Source Code 2 | 3 | Copyright for Apress source code belongs to the author(s). However, under fair use you are encouraged to fork and contribute minor corrections and updates for the benefit of the author(s) and other readers. 4 | 5 | ## How to Contribute 6 | 7 | 1. Make sure you have a GitHub account. 8 | 2. Fork the repository for the relevant book. 9 | 3. Create a new branch on which to make your change, e.g. 10 | `git checkout -b my_code_contribution` 11 | 4. Commit your change. Include a commit message describing the correction. Please note that if your commit message is not clear, the correction will not be accepted. 12 | 5. Submit a pull request. 13 | 14 | Thank you for your contribution! -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Freeware License, some rights reserved 2 | 3 | Copyright (c) 2020 Joe Attardi 4 | 5 | Permission is hereby granted, free of charge, to anyone obtaining a copy 6 | of this software and associated documentation files (the "Software"), 7 | to work with the Software within the limits of freeware distribution and fair use. 8 | This includes the rights to use, copy, and modify the Software for personal use. 9 | Users are also allowed and encouraged to submit corrections and modifications 10 | to the Software for the benefit of other users. 11 | 12 | It is not allowed to reuse, modify, or redistribute the Software for 13 | commercial use in any way, or for a user’s educational materials such as books 14 | or blog articles without prior permission from the copyright holder. 15 | 16 | The above copyright notice and this permission notice need to be included 17 | in all copies or substantial portions of the software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | AUTHORS OR COPYRIGHT HOLDERS OR APRESS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 25 | SOFTWARE. 26 | 27 | 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Apress Source Code 2 | 3 | This repository accompanies [*Modern CSS*](http://www.apress.com/9781484262931) by Joe Attardi (Apress, 2020). 4 | 5 | [comment]: #cover 6 | ![Cover image](9781484262931.jpg) 7 | 8 | Download the files as a zip using the green button, or clone the repository to your machine using Git. 9 | 10 | ## Releases 11 | 12 | Release v1.0 corresponds to the code in the published book, without corrections or updates. 13 | 14 | ## Contributions 15 | 16 | See the file Contributing.md for more information on how you can contribute to this repository. -------------------------------------------------------------------------------- /errata.md: -------------------------------------------------------------------------------- 1 | # Errata for *Modern CSS* 2 | 3 | ## Chapter 2: CSS Selectors 4 | 5 | ### Page 18 6 | 7 | The caption for Listing 2-2 should read: 8 | 9 | > Applying a margin to all p elements. 10 | 11 | ### Page 25 12 | 13 | Under the `:nth-child` pseudo-class, the description of `nth-child(4n)` should read: 14 | 15 | > Or we could select every *fourth* item with the selector `.my-list > li:nth-child(4n)`. 16 | 17 | ## Chapter 3: Basic CSS Concepts 18 | 19 | ### Page 49 20 | 21 | The second-to-last sentence on this page should read: 22 | 23 | > There is a newer syntax for these functions that *is* slightly different. 24 | 25 | ### Page 50 26 | 27 | The hex code on the last bullet, pure red with 50% alpha, should be `#FF000080`. 28 | 29 | ## Chapter 4: Basic Styling 30 | 31 | ### Page 68 32 | 33 | The second-to-last sentence on this page should read: 34 | 35 | > Note that when you specify border-radius in this way, an elliptical border-radius does not have a slash separating the horizontal and vertical *radii*. 36 | 37 | ### Page 71 38 | 39 | In the paragraph before Listing 4-11, the first sentence should read: 40 | 41 | > If we add a spread radius and set the blur radius to zero, as shown in Listing 4-11, we can see that the shadow size grows by the spread radius *only*. 42 | 43 | ## Chapter 6: Text Styling 44 | 45 | ### Page 117 46 | 47 | In Listing 6-11, there should be extra whitespace between `is` and `some` in order to produce the result in Figure 6-10. 48 | 49 | ## Chapter 8: Transforms 50 | 51 | ### Page 171 52 | 53 | The italic text in Listing 8-10 is a formatting error and has no special meaning. 54 | 55 | ### Pages 182-184 56 | 57 | The italic text in Listing 8-16 is a formatting error and has no special meaning. --------------------------------------------------------------------------------