зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1793700 - follow-up: Make color control styling match Chromium. r=TYLin
The previous patch made me realize that we have this widget-imposed size for color controls which doesn't match any other browser. This patch removes it. I don't feel strongly whether we should land this other than "it matches other browsers, and removes a special case from Gecko". Behavior might be simpler to understand for authors this way. Differential Revision: https://phabricator.services.mozilla.com/D158620
This commit is contained in:
Родитель
068320e154
Коммит
f4b0644e06
|
@ -8,14 +8,10 @@ div.input-color-swatch {
|
|||
border: 1px solid grey;
|
||||
display: block;
|
||||
background-color: #000000; /* default color for input type color */
|
||||
height: 20px; /* for a real ::-moz-color-swatch, its 100% height computes to
|
||||
the widget-supplied min-height (32px) minus padding
|
||||
(4px each side) minus border (2px each side) */
|
||||
}
|
||||
|
||||
button.input-color {
|
||||
width: 64px;
|
||||
height: 23px;
|
||||
min-height: 32px; /* widget-supplied min-height */
|
||||
height: 32px;
|
||||
padding: 4px; /* widget-supplied padding */
|
||||
}
|
||||
|
|
|
@ -15,12 +15,12 @@ input[type=color] {
|
|||
.ltr input[type="color"],
|
||||
.rtl input[type="color"] {
|
||||
width: 64px;
|
||||
height: 23px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.v-rl input[type="color"] {
|
||||
height: 64px;
|
||||
width: 23px;
|
||||
width: 32px;
|
||||
}
|
||||
</style>
|
||||
<div class=ltr>
|
||||
|
|
|
@ -523,7 +523,7 @@ input:is([type=reset], [type=button], [type=submit]) {
|
|||
|
||||
input[type=color] {
|
||||
inline-size: 64px;
|
||||
block-size: 23px;
|
||||
block-size: 32px;
|
||||
}
|
||||
|
||||
@media (-moz-non-native-content-theme) {
|
||||
|
|
|
@ -72,7 +72,6 @@ static constexpr gfx::sRGBColor sColorMeterRed10(
|
|||
static constexpr gfx::sRGBColor sColorMeterRed20(
|
||||
gfx::sRGBColor::UnusualFromARGB(0xff810220));
|
||||
|
||||
static const CSSCoord kMinimumColorPickerHeight = 32.0f;
|
||||
static const CSSCoord kMinimumRangeThumbSize = 20.0f;
|
||||
static const CSSCoord kMinimumDropdownArrowButtonWidth = 18.0f;
|
||||
static const CSSCoord kMinimumSpinnerButtonWidth = 18.0f;
|
||||
|
@ -1516,11 +1515,6 @@ LayoutDeviceIntSize Theme::GetMinimumWidgetSize(nsPresContext* aPresContext,
|
|||
|
||||
LayoutDeviceIntSize result;
|
||||
switch (aAppearance) {
|
||||
case StyleAppearance::Button:
|
||||
if (aFrame->IsColorControlFrame()) {
|
||||
result.height = (kMinimumColorPickerHeight * dpiRatio).Rounded();
|
||||
}
|
||||
break;
|
||||
case StyleAppearance::RangeThumb:
|
||||
result.SizeTo((kMinimumRangeThumbSize * dpiRatio).Rounded(),
|
||||
(kMinimumRangeThumbSize * dpiRatio).Rounded());
|
||||
|
|
Загрузка…
Ссылка в новой задаче