зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1689098 - Make inputs, selects, and button actually have the same block-axis padding as claimed by our forms.css comments. r=dholbert
Combobox select has the block-axis padding in the comboboxcontrol frame. Moving it fixes bug 1560824 and should be better, so will do that there. 1px block axis padding on buttons matches Chrome too, so shouldn't be a problem compat-wise. Differential Revision: https://phabricator.services.mozilla.com/D103244
This commit is contained in:
Родитель
9c258cbdc6
Коммит
49e1237f27
|
@ -39,6 +39,6 @@ waitUntilApzStable()
|
|||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<button id="b" style="width: 10px; height: 10px"></button>
|
||||
<button id="b" style="width: 10px; height: 10px; padding: 0;"></button>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -64,3 +64,4 @@ skip-if = toolkit == 'android'
|
|||
[test_select_key_navigation_bug1498769.html]
|
||||
[test_select_collapsed_page_keys.html]
|
||||
skip-if = os == 'mac' # select control keyboard behavior is different
|
||||
[test_unstyled_control_height.html]
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<!doctype html>
|
||||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<style>
|
||||
.non-native * {
|
||||
appearance: none;
|
||||
}
|
||||
</style>
|
||||
<div class="non-native">
|
||||
<input>
|
||||
<button>Foo</button>
|
||||
<select><option>Foo</option></select>
|
||||
</div>
|
||||
<script>
|
||||
let commonHeight = null;
|
||||
for (let element of document.querySelectorAll(".non-native > *")) {
|
||||
let height = element.getBoundingClientRect().height;
|
||||
if (commonHeight === null) {
|
||||
commonHeight = height;
|
||||
}
|
||||
is(height, commonHeight, "Height of the controls should match");
|
||||
}
|
||||
</script>
|
|
@ -10,12 +10,12 @@
|
|||
.rtl button,
|
||||
.ltr input[type="button"],
|
||||
.rtl input[type="button"] {
|
||||
padding: 0px 8px;
|
||||
padding: 1px 8px;
|
||||
}
|
||||
|
||||
.v-rl button,
|
||||
.v-rl input[type="button"] {
|
||||
padding: 8px 0px;
|
||||
padding: 8px 1px;
|
||||
}
|
||||
</style>
|
||||
<div class=ltr>
|
||||
|
|
|
@ -10,13 +10,13 @@
|
|||
.rtl input[type="color"] {
|
||||
width: 64px;
|
||||
height: 23px;
|
||||
padding: 0px 8px;
|
||||
padding: 1px 8px;
|
||||
}
|
||||
|
||||
.v-rl input[type="color"] {
|
||||
height: 64px;
|
||||
width: 23px;
|
||||
padding: 8px 0px;
|
||||
padding: 8px 1px;
|
||||
}
|
||||
|
||||
@supports -moz-bool-pref("widget.disable-native-theme-for-content") {
|
||||
|
|
|
@ -529,7 +529,7 @@ input:is([type=color], [type=reset], [type=button], [type=submit]) {
|
|||
/* The sum of border and padding on block-start and block-end
|
||||
must be the same here, for text inputs, and for <select>.
|
||||
Note -moz-focus-inner padding does not affect button size. */
|
||||
padding-block: 0;
|
||||
padding-block: 1px;
|
||||
padding-inline: 8px;
|
||||
border: 2px outset ThreeDLightShadow;
|
||||
background-color: ButtonFace;
|
||||
|
|
Загрузка…
Ссылка в новой задаче