зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1430141
- Remove hardcoded <input type=number> width. r=jfkthame
Now that we're subclassing nsTextControlFrame we can use the regular replaced element intrinsic sizing, rather than just faking it in the UA sheet with a suspicious width declaration. Differential Revision: https://phabricator.services.mozilla.com/D59981 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
adce7e15a3
Коммит
43f69ea130
|
@ -0,0 +1,22 @@
|
|||
<!doctype html>
|
||||
<style>
|
||||
label {
|
||||
padding: 2px 4px;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
background: #ddd;
|
||||
overflow: hidden;
|
||||
min-height: 0;
|
||||
min-width: 0;
|
||||
width: 80px;
|
||||
}
|
||||
input {
|
||||
flex: 1 1 auto;
|
||||
margin: 4px;
|
||||
min-height: 0;
|
||||
min-width: 0;
|
||||
}
|
||||
</style>
|
||||
<label>
|
||||
<input type="text">
|
||||
</label>
|
|
@ -0,0 +1,23 @@
|
|||
<!doctype html>
|
||||
<style>
|
||||
label {
|
||||
padding: 2px 4px;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
background: #ddd;
|
||||
overflow: hidden;
|
||||
min-height: 0;
|
||||
min-width: 0;
|
||||
width: 80px;
|
||||
}
|
||||
input {
|
||||
flex: 1 1 auto;
|
||||
margin: 4px;
|
||||
min-height: 0;
|
||||
min-width: 0;
|
||||
-moz-appearance: textfield;
|
||||
}
|
||||
</style>
|
||||
<label>
|
||||
<input type="number">
|
||||
</label>
|
|
@ -23,6 +23,7 @@ fuzzy-if(skiaContent,0-2,0-13) == show-value.html show-value-ref.html
|
|||
|
||||
# auto width:
|
||||
== number-auto-width-1.html number-auto-width-1-ref.html
|
||||
== flex.html flex-ref.html
|
||||
|
||||
# min-height/max-height tests:
|
||||
skip-if(Android) == number-min-height-1.html number-min-height-1-ref.html
|
||||
|
|
|
@ -7,16 +7,6 @@
|
|||
div { padding: 10px; }
|
||||
.a { -moz-appearance:textfield; }
|
||||
.b { -moz-appearance:none; }
|
||||
|
||||
.ltr input[type="number"],
|
||||
.rtl input[type="number"] {
|
||||
width: 20ch;
|
||||
}
|
||||
|
||||
.v-rl input[type="number"] {
|
||||
height: 20ch;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div class=ltr>
|
||||
<input type=number value=123><br><br>
|
||||
|
|
|
@ -979,10 +979,6 @@ input[type=range]::-moz-range-thumb {
|
|||
|
||||
input[type="number"] {
|
||||
-moz-appearance: number-input;
|
||||
/* Has to revert some properties applied by the generic input rule. */
|
||||
inline-size: 20ch; /* It'd be nice if this matched the default inline-size
|
||||
of <input type=text>, but that's not easy to achieve
|
||||
due to platform differences. */
|
||||
}
|
||||
|
||||
input[type=number]::-moz-number-wrapper {
|
||||
|
|
Загрузка…
Ссылка в новой задаче