Skip to content

[V4] after:scale-x-0 doesn't take effect #13180

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

Closed
coolemur opened this issue Mar 10, 2024 · 1 comment
Closed

[V4] after:scale-x-0 doesn't take effect #13180

coolemur opened this issue Mar 10, 2024 · 1 comment

Comments

@coolemur
Copy link

coolemur commented Mar 10, 2024

What version of Tailwind CSS are you using?

v4-alpha

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

Not relevant as in Tailwind 3 it was working. ("postcss": "^8.4.34")

What version of Node.js are you using?

Not relevant as in Tailwind 3 it was working. (v21.6.1)

What browser are you using?

Not relevant as in Tailwind 3 it was working. (Opera)

What operating system are you using?

Not relevant as in Tailwind 3 it was working. (MacOS)

Reproduction

<a class="relative first-letter:uppercase after:absolute after:bottom-0 after:left-0 after:h-[4px] after:w-full after:scale-x-0 after:bg-black after:transition-transform after:content-[''] hover:after:scale-x-100" href="#">hover effect</a>

Try it with v4 and compare it in https://play.tailwindcss.com .

Describe your issue

  • after:scale-x-0 doesn't take effect.
  • first-letter:uppercase doesn't take effect.
@wongjn
Copy link
Collaborator

wongjn commented Mar 10, 2024

first-letter:uppercase in your code example doesn't work in v3 either, as evidenced by the first element in this Tailwind Play. This is because, as per the MDN documentation:

The ::first-letter CSS pseudo-element applies styles to the first letter of the first line of a block container, […]

<a> elements are not block containers by default, thus ::first-letter would not match. However, applying display: block via the block class for example would make ::first-letter match and then first-letter:uppercase to take effect, as evidenced by the second element in this Tailwind Play. This also works in v4 in my testing.

@coolemur coolemur changed the title [V4] :after scale doesnt work & first-letter:uppercase dosnt work [V4] first-letter:uppercase dosnt work Mar 10, 2024
@coolemur coolemur changed the title [V4] first-letter:uppercase dosnt work [V4] after:scale-x-0 doesn't take effect Mar 10, 2024
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

2 participants