@@ -11,17 +11,18 @@ import HTMLSnippet from '@/components/HTMLSnippet.astro'
11
11
import { Slide , Presentation , SlideOnly } from ' @/components/slides'
12
12
import BoxModelExample from ' @/snippets/css-basic-layouts/BoxModelStandalone.astro'
13
13
14
-
15
14
<Presentation />
16
15
17
16
<Slide centered >
18
17
# ZOOOOOOM!
19
18
20
19
> Is everything big enough and are we in dark mode?
20
+
21
21
</Slide >
22
22
23
23
<Slide centered >
24
24
# An Introduction to CSS Layouts
25
+
25
26
</Slide >
26
27
27
28
<Slide centered >
@@ -31,7 +32,9 @@ import BoxModelExample from '@/snippets/css-basic-layouts/BoxModelStandalone.ast
31
32
- Selectors
32
33
- Cascade
33
34
- Box Model
35
+ - Flow Layout
34
36
- Debugging
37
+
35
38
</Slide >
36
39
37
40
<Slide >
89
92
/>
90
93
</Slide >
91
94
92
-
93
95
<Slide >
94
96
# Combining Selectors (Combinators)
95
97
@@ -132,12 +134,13 @@ del={
132
134
133
135
- Used by browser to determine the most relevant declaration
134
136
- Based on the selector used
135
- - Type of selector, combinators used, and level of impact this
137
+ - Type of selector, combinators used, and level of impact this
136
138
137
- # Order
139
+ # Order
138
140
139
141
- Where is the style in the stylesheet
140
142
- Used to break ties in specificity
143
+
141
144
</Slide >
142
145
143
146
<Slide >
@@ -146,18 +149,12 @@ del={
146
149
Rules for specificity are pretty tricky, but your IDE should show this to you when hovering over a class
147
150
148
151
<CSSSnippet
149
- path = " css-basic-layouts/specificity.css"
150
- html
151
- htmlPath = " css-basic-layouts/Specificity.astro"
152
- ins = {
153
- {range: " 1-2" , label: " (1, 1, 0) - Most Specific" }
154
- }
155
- mark = { [
156
- {range: " 4-5" , label: " (0, 1, 0) - Least Specific" },
157
- ]}
158
- del = {
159
- {range: " 7-8" , label: " (0, 2, 0)" }
160
- }
152
+ path = " css-basic-layouts/specificity.css"
153
+ html
154
+ htmlPath = " css-basic-layouts/Specificity.astro"
155
+ ins = { { range: ' 1-2' , label: ' (1, 1, 0) - Most Specific' }}
156
+ mark = { [{ range: ' 4-5' , label: ' (0, 1, 0) - Least Specific' }]}
157
+ del = { { range: ' 7-8' , label: ' (0, 2, 0)' }}
161
158
/>
162
159
163
160
</Slide >
@@ -166,13 +163,13 @@ del={
166
163
# Impact of Specificity
167
164
168
165
<CSSSnippet
169
- path = " css-basic-layouts/combinators.css"
170
- htmlPath = " css-basic-layouts/Combinators.astro"
166
+ path = " css-basic-layouts/combinators.css"
167
+ htmlPath = " css-basic-layouts/Combinators.astro"
171
168
/>
172
169
173
170
<CSSSnippet
174
- path = " css-basic-layouts/specificity.css"
175
- htmlPath = " css-basic-layouts/Specificity.astro"
171
+ path = " css-basic-layouts/specificity.css"
172
+ htmlPath = " css-basic-layouts/Specificity.astro"
176
173
/>
177
174
178
175
</Slide >
@@ -182,6 +179,7 @@ htmlPath="css-basic-layouts/Specificity.astro"
182
179
183
180
- Used in addition to other selectors
184
181
- Select an element based on DOM state
182
+
185
183
</Slide >
186
184
187
185
<Slide >
@@ -200,9 +198,9 @@ ins=":valid"
200
198
</Slide >
201
199
202
200
<Slide >
203
- # The Box Model
201
+ # The Box Model
204
202
205
- > Rectangles all the way down
203
+ > Rectangles all the way down
206
204
207
205
<CSSSnippet
208
206
path = " css-basic-layouts/box-model.css"
@@ -216,25 +214,65 @@ collapse="1-9"
216
214
</Slide >
217
215
218
216
<Slide >
219
- # Block vs Inline Block
217
+ # Layouts
218
+
219
+ - Layout influences how certain properties behave
220
+ - Different Layout Modes at a parent level
221
+ - Flow
222
+ - Flex
223
+ - Grid
224
+ - Layout Modes at a child level
225
+ - Relative
226
+ - Absolute
227
+ - Sticky
228
+ - Static
229
+
230
+ > We'll talk about Flow
231
+
232
+ </Slide >
233
+
234
+ <Slide >
235
+
236
+ # Flow - Block vs Inline Block
220
237
238
+ - Block elements are placed top-to-bottom
239
+ - Inline elements are placed left-to-right and wrap with reading width
240
+ - Default layout Mode
221
241
- Layout behaves and interacts differently
222
242
- Sizing is calculated differently
223
243
- Some properties will behave differently based on this
224
244
245
+ </Slide >
246
+
247
+ <Slide >
225
248
<CSSSnippet
226
- path = " css-basic-layouts/inline-v-block.css"
227
- htmlPath = " css-basic-layouts/InlineVBlock.astro"
228
- mark = { [" 23 " , " 27 " , " 31 " ]}
229
- collapse = " 1-21"
249
+ path = " css-basic-layouts/inline-v-block.css"
250
+ htmlPath = " css-basic-layouts/InlineVBlock.astro"
251
+ mark = { [' 23 ' , ' 27 ' , ' 31 ' ]}
252
+ collapse = " 1-21"
230
253
/>
231
254
232
255
</Slide >
233
256
234
257
<Slide >
235
- # Debugging
258
+ # A Note on Layouts
259
+
260
+ - Flow is fairly restrictive but important to understand
261
+ - Other layout modes are also important:
262
+ - Display properties: Flex, Grid
263
+ - Position properties: Relative, Absolute, Sticky, Static
264
+
265
+ </Slide >
266
+
267
+ <Slide >
268
+ # Debugging
269
+
270
+ > Firefox has the best CSS Tooling (in general)
236
271
237
- > Firefox has the best CSS Tooling (in general)
272
+ - Hover tooltips
273
+ - CSS Overrides
274
+ - HTML Breakpoints
275
+ - Flex and Grid Tools
238
276
239
277
<BoxModelExample />
240
278
</Slide >
@@ -244,21 +282,26 @@ collapse="1-21"
244
282
245
283
> Well, you can just:
246
284
247
- <HTMLSnippet path = " css-basic-layouts/DebugCSSButton.astro" />
285
+ <HTMLSnippet mark = " 7 " path = " css-basic-layouts/DebugCSSButton.astro" />
248
286
</Slide >
249
287
250
-
251
288
<Slide >
252
- # References
289
+ # References
253
290
254
291
Anything by Josh W. Comeau pretty much
255
292
256
293
- [ Understanding Layout Algorithms] ( https://www.joshwcomeau.com/css/understanding-layout-algorithms/ )
257
294
- [ An Interactive Guide to CSS Grid] ( https://www.joshwcomeau.com/css/interactive-guide-to-grid/ )
258
295
- [ An Interactive Guide to Flexbox] ( https://www.joshwcomeau.com/css/interactive-guide-to-flexbox/ )
259
296
260
- MDN
297
+ MDN
261
298
262
299
- [ CSS Syntax] ( https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax )
300
+ - [ Flow Layout] ( https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_flow_layout )
301
+ - [ Flex] ( https://developer.mozilla.org/en-US/docs/Web/CSS/flex )
302
+
303
+ CSS Tricks
263
304
264
- </Slide >
305
+ - [ Guide to Flexbox] ( https://css-tricks.com/snippets/css/a-guide-to-flexbox/ )
306
+
307
+ </Slide >
0 commit comments