Bug 1689044 - Stop messing with button padding on :hover:active buttons by default. r=dholbert

This is not particularly efficient, and our non-native theme has
different paddings by default which causes test failures.

We could fix this with a bunch of other media queries, but it doesn't
seem worth it, other browsers don't do this, and we were already working
around it on mac anyways.

While at it, turn the border declaration into just `border-style`, which is
the only thing it's needed to override the `:hover:active` rule above. That
shouldn't have any behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D103143
This commit is contained in:
Emilio Cobos Álvarez 2021-01-27 23:32:07 +00:00
Родитель 45e159fc05
Коммит db72ef806e
1 изменённых файлов: 1 добавлений и 9 удалений

Просмотреть файл

@ -625,10 +625,6 @@ input:is([type=reset], [type=button], [type=submit]):hover {
::file-selector-button:active:hover,
button:active:hover,
input:is([type=reset], [type=button], [type=submit], [type=color]):active:hover {
%ifndef XP_MACOSX
padding-block: 0;
padding-inline: 9px 7px;
%endif
border-style: inset;
background-color: ButtonFace;
}
@ -658,11 +654,7 @@ input:is([type=reset], [type=button], [type=submit]):active:hover {
button:is(:disabled, :disabled:active),
input:is([type=reset], [type=button], [type=submit], [type=color]):is(:disabled, :disabled:active),
select:is(:disabled, :disabled:active) > button {
/* The sum of border and padding on block-start and block-end
must be the same here and for text inputs */
padding-block: 0;
padding-inline: 8px;
border: 2px outset ThreeDLightShadow;
border-style: outset;
cursor: unset;
}