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

Stop transforming textAlign:start/end #627

Closed
necolas opened this issue Jul 2, 2024 · 3 comments · Fixed by #632
Closed

Stop transforming textAlign:start/end #627

necolas opened this issue Jul 2, 2024 · 3 comments · Fixed by #632
Labels
bug Something isn't working

Comments

@necolas
Copy link
Contributor

necolas commented Jul 2, 2024

Describe the issue

StyleX converts textAlign:start/end into CSS like this, which means those properties don't work correctly inside subtrees using the dir prop. This is a relatively urgent issue internally.

image

We should remove this transform. (A broader task is to remove the legacy RTL selectors for style sheets altogether.)

Expected behavior

textAlign:start/end work correctly

Steps to reproduce

  1. textAlign:end
  2. See style sheet changed end to right and scoped it to html[dir]

Test case

No response

Additional comments

No response

@necolas necolas added the bug Something isn't working label Jul 2, 2024
@nmn
Copy link
Contributor

nmn commented Jul 2, 2024

AFAIK, this only happens in the legacy-expand-shorthands config which is what we use internally. (If this happens in any other config that would be a very urgent issue)

Internally we depend on this behaviour for older browsers but I think there is a way to add fallback styles for older browsers while resolving this issue.

@necolas
Copy link
Contributor Author

necolas commented Jul 2, 2024

end and start have been available since Chrome 1, so I don't think we need to do anything to these values - https://developer.mozilla.org/en-US/docs/Web/CSS/text-align#browser_compatibility

@nmn
Copy link
Contributor

nmn commented Jul 6, 2024

This is news to me. Let me make this change immediately then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants