-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix display of wrapped whitespace in show-whitespace
#3292
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
Conversation
|
Great idea if it works reliably. However I’d preserve the previous opacity, this one isn’t very visible. |
|
That's just the very thin tab character from Inconsolata flattened to I'm still working on using (As mentioned Figma flattens all text nodes to |
|
You can make the SVG from scratch, it’s just 2 tags ( |
|
Looks like there is no way for SVG backgrounds (either using Instead I'd propose the use of static Open to other ideas as well. |
|
That’s right 👍 let’s match the current color though |
Done! |
show-whitespace
|
This is a clever solution and it appears to work. Let's see if it causes any issues in the real world, I'll publish this today. |
Fixes: #2991
Uses clipped SVG background images for spaces and tabs, this makes it more flexible for text wrapping, and any other future characters (#2150).
Test
text wrapping issue from
show-whitespaceisn't wrapped to next line properly #2991standalone file
diff
gist
This PR is still in the works, as SVG content used are static paths, which should ideally be text nodes that inherit font from DOM (Figma still flattens all text nodes while exporting).
I tried to match the existing styles (and size) as much as possible, but we might have to reconsider that anyway (i.e. using actual text).
Edit: Updated GIFs