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

Utilities with Logical Properties #35

Open
Ayman97 opened this issue Jan 21, 2021 · 2 comments
Open

Utilities with Logical Properties #35

Ayman97 opened this issue Jan 21, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@Ayman97
Copy link

Ayman97 commented Jan 21, 2021

Hey
It would be so useful if you add the support of logical properties like (inline-start, inline-end, block-start, block-end) in addition to: top, left, right, bottom.

It would be useful in multilanguage websites to make consistent animations without making some weird hacks.

@milesingrams
Copy link
Member

milesingrams commented Jan 21, 2021

Unfortunately I don't believe that would be possible given that our translations are using the css "translate" function which doesn't change based on language like the logical properties do. https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/translate()

CSS may implement this in the future but until then we will likely stick with screen directions (up down left right).

In the mean time you can use the --xyz-translate-x and --xyz-translate-y for full control over translations allowing you to customize as needed.

Thanks for the feedback!

@mattaningram
Copy link
Member

This is an interesting ask. I can definitely see that you would want animations to switch direction for an RTL language site compared to an LTR site.

Perhaps you can set up a dynamic xyz attribute (v-xyz in our Vue docs) to switch left to right etc if it detects a different language mode?

@milesingrams milesingrams added the enhancement New feature or request label Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants