Bug 1688325 - Make textarea default padding 2px on all platforms. r=dholbert,jdescottes

This matches other browsers, and the default themed textareas on Windows
too.

To be landed after the soft freeze, just in case, of course.

Differential Revision: https://phabricator.services.mozilla.com/D102843
This commit is contained in:
Emilio Cobos Álvarez 2021-01-25 12:33:28 +00:00
Родитель fd4c7353ad
Коммит 09c872c3ef
5 изменённых файлов: 14 добавлений и 16 удалений

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

@ -384,6 +384,8 @@ InplaceEditor.prototype = {
// Hide the textarea resize handle.
this.input.style.resize = "none";
this.input.style.overflow = "hidden";
// Also reset padding.
this.input.style.padding = "0";
}
this.input.classList.add("styleinspector-propertyeditor");

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

@ -63,10 +63,9 @@ fuzzy(0-116,0-94) fuzzy-if(winWidget,0-135,0-124) == 1115916-1-vertical-metrics.
== ua-style-sheet-fieldset-1.html ua-style-sheet-fieldset-1-ref.html
# These don't like padding on textareas by default different to the UA stylesheet ones.
# FIXME(emilio): Maybe these should be rewritten to use -moz-appearance: none?
skip-if(Android||winWidget||!nativeThemePref) == ua-style-sheet-textarea-1.html ua-style-sheet-textarea-1a-ref.html
skip-if(!winWidget) == ua-style-sheet-textarea-1.html ua-style-sheet-textarea-1c-ref.html
# Android theme uses different padding in themed textareas by default.
skip-if(Android) == ua-style-sheet-textarea-1.html ua-style-sheet-textarea-1a-ref.html
skip-if(Android) == ua-style-sheet-textarea-1.html ua-style-sheet-textarea-1c-ref.html
fuzzy-if(Android,0-1,0-18) == ua-style-sheet-checkbox-radio-1.html ua-style-sheet-checkbox-radio-1-ref.html
# Android uses different margins for buttons compared to the ref.

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

@ -7,11 +7,11 @@
.ltr textarea, .rtl textarea {
margin: 1px 0;
padding: 0 1px;
padding: 2px;
}
.v-rl textarea {
margin: 0 1px;
padding: 1px 0;
padding: 2px;
}
</style>
<div class=ltr>

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

@ -5,8 +5,6 @@
.v-rl { writing-mode: vertical-rl; }
.ltr, .rtl, .v-rl { border: 1px solid blue; }
/* Vista or later wants 2px padding on textareas by default,
see nsNativeThemeWin::GetWidgetPadding(). */
textarea {
padding: 2px;
}

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

@ -99,6 +99,12 @@ input {
overflow-clip-box: padding-box content-box;
}
@media (-moz-non-native-content-theme) {
input {
padding-inline: 2px;
}
}
input::-moz-text-control-editing-root,
input::placeholder {
word-wrap: normal;
@ -111,8 +117,7 @@ textarea {
-moz-default-appearance: textarea;
margin-block: 1px;
border: 2px inset ThreeDLightShadow;
/* The 1px inline padding is for parity with Win/IE */
padding-inline: 1px;
padding: 2px;
background-color: Field;
color: FieldText;
font: medium -moz-fixed;
@ -125,12 +130,6 @@ textarea {
overflow-clip-box: content-box;
}
@media (-moz-non-native-content-theme) {
input, textarea {
padding-inline: 2px;
}
}
/* A few properties that we don't want to inherit by default: */
input, textarea, select, button, ::file-selector-button {
text-align: initial;