Don't reset ::first-letter in Preflight #13408
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #13405
Previously we were applying our global reset rules to the
::first-letter
pseudo to ensure it interacted with utility classes the same way as other elements, but touching that pseudo has some unfortunate side effects, including causing::selection
styles to not apply to the first letter as well as showing the default mouse cursor when hovering over the first letter instead of the text selection cursor.I don't think there's anything really lost by removing this, because
::first-letter
already has no padding or margin applied and doesn't supportbox-sizing
. The only place it would have mattered previously is border styles, but now that we don't actually rely on Preflight in order to setborder-style
when adding aborder-*
utility, this will work fine anyways. Even if it didn't, it would be a better trade off to have to addfirst-letter:border-solid
when necessary vs. dealing with the side-effects I've mentioned of touching that pseudo-element.