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

Docs: Text in code snippets is tiny in Firefox #2977

Closed
rtorr opened this issue Jan 29, 2015 · 8 comments
Closed

Docs: Text in code snippets is tiny in Firefox #2977

rtorr opened this issue Jan 29, 2015 · 8 comments

Comments

@rtorr
Copy link

@rtorr rtorr commented Jan 29, 2015

Tested firefox 35/37

Left is chrome, right is firefox 35

screenshot 2015-01-29 09 31 45

@sedovsek
Copy link
Contributor

@sedovsek sedovsek commented Jan 30, 2015

Computed font-size of <code> element is:

  • 12.8px in Chrome and
  • 10.4px in Firefox.

It appears to me that Chrome somehow 'ignores' font-size of <code>'s first preceding element (<pre>), which has its font-size set to 13px, which would result in <code>'s computed font-size to be 10.4px, not 12.8px (resulting from 16*0.8).

@sedovsek
Copy link
Contributor

@sedovsek sedovsek commented Jan 30, 2015

It's rather odd… here's the video recording: http://recordit.co/0AYbaF6WCa
Although computed value is 13px, it has zero effect on typography of its child elements, unless you manually set the font-size to 13px.

I wish someone could explain this.

@zpao
Copy link
Member

@zpao zpao commented Jan 30, 2015

So Firefox is right and Chrome is wrong?

Feel free to fix (either way) with hacky CSS if you want!

@sedovsek
Copy link
Contributor

@sedovsek sedovsek commented Jan 30, 2015

@zpao That would be my guess, yes.
I'll take another look today, it was way past midnight last night, so I may have missed something. Either way, I'l like to get to the bottom of this issue and report a bug to Chrome if necessary.

@sedovsek
Copy link
Contributor

@sedovsek sedovsek commented Jan 31, 2015

@zpao, hey. PR is here: #2999
I found quite some interesting discrepancies on how browsers render <code>'s font-size. I wrote a short articles to summarise my findings.

@rtorr
Copy link
Author

@rtorr rtorr commented Feb 1, 2015

@sedovsek interesting. I had no idea this would be a rabbit hole of information. I had no time when I reported this to dig deeper. Good work!

@zpao
Copy link
Member

@zpao zpao commented Feb 2, 2015

PR is in, this will be all fine the next time we generate the website. Thanks again!

@zpao zpao closed this Feb 2, 2015
@sedovsek
Copy link
Contributor

@sedovsek sedovsek commented Feb 2, 2015

@zpao My pleasure. I have never learned so much from a trivial bug. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.