Closed medienbaecker closed 2 years ago
@medienbaecker The correct method would probably to measure the width of a space in the sans-serif font. However, I don’t want to add that kind of complexity and I think, I found a good alternative solution by using an SVG instead of a radial gradient, which also renders nicer thanks to the power of anti-aliasing:
@medienbaecker Please test and tell me, if that solves the issue for you. :-)
@fabianmichael It works flawlessly, even for all the edge cases I tested like a zoomed-in editor or Safari. Great solution! 👏
I just noticed a very weird issue with soft hyphens and I think it's related to this change. Insert a soft hyphen when invisibles are turned on and you experience this oddity:
@medienbaecker Sorry, I cannot reproduce your issue. Can you please provide your me browser/version?
I can reproduce it in multiple browsers, including the latest Chrome.
Steps to reproduce:
@medienbaecker Now I was able to reproduce this error. It seems like this has been caused by a CodeMirror update and related to the use of decorations (used to render whitespace). I honestly don’t have to time to look into that know. I would rather keep an eye on the next Codemirror updates and try if they fix this problem.
@medienbaecker I tried to replicate this today again … and for some reason I cannot do that. Weird … has the last dependency update yesterday changed anything for you?
@fabianmichael It has indeed solved the issue for me too. We were probably the only ones noticing this and they quickly fixed it in CodeMirror without telling anyone 😅
The position of invisible characters seems to be off when
font: sans-serif
is used. They're barely visible when toggled on.Kirby 3.6.0 Chrome 95.0.4638.69 macOS 12.0.1