diff options
author | Moonchild <moonchild@palemoon.org> | 2022-07-22 15:06:19 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-07-22 15:06:19 +0000 |
commit | 3d954cb29cce81e033a6c216ac29138e5fe7b571 (patch) | |
tree | 70725df059014efd46d260fa12fb74afc65faf9d /layout/style | |
parent | 1aa650b8acbe9e2e0ebddd255dd61532b5bb2086 (diff) | |
download | uxp-3d954cb29cce81e033a6c216ac29138e5fe7b571.tar.gz |
Issue #1970 - Part 2: Remove the extra padding on buttons
Extra padding was created for a prospective -moz-focus-inner ring.
We now just size that ring the same as the content frame, inflated by its CSS
padding.
Diffstat (limited to 'layout/style')
-rw-r--r-- | layout/style/nsLayoutStylesheetCache.cpp | 1 | ||||
-rw-r--r-- | layout/style/res/forms.css | 17 |
2 files changed, 9 insertions, 9 deletions
diff --git a/layout/style/nsLayoutStylesheetCache.cpp b/layout/style/nsLayoutStylesheetCache.cpp index 7c09202e6a..9591ad4f4a 100644 --- a/layout/style/nsLayoutStylesheetCache.cpp +++ b/layout/style/nsLayoutStylesheetCache.cpp @@ -637,7 +637,6 @@ nsLayoutStylesheetCache::BuildPreferenceSheet(RefPtr<StyleSheet>* aSheet, "button::-moz-focus-inner, input[type=\"reset\"]::-moz-focus-inner, " "input[type=\"button\"]::-moz-focus-inner, " "input[type=\"submit\"]::-moz-focus-inner { " - "padding: 1px 2px 1px 2px; " "border: %dpx %s transparent !important; }\n", focusRingWidth, focusRingStyle == 0 ? "solid" : "dotted"); diff --git a/layout/style/res/forms.css b/layout/style/res/forms.css index db75151d48..b0b171a892 100644 --- a/layout/style/res/forms.css +++ b/layout/style/res/forms.css @@ -627,12 +627,12 @@ input[type="button"], input[type="submit"] { -moz-appearance: button; /* The sum of border and padding on block-start and block-end - must be the same here, for text inputs, and for <select>. For - buttons, make sure to include the -moz-focus-inner border/padding. */ + must be the same here, for text inputs, and for <select>. + Note -moz-focus-inner padding does not affect button size. */ padding-block-start: 0px; - padding-inline-end: 6px; + padding-inline-end: 8px; padding-block-end: 0px; - padding-inline-start: 6px; + padding-inline-start: 8px; border: 2px outset ThreeDLightShadow; background-color: ButtonFace; cursor: default; @@ -725,9 +725,9 @@ input[type="button"]:active:hover, input[type="submit"]:active:hover { %ifndef XP_MACOSX padding-block-start: 0px; - padding-inline-end: 5px; + padding-inline-end: 7px; padding-block-end: 0px; - padding-inline-start: 7px; + padding-inline-start: 9px; %endif border-style: inset; background-color: ButtonFace; @@ -746,6 +746,7 @@ input[type="reset"]::-moz-focus-inner, input[type="button"]::-moz-focus-inner, input[type="submit"]::-moz-focus-inner, input[type="file"] > button[type="button"]::-moz-focus-inner { + /* Note this padding only affects the -moz-focus-inner ring, not the button itself */ padding-block-start: 0px; padding-inline-end: 2px; padding-block-end: 0px; @@ -776,9 +777,9 @@ input[type="submit"]:disabled { /* The sum of border and padding on block-start and block-end must be the same here and for text inputs */ padding-block-start: 0px; - padding-inline-end: 6px; + padding-inline-end: 8px; padding-block-end: 0px; - padding-inline-start: 6px; + padding-inline-start: 8px; border: 2px outset ThreeDLightShadow; cursor: inherit; } |