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

Fix ::first-letter in print style causing incorrect rendering in Chrome #1962

Merged
merged 1 commit into from
Jul 11, 2017
Merged

Conversation

coliff
Copy link
Member

@coliff coliff commented Jul 11, 2017

Chrome currently has a bug (when printing) that results in
::first-letter being vertically misaligned under certain (seemingly
unrelated) conditions. This PR fixes issue by removing the CSS that
causes the issue.

Thanks @patrickhlauke for the heads-up on this. (#1961)

For reference; the Chrome issue is logged at: https://bugs.chromium.org/p/chromium/issues/detail?id=739800

Types of changes

  • [ x] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [x ] My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • [x ] I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Chrome currently has a bug (when printing) that results in
::first-letter being vertically misaligned under certain (seemingly
unrelated) conditions. This PR fixes issue by removing the CSS that
causes the issue.
@coliff coliff changed the title ::first-letter in print style can cause incorrect rendering in Chrome Fix ::first-letter in print style causing incorrect rendering in Chrome Jul 11, 2017
@ArmorDarks
Copy link

I wonder what ::first-letter was doing here anyway? It doesn't seem to help anything, isn't it?

@patrickhlauke
Copy link

patrickhlauke commented Jul 11, 2017

@ArmorDarks i believe that's there to make sure any instances of text/box shadow are caught. Not tested, but likely that in at least some browsers pseudo elements aren't caught by a general * selector for certain styles... (and/or that they don't correctly inherit the styles from their actual parent element)

@roblarsen
Copy link
Member

@ArmorDarks @patrickhlauke Yes, precisely that. the list of pseudo elements is there because the universal selector isn't enough. It started with this commit

@roblarsen roblarsen merged commit efa3db1 into h5bp:master Jul 11, 2017
patrickhlauke added a commit to twbs/bootstrap that referenced this pull request Jul 11, 2017
Bootstrap itself doesn't use any `::first-letter` or `::first-line`
styles. These selectors also cause(d) problems in IE11 (see
h5bp/html5-boilerplate#1799) and currently cause
a nasty rendering bug in Chrome where the first letter is vertically
shifted (see #21771)

As h5bp has now removed these as well, no need to keep and comment them
out. See h5bp/html5-boilerplate#1961 /
h5bp/html5-boilerplate#1962
jeffreznik pushed a commit to jeffreznik/sw-test that referenced this pull request Oct 15, 2017
…h5bp#1962)

Chrome currently has a bug (when printing) that results in
::first-letter being vertically misaligned under certain (seemingly
unrelated) conditions. This PR fixes issue by removing the CSS that
causes the issue.
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.

4 participants