Last active
April 2, 2021 03:00
-
-
Save pinkhominid/db9235bc6981bedcb8f8a624fa1c79d2 to your computer and use it in GitHub Desktop.
Clear/reset default styles of common HTML elements
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
/* Anchors */ | |
a.clear-style { | |
color: inherit; | |
text-decoration: none; | |
} | |
/* Buttons */ | |
button.clear-style, | |
input[type=button].clear-style, | |
input[type=reset].clear-style { | |
background: none; | |
border: none; | |
color: inherit; | |
cursor: pointer; /* optional */ | |
font: inherit; | |
margin: 0; | |
padding: 0; | |
} | |
/* Fieldsets */ | |
fieldset.clear-style { | |
border: 0; | |
margin: 0; | |
padding: 0; | |
} | |
/* Headings */ | |
h1.clear-style, | |
h2.clear-style, | |
h3.clear-style, | |
h4.clear-style { | |
font: inherit; | |
margin: 0; | |
} | |
/* Text Inputs */ | |
input:not([type]).clear-style, | |
input[type=""].clear-style, | |
input[type=text].clear-style { | |
background: none; | |
border: none; | |
color: inherit; | |
font: inherit; | |
margin: 0; | |
padding: 0; | |
} | |
/* Lists */ | |
ol.clear-style, | |
ul.clear-style { | |
list-style: none; | |
margin: 0; | |
padding: 0; | |
} | |
ol.clear-style > li, | |
ul.clear-style > li { | |
display: block; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment