Skip to content

Expose useRect start and end props #42

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

Open
garthenweb opened this issue Oct 5, 2022 · 0 comments
Open

Expose useRect start and end props #42

garthenweb opened this issue Oct 5, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@garthenweb
Copy link
Owner

garthenweb commented Oct 5, 2022

In rtl mode of the website, the right and left modifications requires some adjustments in code most of the time.
It's good practice to expose start and end instead and toggle the values based on the document mode, similar to the css properties.

.element {
  position: absolute;
  inset-block-start: 0;  /* evaluates to top */
  inset-block-end: 0;    /* evaluates to bottom */
  inset-inline-start: 0; /* evaluates to left in ltr and right in rtl */
  inset-inline-end: 0;   /* evaluates to right in ltr and left in rtl */
}

See https://css-tricks.com/building-multi-directional-layouts/

@garthenweb garthenweb added the enhancement New feature or request label Oct 5, 2022
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

1 participant