rabbit_rabbit
rabbit_rabbit7mo ago

peer tailwind support in fresh

Is there support for tailwind peers as described here in fresh? https://tailwindcss.com/docs/hover-focus-and-other-states I've uploaded a repo with code like so
<input name="foo" className="peer"></input>
<div className="peer-focus:mt-6">Should get moved down on focus</div>
<input name="foo" className="peer"></input>
<div className="peer-focus:mt-6">Should get moved down on focus</div>
And when I focus on the input the styles of the div do not change. I see that peer support was added in v3 and only group is supported in v2. Is Fresh still on v2? https://v2.tailwindcss.com/docs/hover-focus-and-other-states#group-hover Thanks in advance! https://github.com/will-weiss/fresh-twind-peer-test
Handling Hover, Focus, and Other States - Tailwind CSS
Using utilities to style elements on hover, focus, and more.
GitHub
GitHub - will-weiss/fresh-twind-peer-test
Contribute to will-weiss/fresh-twind-peer-test development by creating an account on GitHub.
Hover, Focus, & Other States - Tailwind CSS
Using utilities to style elements on hover, focus, and more.
3 Replies
Deno AI Helper
Deno AI Helper7mo ago
The documentation does not provide explicit information about the version of Tailwind CSS that Fresh uses or its support for the peer feature. However, it does mention that Fresh has an official twind plugin, which is a Tailwind-in-JS implementation. This plugin allows you to use Twind classes in your project, but it doesn't specify if it supports the peer feature. To debug this issue, you could try to update your twind configuration or check if the peer feature is supported in the version of twind you are using. If you're still having trouble, it might be helpful to open an issue in the Fresh or Twind repositories for more specific guidance. 🦕
marvinh.
marvinh.7mo ago
@rabbit_rabbit The next version of Fresh ships with a native TailwindCSS plugin, which ships this or next week. Currently tailwind like support is done via twind whose tailwind support is a bit so-so and mostly stuck on tailwind v2. With the move to Tailwind CSS itself in the upcoming Fresh version all those problems are gone
rabbit_rabbit
rabbit_rabbit7mo ago
Righteous! Yeah this isn’t a blocker, so I’ll stay tuned for the next release