Skip to content

feat(css): text-stroke support#10399

Merged
NathanWalker merged 4 commits intomainfrom
feat/css-text-stroke
Oct 9, 2023
Merged

feat(css): text-stroke support#10399
NathanWalker merged 4 commits intomainfrom
feat/css-text-stroke

Conversation

@NathanWalker
Copy link
Copy Markdown
Contributor

@NathanWalker NathanWalker commented Oct 9, 2023

PR Checklist

What is the current behavior?

You could not easily add stroke to text and core did not support text-stroke.

What is the new behavior?

CSS property text-stroke is now supported per this spec:
https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-text-stroke

Example:

<Label style="text-stroke: 1px black">text-stroke</Label>
Screenshot 2023-10-08 at 7 25 12 PM

closes #3597
closes #3972

@NathanWalker NathanWalker added this to the 8.6 milestone Oct 9, 2023
@cla-bot cla-bot bot added the cla: yes label Oct 9, 2023
@farfromrefug
Copy link
Copy Markdown
Collaborator

@NathanWalker I think the StyleableTextView should be native. By creating you actually made every single Label slower because it has o go through JS on every draw.
Seeing label is the most important(used) view, I think it s an issue

Copy link
Copy Markdown
Contributor

@shirakaba shirakaba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some passing thoughts while eating a donut. I haven't looked too closely beyond the bits I've commented on.

@NathanWalker
Copy link
Copy Markdown
Contributor Author

@NathanWalker I think the StyleableTextView should be native. By creating you actually made every single Label slower because it has o go through JS on every draw. Seeing label is the most important(used) view, I think it s an issue

Good call @farfromrefug I’ll make it native.

@NathanWalker NathanWalker merged commit d647823 into main Oct 9, 2023
@NathanWalker NathanWalker deleted the feat/css-text-stroke branch October 9, 2023 19:00
tdermendjiev pushed a commit to tdermendjiev/NativeScript that referenced this pull request Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: text-stroke property and/or text-shadow [Feature] add outline to label and button text

3 participants