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

::first-letter in print style can cause incorrect rendering in Chrome #1961

Closed
1 of 3 tasks
patrickhlauke opened this issue Jul 11, 2017 · 4 comments
Closed
1 of 3 tasks

Comments

@patrickhlauke
Copy link

I'm submitting a ...

  • bug report
  • feature request
  • other (Please do not submit support requests here (below))

Chrome currently has a bug that results in ::first-letter being vertically misaligned under certain (seemingly unrelated) conditions. See this fairly long-standing Bootstrap bug twbs/bootstrap#21771

There is an issue in Chrome's bug tracker - however, for some reason, the issue was recently locked/restricted (possibly because it has security implications). The bug is/was https://bugs.chromium.org/p/chromium/issues/detail?id=739800, filed a few days ago (I've asked contacts at Google if it would be possible to un-restrict the bug again).

For Bootstrap, I'm likely going to simply remove the ::first-letter and ::first-line selectors since BS doesn't mess with any of those (see twbs/bootstrap#23044)

@coliff
Copy link
Member

coliff commented Jul 11, 2017

Interesting. I think it'd make sense to remove ::first-letter and ::first-line selectors from the print styles until the Chrome issue is resolved then as it does look pretty messed up. I'll open a PR. Thanks for heads-up!

@roblarsen
Copy link
Member

Thanks @patrickhlauke and @coliff 🥇

@roblarsen
Copy link
Member

closed via #1962

patrickhlauke added a commit to twbs/bootstrap that referenced this issue 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
@slackday
Copy link

slackday commented Oct 2, 2017

Nice that this has been removed. I've been trying to fix it in projects using this build of Bootstrap. For anyone else using alpha/beta builds of Bootstrap and needs to fix this issue you can add

@media print {
  *::first-letter {
    position: relative !important; 
  }
}

to your project stylesheet.

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

No branches or pull requests

4 participants