Skip to content

Query on Stylex Behavior: Logical Properties Conversion #510

Answered by nmn
mobalti asked this question in Q&A
Discussion options

You must be logged in to vote

I'm curious about the rationale behind this behavior.

Old browsers don't support all logic properties. Existing polyfills don't support mixing ltr and rtl on the same page. I created a polyfill that does.

However, it is not possible to support vertical writing modes with this polyfill. So StyleX was designed to only support horizontal writing for now and assume top and bottom are always correct.

Another reason was to minimise the total amount of CSS. If an author uses inlineSize some of the times and width other times, we would get effectively duplicate CSS. So, we've chosen to have one canonical representation in the generated CSS.

Is there a way to prevent this while retaining the lo…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mobalti
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants