-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[v4] ::first-letter reset causes inaccurate text selection #13405
Comments
Thanks! Fixed here: #13408 |
Hey @adamwathan , thanks for your quick response and quick fix. Unfortunately, after the update, when I try to run the app, it throws an error:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Tailwind CSS are you using?
v4.0.0-alpha.11
What build tool (or framework if it abstracts the build tool) are you using?
Next.js v14.1.4
What version of Node.js are you using?
v20.9.0
What browser are you using?
Chrome, Safari
What operating system are you using?
macOS
Reproduction URL
https://github.com/mdillgen/tw4-test.git
Describe your issue
In this Tailwind version, some rules of the preflight (or CSS reset) have been extended by the ::first-letter pseudo-element. This leads to the – in my opinion undesirable – side effect, that rules for the ::selection pseudo-element (formatting of selected text) are not applied to the first character of text elements. The character is handled separately, somewhat out of the flow.
See the attached screen recording, which illustrates this issue.
Please note that the problem occurs at least in Chrome and Safari and does not occur in Firefox (MacOS).
tw4-first-letter-issue.mov
The text was updated successfully, but these errors were encountered: