bootstrap: Preserve useful styles on button, input.

This commit is contained in:
Karl Stolley
2025-04-03 14:59:52 -05:00
committed by Tim Abbott
parent a9fa087f60
commit 31d3eba256
2 changed files with 21 additions and 17 deletions

View File

@@ -109,6 +109,27 @@ body {
} }
} }
input,
button {
/* Browsers default to inline-block,
so preserve this value. */
vertical-align: middle;
/* Preserve normal font-weight, though
it appears UA stylesheets do not set
the weight to other values. */
font-weight: normal;
/* Likewise with zeroed margin. */
margin: 0;
/* Reset these values from Firefox's
UA stylesheet (still present in
April 2025) */
&::-moz-focus-inner {
padding: 0;
border: 0;
}
}
input, input,
button, button,
select, select,

View File

@@ -28,16 +28,6 @@ img {
vertical-align: middle; vertical-align: middle;
border: 0; border: 0;
} }
button,
input {
margin: 0;
vertical-align: middle;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
padding: 0;
border: 0;
}
button { button {
-webkit-appearance: button; -webkit-appearance: button;
} }
@@ -92,10 +82,6 @@ hr {
form { form {
margin: 0 0 20px; margin: 0 0 20px;
} }
input,
button {
font-weight: normal;
}
label { label {
display: block; display: block;
margin-bottom: 5px; margin-bottom: 5px;
@@ -109,9 +95,6 @@ input:-ms-input-placeholder {
input::-webkit-input-placeholder { input::-webkit-input-placeholder {
color: #999999; color: #999999;
} }
input {
margin-left: 0;
}
input[disabled], input[disabled],
input[readonly] { input[readonly] {
cursor: not-allowed; cursor: not-allowed;