-
Notifications
You must be signed in to change notification settings - Fork 146
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
white space implementation #120
white space implementation #120
Conversation
Whitespace implementation could be externalized because it is currently split on different components during different phases:
It also externalize computeWidth with a simple left to right length (here) |
Examples are still showing white-space (glitch) because defaults was set to 'pre-wrap' which I interpreted as being the implicitely implemention. Examples are also modified to suggest resolution for nested blocks & tutorial result |
Hi @swingingtom, thanks a lot for your work ! I think we will go for this PR over #117, because I would like to discuss about what should be the default. If we keep Also I sent you a PM on discourse. |
Perhaps it didn't exist before "kerning" implementation. It changed width to use xadvance which tends to be a bit bigger than width.
Same goes for me. I didn't set it because 'pre-wrap' was the displayed behaviour before I start implementing. Also, I would like to split all the whitespace logic into another file. But Im not sure where to place it. Any suggestions ? |
'pre-line' has been set as default. |
Thanks a lot for your work on this @swingingtom, it's really clean 👌 |
@felixmariotto Thanks. Im glad to participate. |
Ah my bad... Sorry |
No worries, with a little work I was able to merge it all together :) The main challenge was with the InlineManager, so @swingingtom and @felixmariotto make sure you double check that part before accepting #122. |
This PR is more a complete resolution for #109 than #117
But is also more complex. It implements white-space property with
normal
,pre-wrap
& 'pre-line' based on https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Whitespace and https://developer.mozilla.org/en-US/docs/Web/CSS/white-space