Skip to content
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

:justify attribute not working to spread out elements in container #33

Open
chromalchemy opened this issue Mar 17, 2017 · 2 comments
Open

Comments

@chromalchemy
Copy link

chromalchemy commented Mar 17, 2017

Tried:
(elem :sh 200 :ah :justify (for [x [ 1 2 3]] (elem :s 10 x))))
(elem :sh 200 :ah :jst (for [x [ 1 2 3]] (elem :s 10 x))))

Does this attribute require absolute sizes or can it go in ratio-based containers?

@jumblerg
Copy link
Member

jumblerg commented Mar 20, 2017

thanks for the report!

:jst is the value you want to pass :ah. i verified that this works on text runs, but it does not operate on elems. this was not a feature we ever implemented, although i think the readme wrongly suggests this is something that should work since it is something we were planning to do at the time it was authored.

the reason this doesn't work out of the box is because text justification is done based on words, not individual characters. though all elems are set to display inline, the browser currently sees them as characters of the same word rather than as individual words because there's no space character between them for it to adjust in size.

i'm currently investigating a few options for implementing this`

@jumblerg
Copy link
Member

functionality to justify elems added to 0.2.1-SNAPSHOT with one caveat: :ah :jst cannot be changed dynamically by a cell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants