normalize.css icon indicating copy to clipboard operation
normalize.css copied to clipboard

HR: no need for Firefox normalization

Open mattbrundage opened this issue 5 years ago • 2 comments

Firefox no longer needs box-sizing and height rules, as the browser's stylesheet now specifies the correct box-sizing value and does not affect height. Tested in Firefox ESR (v. 68) through Firefox Developer Edition (v. 76).

Paste this into Firefox's address bar to view the browser's default styles: view-source:resource://gre-resources/html.css

mattbrundage avatar Apr 23 '20 16:04 mattbrundage

Completely agree with @mattbrundage!

I can confirm that the box-sizing and height rules are not required for Firefox anymore. Actually I was going to submit the same changes, but @mattbrundage was first 🙂

According to User Agent Stylesheet there is already defined box-sizing: content-box; style for Firefox.

/* <hr> noshade and color attributes are handled completely by
 * the nsHTMLHRElement attribute mapping code
 */
hr {
  display: block;
  border: 1px inset;
  margin-block-start: 0.5em;
  margin-block-end: 0.5em;
  margin-inline-start: auto;
  margin-inline-end: auto;
  color: gray;
  -moz-float-edge: margin-box;
  box-sizing: content-box;
}

hr[size="1"] {
  border-style: solid none none none;
}
Screen Shot 2020-09-13 at 12 06 13 pm

Also, I can confirm that height calculates properly in Firefox now.

Screen Shot 2020-09-13 at 12 11 54 pm

SiarheiBobryk avatar Sep 13 '20 09:09 SiarheiBobryk

@necolas up

SiarheiBobryk avatar Sep 14 '20 14:09 SiarheiBobryk