Created
March 29, 2024 00:09
-
-
Save ryanmorr/076de228bd1b10ceb470e7b314f79f87 to your computer and use it in GitHub Desktop.
A simple pseudo-element to create a dropdown caret that scales with text in pure CSS
This file contains 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
.dropdown-caret:after { | |
content: ""; | |
display: inline-block; | |
width: 0; | |
height: 0; | |
margin-left: .255em; | |
vertical-align: middle; | |
border-top: .3em solid; | |
border-right: .3em solid transparent; | |
border-left: .3em solid transparent; | |
border-bottom: 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment