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

Comments

Projects
None yet
4 participants
@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

This comment has been minimized.

Show comment
Hide comment
@sedovsek

sedovsek Jan 30, 2015

Contributor

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).

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@sedovsek

sedovsek Jan 30, 2015

Contributor

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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@zpao

zpao Jan 30, 2015

Member

So Firefox is right and Chrome is wrong?

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

Member

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

This comment has been minimized.

Show comment
Hide comment
@sedovsek

sedovsek Jan 30, 2015

Contributor

@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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@sedovsek

sedovsek Jan 31, 2015

Contributor

@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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@rtorr

rtorr 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!

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

This comment has been minimized.

Show comment
Hide comment
@zpao

zpao Feb 2, 2015

Member

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

Member

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

This comment has been minimized.

Show comment
Hide comment
@sedovsek

sedovsek Feb 2, 2015

Contributor

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

Contributor

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