Skip to content

fix: RTL support #267

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

Merged
merged 7 commits into from
Apr 23, 2020
Merged

fix: RTL support #267

merged 7 commits into from
Apr 23, 2020

Conversation

seleb
Copy link
Contributor

@seleb seleb commented Apr 10, 2020

What:

Adds RTL support to fix #266

Why:

Allows the carousel content to be accessed when used on RTL pages, and updates the slide direction to match the direction of the text

How:

Adding [dir="rtl"] & selectors which flips the slider such that the slides are reversed and it visually translates in the opposite direction, and also flips each slide such that their content is not reversed.

Checklist:

  • Documentation added/updated
  • Typescript definitions updated (N/A)
  • Tests added and passing (N/A)
  • Ready to be merged

The global attribute selector used to solve this issue feels a little hacky, but afaik there is no CSS-only solution which is more robust (the :dir pseudo-selector would be nice, but it doesn't have wide browser support)

seleb added 6 commits April 10, 2020 01:22
makes the carousel functional, but just via overriding the direction
relying on a global attribute selector feels a bit hacky
@tim-steele
Copy link
Contributor

@seleb It looks like there are some linting errors that need to be addressed?

image

@seleb
Copy link
Contributor Author

seleb commented Apr 22, 2020

lint errors have been addressed; is there any additional discussion or changes needed on this?

@tim-steele tim-steele merged commit 10edf2d into express-labs:master Apr 23, 2020
@tim-steele
Copy link
Contributor

@seleb you are good! Merged - it will be built and published.

@bcarroll22
Copy link
Contributor

🎉 This PR is included in version 1.27.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@seleb seleb deleted the rtl-support branch April 23, 2020 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Carousel slides incorrectly when used with dir="rtl"
3 participants