kidonng / unocss-preset-daisy

UnoCSS preset for daisyUI
https://unocss-preset-daisy.vercel.app
MIT License
220 stars 19 forks source link

feat: support daisyui v4 #39

Open ameinhardt opened 6 months ago

ameinhardt commented 6 months ago

summing up changes from #38 by @LeekJay with minimal changes

SpasiboKojima commented 5 months ago

Thank you for compiling it together, works for me so far with daisyui@4.6.0, hopefully @kidonng will take a look and merge it.

OEvgeny commented 4 months ago

Just for everyone using this with Daisy v4. Looks like this has an issue with button hover handling, probably because the piece of styling is wrapped in both @media and @supports.

I was able to work around it by adding the following styles manually:

@media (hover: hover) {
  @supports (color:color-mix(in oklab,black,black)) {
    .btn:hover {
      background-color: color-mix(in oklab,oklch(var(--btn-color,var(--b2))/var(--tw-bg-opacity,1)) 90%,black);
      border-color: color-mix(in oklab,oklch(var(--btn-color,var(--b2))/var(--tw-border-opacity,1)) 90%,black);
    }
  }
}
skf-funzt commented 4 months ago

@ameinhardt @kidonng Will this PR progress soon?

skf-funzt commented 4 months ago

Just for everyone using this with Daisy v4. Looks like this has an issue with button hover handling, probably because the piece of styling is wrapped in both @media and @supports.

I was able to work around it by adding the following styles manually:

@media (hover: hover) {
  @supports (color:color-mix(in oklab,black,black)) {
    .btn:hover {
      background-color: color-mix(in oklab,oklch(var(--btn-color,var(--b2))/var(--tw-bg-opacity,1)) 90%,black);
      border-color: color-mix(in oklab,oklch(var(--btn-color,var(--b2))/var(--tw-border-opacity,1)) 90%,black);
    }
  }
}

For Astro one needs to add this at the very top file possible as global, unscoped CSS style:

<style is:global>
  ... The mentioned workaround here ...
</style>
s3xysteak commented 3 months ago

Any news?