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

fix: Logical properties improve rtl support #599

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

drmason13
Copy link

This is similar to #560 by shuuji3 but it edits the scss files, runs the build to generate css and isn't limited to only left/right properties. It modifies top/bottom properties too.

I haven't tested I'm afraid, but I believe this will fix #591 (albeit, the button will still be on the "wrong" side, the order of HTML elements being reversed is intended behavior.)

First time contributing, so let me know if I can clean up the commits (probably wants squashing) to improve this.

And finally, thank you for this framework, it is very beautiful with good semantics.

FYI: this is a find/replace job if you want to do this yourself:

  • s/border-top-left-/border-start-start-/
  • s/border-top-right-/border-end-start-/
  • s/border-bottom-left-/border-start-end-/
  • s/border-bottom-right-/border-end-end-/
  • s/-left:/-inline-start:/
  • s/-right:/-inline-end:/
  • s/-top:/-block-start:/
  • s/-bottom:/-block-end:/
  • s/text-align: left/text-align: start/
  • s/text-align: right/text-align: end/

There's probably a postcss plugin for this now that I think about it. And yeah, the border-radius logical properties do look backwards but they're correct: https://developer.mozilla.org/en-US/docs/Web/CSS/border-end-start-radius

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

Successfully merging this pull request may close these issues.

RTL not working with new "group"
1 participant