Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HR: no need for Firefox normalization #817

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mattbrundage
Copy link
Contributor

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

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``
@SiarheiBobryk
Copy link

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
Copy link

@necolas up

marella added a commit to marella/modernize that referenced this pull request Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants