diff --git a/layout/style/res/forms.css b/layout/style/res/forms.css index 70ff25440a30..8a1f09a4a31d 100644 --- a/layout/style/res/forms.css +++ b/layout/style/res/forms.css @@ -676,7 +676,6 @@ input[type="file"] { input[type="file"] > label { display: inline-block; min-inline-size: 12em; - padding-inline-start: 5px; text-align: match-parent; color: unset; @@ -692,6 +691,7 @@ input[type="file"] > label { font-size: unset; letter-spacing: unset; cursor: unset; + margin-inline-end: 5px; } /* diff --git a/testing/web-platform/mozilla/tests/css/file-selector-button-margin-notref.html b/testing/web-platform/mozilla/tests/css/file-selector-button-margin-notref.html new file mode 100644 index 000000000000..67fc0af38993 --- /dev/null +++ b/testing/web-platform/mozilla/tests/css/file-selector-button-margin-notref.html @@ -0,0 +1,2 @@ + + diff --git a/testing/web-platform/mozilla/tests/css/file-selector-button-margin.html b/testing/web-platform/mozilla/tests/css/file-selector-button-margin.html new file mode 100644 index 000000000000..f2f4e87d9338 --- /dev/null +++ b/testing/web-platform/mozilla/tests/css/file-selector-button-margin.html @@ -0,0 +1,10 @@ + +CSS Test: margin can be used to shrink the spacing betwee the file selector button and its label + + + +