From 93c8f461d8958b6a9d84b325f2375043e1f62559 Mon Sep 17 00:00:00 2001 From: Matt Brundage <1263178+mattbrundage@users.noreply.github.com> Date: Fri, 20 Nov 2020 13:46:42 -0500 Subject: [PATCH] ::-moz-focus-inner: remove unnecessary specificity Updated to use the same specificity as in Mozilla's user agent stylesheet (``resource://gre-resources/forms.css``) Also, this ``::-moz-focus-inner`` rule has no effect on the primary focus style of buttons, so we don't have to "restore" focus styles with a ``:-moz-focusring`` rule. ``:-moz-focusring`` styles are set in ``resource://gre-resources/html.css`` Reduced test case: https://codepen.io/mattbrundage/pen/LYZKNYJ --- normalize.css | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/normalize.css b/normalize.css index 192eb9c..8abad7e 100644 --- a/normalize.css +++ b/normalize.css @@ -203,23 +203,9 @@ button, * Remove the inner border and padding in Firefox. */ -button::-moz-focus-inner, -[type="button"]::-moz-focus-inner, -[type="reset"]::-moz-focus-inner, -[type="submit"]::-moz-focus-inner { - border-style: none; - padding: 0; -} - -/** - * Restore the focus styles unset by the previous rule. - */ - -button:-moz-focusring, -[type="button"]:-moz-focusring, -[type="reset"]:-moz-focusring, -[type="submit"]:-moz-focusring { - outline: 1px dotted ButtonText; +::-moz-focus-inner { + border: 0; + padding: 0; } /**