You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using logical properties, it looks like StyleX is adding the class when it should not, because in this case inlineSize is undefined and therefore the class should be omitted altogether. This was causing me a lot of problems because it took me a while to figure out it seems to be a side effect of logical properties and not all properties.
I'll try disabling styleResolution: 'legacy-expand-shorthands' and see if this problem goes away on its own.
Expected behavior
See above
Steps to reproduce
See above
Test case
No response
Additional comments
No response
The text was updated successfully, but these errors were encountered:
This is a known issue. This was originally done to intentionally disallow vertical writing modes and to normalize style properties that are safe to do so for LTR and RTL "horizontal" layouts. I.e. Unless you're using vertical writing modes, inline-size and width are equivalent.
The rationale for this decision was to minimize the total size of the CSS created and maximize CSS rule re-usability.
Another reason was the fact that it is possible to polyfill horizonal logical styles but not vertical writing modes on browsers that don't support logical properties natively.
We will soon fix this problem and officially start supporting vertical writing modes. The support for logical properties in browsers is widespread and we don't need to worry about polyfills anymore.
Describe the issue
Related to #752.
This was very confusing for me to discover. I believe StyleX has a bug when replacing logical properties.
See the following code for example:
Output (this is correct)::
Now see what happens when we use
inline-size
instead ofwidth
:Output (I believe this is incorrect):
When using logical properties, it looks like StyleX is adding the class when it should not, because in this case
inlineSize
isundefined
and therefore the class should be omitted altogether. This was causing me a lot of problems because it took me a while to figure out it seems to be a side effect of logical properties and not all properties.I'll try disabling
styleResolution: 'legacy-expand-shorthands'
and see if this problem goes away on its own.Expected behavior
See above
Steps to reproduce
See above
Test case
No response
Additional comments
No response
The text was updated successfully, but these errors were encountered: