mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-11 14:28:42 +00:00
Bug 610733. Vertically center the text in the combobox display area when a non-default height is set for the combobox. r=dbaron
This commit is contained in:
parent
05878d4b12
commit
bbe206097b
@ -4,3 +4,4 @@ skip-if(B2G) == multiple.html multiple-ref.html
|
||||
== dynamic-boguskids.html boguskids-ref.html
|
||||
== option-children.html option-children-ref.html
|
||||
fuzzy(1,4) == padding-button-placement.html padding-button-placement-ref.html
|
||||
HTTP(../..) == vertical-centering.html vertical-centering-ref.html
|
||||
|
23
layout/reftests/forms/select/vertical-centering-ref.html
Normal file
23
layout/reftests/forms/select/vertical-centering-ref.html
Normal file
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "Ahem";
|
||||
src: url(../../fonts/Ahem.ttf);
|
||||
}
|
||||
select {
|
||||
-moz-appearance: none;
|
||||
border: none;
|
||||
font-family: Ahem;
|
||||
font-size: 20px;
|
||||
box-sizing: content-box;
|
||||
/*
|
||||
* Why are these top/bottom paddings 7px rather than 10px? 1px each is
|
||||
* eaten up by padding on the combobox display area, but I have no idea
|
||||
* where the extra 4px somewhere else are coming from...
|
||||
*/
|
||||
padding: 7px 0 7px 0;
|
||||
}
|
||||
</style>
|
||||
<select>
|
||||
<option>X</option>
|
||||
</select>
|
19
layout/reftests/forms/select/vertical-centering.html
Normal file
19
layout/reftests/forms/select/vertical-centering.html
Normal file
@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "Ahem";
|
||||
src: url(../../fonts/Ahem.ttf);
|
||||
}
|
||||
select {
|
||||
-moz-appearance: none;
|
||||
border: none;
|
||||
font-family: Ahem;
|
||||
font-size: 20px;
|
||||
padding: 0;
|
||||
box-sizing: content-box;
|
||||
height: 40px;
|
||||
}
|
||||
</style>
|
||||
<select>
|
||||
<option>X</option>
|
||||
</select>
|
@ -282,6 +282,7 @@ select:empty {
|
||||
/* Make sure to size correctly if the combobox has a non-auto height. */
|
||||
height: 100% ! important;
|
||||
box-sizing: border-box ! important;
|
||||
line-height: -moz-block-height;
|
||||
}
|
||||
|
||||
option {
|
||||
|
Loading…
x
Reference in New Issue
Block a user