fix: support letter and word spacing in text - #252
Open
SulimanAbdulrazzaq wants to merge 4 commits into
Open
Conversation
Contributor
|
@SulimanAbdulrazzaq Thanks for working on this. The direction looks good, but the CI failure is a real type error. Also, measury@0.1.5 already applies numeric letterSpacing and wordSpacing, so passing them to measure() and then adding spacingWidth again would double-count spacing in SSR. The current mocked test hides this. Could you normalize the supported CSS lengths once, avoid the extra SSR addition, and add an unmocked regression test? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #184.
letterSpacingandwordSpacingin browser and SSR text measurements.word-spacingthrough the text renderer and apply both spacing values as CSS lengths.This keeps the change focused on the core
Textpipeline; business-component-specific style props and optional measurement caching are intentionally outside this PR.Validation
prettier --check(passed)git diff --check(passed)