-
Notifications
You must be signed in to change notification settings - Fork 297
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: change to css logical props #379
base: dev
Are you sure you want to change the base?
Conversation
With this, we don't need another CLI feature for converting We can also showcase CSS Logical Properties support table is nice and most Vite projects are for modern browsers so we are safe to merge this |
Im not sure if everyone would like this feature tho. having to change the mindset of This sounds more like a |
The alternative would be adding a CLI option with semi-automated for replacing the classes, but it could not be fully automated (some classes have exceptions and have only one directionality). this means the burden of creating multiple version of components would be on maintainers' shoulders. I understand that this creates mental burden for the end user but I had personally forked this repository months ago specially to address multi direction support. (same approach from PR) |
One other note worth mentioning, this approach is by far the best way to support multi-direction IMO, for reference, here are some alternatives that are just not as good:
|
How we can make it an
Related issue #378 |
As someone who works with rtl and ltr on daily basis in b2c and b2b products |
Quick question! how does logical properties works with Would it have conflicts if we add |
|
It seems that according to unocss playground, the output css for this html: <div class="ms-10 ml-1"></div> Is in this order: /* layer: default */
.ml-1{margin-left:0.25rem;}
.ms-10{margin-inline-start:2.5rem;} Which means, logical classes always win by default. The true answer depends on the current direction of the web page. TM cannot remove Well, this is getting complicated 😅 |
Update:
Considering this is the expected behavior, this is not an issue of whether user could understand I'm fully team Anything that I missed here? |
I did change to css logical props
add rotation in rtl from chevrons and arrows
except the one in the onKeyDown function in carousel as it require a testing on what direction the website is
i belive this will change after we settle on the RTL/LTR provider for components
i changed text to be on start rather than forced to be left as it's more meaningful to what direction the text is written