You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Note:** If you follow the [Inherit `box-sizing`](#inherit-box-sizing) tip below you might opt to not include the `box-sizing` property in your CSS reset.
69
70
@@ -151,7 +152,7 @@ Instead of putting on the border...
151
152
152
153
Here, the CSS selector is read as a human would describe it.
<sup>[back to table of contents](#table-of-contents)</sup>
200
201
@@ -232,10 +233,7 @@ body {
232
233
}
233
234
234
235
body {
235
-
-webkit-align-items: center;
236
-
-ms-flex-align: center;
237
236
align-items: center;
238
-
display: -webkit-flex;
239
237
display: flex;
240
238
}
241
239
```
@@ -256,7 +254,7 @@ Want to center something else? Vertically, horizontally...anything, anytime, any
256
254
257
255
**Note:** Watch for some [buggy behavior](https://github.com/philipwalton/flexbugs#3-min-height-on-a-flex-container-wont-apply-to-its-flex-items) with flexbox in IE11.
<sup>[back to table of contents](#table-of-contents)</sup>
308
306
@@ -344,7 +342,7 @@ In this example, all elements in the flow of the document that follow other elem
344
342
345
343
For more on the "lobotomized owl" selector, read [Heydon Pickering's post](http://alistapart.com/article/axiomatic-css-and-lobotomized-owls) on *A List Apart*.
<sup>[back to table of contents](#table-of-contents)</sup>
389
387
@@ -422,7 +420,7 @@ That's pretty convenient.
422
420
423
421
**Note:** This tip may not be ideal for accessibility, specifically screen readers. And copy/paste from the browser doesn't work with CSS-generated content. Proceed with caution.
<sup>[back to table of contents](#table-of-contents)</sup>
428
426
@@ -466,7 +464,7 @@ To create a box with an intrinsic ratio, all you need to do is apply top or bott
466
464
467
465
Using 20% for padding makes the height of the box equal to 20% of its width. No matter the width of the viewport, the child div will keep its aspect ratio (100% / 20% = 5:1).
<sup>[back to table of contents](#table-of-contents)</sup>
579
577
@@ -640,6 +638,34 @@ If you have HTML elements that are empty, i.e., the content has yet to be set ei
640
638
<sup>[back to table of contents](#table-of-contents)</sup>
641
639
642
640
641
+
### Control Specificity Better with `:is()`
642
+
643
+
The `:is()` pseudo-class is used to target multiple selectors at onece, reducing redundancy and enhancing code readability. This is incredibly useful for writing large selectors in a more compact form.
0 commit comments