Skip to content

Commit 001db64

Browse files
Minor update
1 parent b1aebff commit 001db64

File tree

2 files changed

+33
-33
lines changed

2 files changed

+33
-33
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Please note that this project is released with a [Contributor Code of Conduct](CODE-OF-CONDUCT.md). By participating in this project you agree to abide by its terms.
44

5-
## Table of Contents
5+
## Contents
66

77
- [Adding to This List](#adding-to-this-list)
88
- [Updating Your Pull Request](#updating-your-pull-request)

README.md

+32-32
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A collection of tips to help take your CSS skills pro.
99
> [!TIP]
1010
> For other great lists check out [@sindresorhus](https://github.com/sindresorhus/)'s curated list of [awesome lists](https://github.com/sindresorhus/awesome/).
1111
12-
## Table of Contents
12+
## Contents
1313

1414
- [Protips](#protips)
1515
- [Support](#support)
@@ -69,7 +69,7 @@ Now elements will be stripped of margins and padding, and `box-sizing` lets you
6969
> [!TIP]
7070
> 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.
7171
72-
<sup>[Back to top](#table-of-contents)</sup>
72+
<sup>[Back to top](#contents)</sup>
7373

7474
### Inherit `box-sizing`
7575

@@ -91,7 +91,7 @@ This makes it easier to change `box-sizing` in plugins or other components that
9191

9292
#### [Demo](https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/)
9393

94-
<sup>[Back to top](#table-of-contents)</sup>
94+
<sup>[Back to top](#contents)</sup>
9595

9696
### Use `unset` Instead of Resetting All Properties
9797

@@ -116,7 +116,7 @@ button {
116116
}
117117
```
118118

119-
<sup>[Back to top](#table-of-contents)</sup>
119+
<sup>[Back to top](#contents)</sup>
120120

121121
### Use `:not()` to Apply/Unapply Borders on Navigation
122122

@@ -150,7 +150,7 @@ Here, the CSS selector is read as a human would describe it.
150150

151151
#### [Demo](https://codepen.io/AllThingsSmitty/pen/LkymvO)
152152

153-
<sup>[Back to top](#table-of-contents)</sup>
153+
<sup>[Back to top](#contents)</sup>
154154

155155
### Check if Font Is Installed Locally
156156

@@ -171,7 +171,7 @@ code {
171171

172172
H/T to Adam Argyle for sharing this protip and [demo](https://codepen.io/argyleink/pen/VwYJpgR).
173173

174-
<sup>[Back to top](#table-of-contents)</sup>
174+
<sup>[Back to top](#contents)</sup>
175175

176176
### Add `line-height` to `body`
177177

@@ -187,7 +187,7 @@ This way textual elements can inherit from `body` easily.
187187

188188
#### [Demo](https://codepen.io/AllThingsSmitty/pen/VjbdYd)
189189

190-
<sup>[Back to top](#table-of-contents)</sup>
190+
<sup>[Back to top](#contents)</sup>
191191

192192
### Set `:focus` for Form Elements
193193

@@ -207,7 +207,7 @@ textarea:focus {
207207

208208
#### [Demo](https://codepen.io/AllThingsSmitty/pen/ePzoOP/)
209209

210-
<sup>[Back to top](#table-of-contents)</sup>
210+
<sup>[Back to top](#contents)</sup>
211211

212212
### Vertically-Center Anything
213213

@@ -241,7 +241,7 @@ body {
241241
242242
#### [Demo](https://codepen.io/AllThingsSmitty/pen/GqmGqZ)
243243

244-
<sup>[Back to top](#table-of-contents)</sup>
244+
<sup>[Back to top](#contents)</sup>
245245

246246
### Use `aspect-ratio` Instead of Height/Width
247247

@@ -258,7 +258,7 @@ Learn more about the `aspect-ratio` property in this [web.dev post](https://web.
258258

259259
#### [Demo](https://codepen.io/AllThingsSmitty/pen/MWxwoNx/)
260260

261-
<sup>[Back to top](#table-of-contents)</sup>
261+
<sup>[Back to top](#contents)</sup>
262262

263263
### Comma-Separated Lists
264264

@@ -275,7 +275,7 @@ Use the `:not()` pseudo-class and no comma will be added to the last item.
275275
> [!NOTE]
276276
> 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.
277277
278-
<sup>[Back to top](#table-of-contents)</sup>
278+
<sup>[Back to top](#contents)</sup>
279279

280280
### Select Items Using Negative `nth-child`
281281

@@ -303,7 +303,7 @@ li:not(:nth-child(-n + 3)) {
303303

304304
#### [Demo](https://codepen.io/AllThingsSmitty/pen/WxjKZp)
305305

306-
<sup>[Back to top](#table-of-contents)</sup>
306+
<sup>[Back to top](#contents)</sup>
307307

308308
### Use SVG for Icons
309309

@@ -326,7 +326,7 @@ SVG scales well for all resolution types and is supported in all browsers [back
326326
}
327327
```
328328

329-
<sup>[Back to top](#table-of-contents)</sup>
329+
<sup>[Back to top](#contents)</sup>
330330

331331
### Use the "Lobotomized Owl" Selector
332332

@@ -345,7 +345,7 @@ In this example, all elements in the flow of the document that follow other elem
345345
346346
#### [Demo](https://codepen.io/AllThingsSmitty/pen/grRvWq)
347347

348-
<sup>[Back to top](#table-of-contents)</sup>
348+
<sup>[Back to top](#contents)</sup>
349349

350350
### Use `max-height` for Pure CSS Sliders
351351

@@ -366,7 +366,7 @@ Implement CSS-only sliders using `max-height` with overflow hidden:
366366

367367
The element expands to the `max-height` value on hover and the slider displays as a result of the overflow.
368368

369-
<sup>[Back to top](#table-of-contents)</sup>
369+
<sup>[Back to top](#contents)</sup>
370370

371371
### Equal-Width Table Cells
372372

@@ -382,7 +382,7 @@ Pain-free table layouts.
382382

383383
#### [Demo](https://codepen.io/AllThingsSmitty/pen/jALALm)
384384

385-
<sup>[Back to top](#table-of-contents)</sup>
385+
<sup>[Back to top](#contents)</sup>
386386

387387
### Get Rid of Margin Hacks With Flexbox
388388

@@ -401,7 +401,7 @@ When working with column gutters you can get rid of `nth-`, `first-`, and `last-
401401

402402
Now column gutters always appear evenly-spaced.
403403

404-
<sup>[Back to top](#table-of-contents)</sup>
404+
<sup>[Back to top](#contents)</sup>
405405

406406
### Use Attribute Selectors with Empty Links
407407

@@ -420,7 +420,7 @@ That's really convenient.
420420
> [!NOTE]
421421
> 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.
422422
423-
<sup>[Back to top](#table-of-contents)</sup>
423+
<sup>[Back to top](#contents)</sup>
424424

425425
### Control Specificity Better with `:is()`
426426

@@ -465,7 +465,7 @@ nav h6 {
465465

466466
#### [Demo](https://codepen.io/AllThingsSmitty/pen/rNRVxdx)
467467

468-
<sup>[Back to top](#table-of-contents)</sup>
468+
<sup>[Back to top](#contents)</sup>
469469

470470
### Style "Default" Links
471471

@@ -480,7 +480,7 @@ a[href]:not([class]) {
480480

481481
Now links that are inserted via a CMS, which don't usually have a `class` attribute, will have a distinction without generically affecting the cascade.
482482

483-
<sup>[Back to top](#table-of-contents)</sup>
483+
<sup>[Back to top](#contents)</sup>
484484

485485
### Intrinsic Ratio Boxes
486486

@@ -507,7 +507,7 @@ Using 20% for padding makes the height of the box equal to 20% of its width. No
507507

508508
#### [Demo](https://codepen.io/AllThingsSmitty/pen/jALZvE)
509509

510-
<sup>[Back to top](#table-of-contents)</sup>
510+
<sup>[Back to top](#contents)</sup>
511511

512512
### Style Broken Images
513513

@@ -545,7 +545,7 @@ img::after {
545545
> [!TIP]
546546
> Learn more about styling for this pattern in [Ire Aderinokun's post](http://bitsofco.de/styling-broken-images/).
547547
548-
<sup>[Back to top](#table-of-contents)</sup>
548+
<sup>[Back to top](#contents)</sup>
549549

550550
### Use `rem` for Global Sizing; Use `em` for Local Sizing
551551

@@ -575,7 +575,7 @@ aside .module {
575575

576576
Now each module becomes compartmentalized and easier to style, more maintainable, and flexible.
577577

578-
<sup>[Back to top](#table-of-contents)</sup>
578+
<sup>[Back to top](#contents)</sup>
579579

580580
### Hide Autoplay Videos That Aren't Muted
581581

@@ -589,7 +589,7 @@ video[autoplay]:not([muted]) {
589589

590590
Once again, we're taking advantage of using the [`:not()`](#use-not-to-applyunapply-borders-on-navigation) pseudo-class.
591591

592-
<sup>[Back to top](#table-of-contents)</sup>
592+
<sup>[Back to top](#contents)</sup>
593593

594594
### Use `:root` for Flexible Type
595595

@@ -611,7 +611,7 @@ body {
611611

612612
#### [Demo](https://codepen.io/AllThingsSmitty/pen/XKgOkR)
613613

614-
<sup>[Back to top](#table-of-contents)</sup>
614+
<sup>[Back to top](#contents)</sup>
615615

616616
### Set `font-size` on Form Elements for a Better Mobile Experience
617617

@@ -626,7 +626,7 @@ textarea {
626626
}
627627
```
628628

629-
<sup>[Back to top](#table-of-contents)</sup>
629+
<sup>[Back to top](#contents)</sup>
630630

631631
### Use Pointer Events to Control Mouse Events
632632

@@ -641,7 +641,7 @@ button:disabled {
641641

642642
It's that simple.
643643

644-
<sup>[Back to top](#table-of-contents)</sup>
644+
<sup>[Back to top](#contents)</sup>
645645

646646
### Set `display: none` on Line Breaks Used as Spacing
647647

@@ -653,7 +653,7 @@ br + br {
653653
}
654654
```
655655

656-
<sup>[Back to top](#table-of-contents)</sup>
656+
<sup>[Back to top](#contents)</sup>
657657

658658
### Use `:empty` to Hide Empty HTML Elements
659659

@@ -668,13 +668,13 @@ If you have HTML elements that are empty, i.e., the content has yet to be set ei
668668
> [!NOTE]
669669
> Keep in mind that elements with whitespace aren't considered empty, e.g., `<p class="error-message"> </p>`.
670670
671-
<sup>[Back to top](#table-of-contents)</sup>
671+
<sup>[Back to top](#contents)</sup>
672672

673673
## Support
674674

675675
Current versions of Chrome, Firefox, Safari, and Edge.
676676

677-
<sup>[Back to top](#table-of-contents)</sup>
677+
<sup>[Back to top](#contents)</sup>
678678

679679
### Use `margin-inline` instead of `margin`
680680

@@ -696,7 +696,7 @@ The same can be done for `margin-block` with defines the block start and end mar
696696

697697
#### [Demo](https://codepen.io/AllThingsSmitty/pen/PwoOQGB)
698698

699-
<sup>[Back to top](#table-of-contents)</sup>
699+
<sup>[Back to top](#contents)</sup>
700700

701701
## Translations
702702

@@ -719,4 +719,4 @@ The same can be done for `margin-block` with defines the block start and end mar
719719
- [Русский](https://github.com/AllThingsSmitty/css-protips/tree/master/translations/ru-RU)
720720
- [Tiếng Việt](https://github.com/AllThingsSmitty/css-protips/tree/master/translations/vn-VN)
721721

722-
<sup>[Back to top](#table-of-contents)</sup>
722+
<sup>[Back to top](#contents)</sup>

0 commit comments

Comments
 (0)