A Pen by Homer Gaines on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* CSS I used to fade in / out the text on my personal site */ | |
| p, | |
| ul, | |
| h1, | |
| h2, | |
| h3 { | |
| opacity: 0; | |
| transform: translateY(1rem); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Git | |
| alias add="git add ." | |
| alias abort="git merge --abort" | |
| alias branch="git branch" | |
| alias burn="git branch -D" | |
| alias co="git checkout " | |
| alias com="git commit -m " | |
| alias clone="git clone " | |
| alias dot="git checkout ." | |
| alias dash="git checkout -" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @import url("https://fonts.googleapis.com/css2?family=Lato&display=swap"); | |
| $speed: 0.25s; | |
| $border-radius: 24px; | |
| $light: #e5efe9; | |
| $mid: #93a4cf; | |
| $dark: #121943; | |
| $box-shadow: -20px 20px 35px 1px rgba(10, 49, 86, 0.18); | |
| $focus-ring: 0px 0px 0px 2px $dark; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ❌ Bad example of a button component. | |
| While this example technically works, it's not semantically correct. | |
| To accommodate tabbed navigation, you'll need to add a tab-index="0" to make this button focusable. | |
| [...] | |
| return ( | |
| <div> | |
| <span role=”button”>Click</span> | |
| </div> | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ❌ Bad example of an input field | |
| <input type="text" id="firstname" name="firstname"> | |
| ✔️ Good Example of an input field using an explicit label. | |
| <label for="firstname">First name</label> | |
| <input type="text" id="firstname" name="firstname"> | |
| ✔️ Good Example of an input field an implicit label. | |
| <label for="firstname"> | |
| First name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ❌ Bad example of how to add an image. | |
| <img src="bamboo-grove.jpg"> | |
| ✔️ Good example of how to add an image using the "alt" attribute. | |
| <img src="bamboo-grove.jpg" alt="Image of the bamboo grove in Arashiyama"> | |
| ✔️ Good example of how to add an image using the "longdesc" attribute. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ❌ Bad example of a simple close button. | |
| <button type="button"> X </button> | |
| ✔️ Good example of the same close button with an aria-label to provide more context. | |
| <button aria-label="Close modal"> X </button> |