Reset form elements even more aggressively

This commit is contained in:
Adam Wathan 2019-03-12 11:17:35 -04:00
parent c246f19773
commit 58f581ef32
3 changed files with 37 additions and 6 deletions

View File

@ -489,9 +489,11 @@ h6 {
}
/**
* Inherit color, font-weight, and line-height from the parent
* Reset form elements to inherit their styles from the parent
* so that form elements don't inadvertently have any styles
* that deviate from your design system.
* that deviate from your design system. These styles
* supplement a partial reset that is already applied by
* normalize.css.
*/
button,
@ -499,9 +501,17 @@ input,
optgroup,
select,
textarea {
padding: 0;
border-radius: 0;
background-color: transparent;
color: inherit;
font-weight: inherit;
line-height: inherit;
font-style: inherit;
font-variant: inherit;
text-align: inherit;
text-transform: inherit;
letter-spacing: inherit;
}
.container {

View File

@ -489,9 +489,11 @@ h6 {
}
/**
* Inherit color, font-weight, and line-height from the parent
* Reset form elements to inherit their styles from the parent
* so that form elements don't inadvertently have any styles
* that deviate from your design system.
* that deviate from your design system. These styles
* supplement a partial reset that is already applied by
* normalize.css.
*/
button,
@ -499,9 +501,17 @@ input,
optgroup,
select,
textarea {
padding: 0;
border-radius: 0;
background-color: transparent;
color: inherit;
font-weight: inherit;
line-height: inherit;
font-style: inherit;
font-variant: inherit;
text-align: inherit;
text-transform: inherit;
letter-spacing: inherit;
}
.container {

View File

@ -135,16 +135,27 @@ h6 {
}
/**
* Inherit color, font-weight, and line-height from the parent
* Reset form elements to inherit their styles from the parent
* so that form elements don't inadvertently have any styles
* that deviate from your design system.
* that deviate from your design system. These styles
* supplement a partial reset that is already applied by
* normalize.css.
*/
button,
input,
optgroup,
select,
textarea {
padding: 0;
border-radius: 0;
background-color: transparent;
color: inherit;
font-weight: inherit;
line-height: inherit;
font-style: inherit;
font-variant: inherit;
text-align: inherit;
text-transform: inherit;
letter-spacing: inherit;
}