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

ltr and rtl don't respect the direction when dir=auto is used #14305

Open
shedokan opened this issue Aug 31, 2024 · 1 comment
Open

ltr and rtl don't respect the direction when dir=auto is used #14305

shedokan opened this issue Aug 31, 2024 · 1 comment

Comments

@shedokan
Copy link
Contributor

shedokan commented Aug 31, 2024

What version of Tailwind CSS are you using?

3.4.10

What build tool (or framework if it abstracts the build tool) are you using?

postcss 8.4.41, svelte 4.2.19, vite 5.4.2

What version of Node.js are you using?

v20.17.0

What browser are you using?

Arc (Chromium based)

What operating system are you using?

macOS

Reproduction URL

It is expected that when using dir=auto the english(ltr) and hebrew(rtl) texts would also be coloured

https://play.tailwindcss.com/ZKvy8eFhha

Describe your issue

When using dir=auto on an element, the user agent parses the content and figures out the direction to be used.

The current attributes depend on the attribute, instead of the :dir()

staticVariant('ltr', ['&:where([dir="ltr"], [dir="ltr"] *)'])
staticVariant('rtl', ['&:where([dir="rtl"], [dir="rtl"] *)'])

Note: Things like ps and pe do work

@Marlene495Hadley

This comment was marked as spam.

@shedokan shedokan changed the title tlr and rtl don't respect the direction when dir=auto is used ltr and rtl don't respect the direction when dir=auto is used Sep 19, 2024
RobinMalfait added a commit that referenced this issue Sep 23, 2024
This fixes the following issue
#14305 by using
`:dir()`

---------

Co-authored-by: Philipp Spiess <[email protected]>
Co-authored-by: Robin Malfait <[email protected]>
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

No branches or pull requests

3 participants
@shedokan @Marlene495Hadley and others