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

feat: support daisyui v4 #39

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

feat: support daisyui v4 #39

wants to merge 5 commits into from

Conversation

ameinhardt
Copy link

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

Signed-off-by: Axel Meinhardt <[email protected]>
Signed-off-by: Axel Meinhardt <[email protected]>
@SpasiboKojima
Copy link

Thank you for compiling it together, works for me so far with [email protected], hopefully @kidonng will take a look and merge it.

index.ts Outdated
* @param {ChildNode} currentNode - The current node to examine.
*/
const collectNonAtrules = (currentNode: ChildNode) => {
if (currentNode.type === 'atrule') {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to do the following change to make TSC happy:

Suggested change
if (currentNode.type === 'atrule') {
if (currentNode.type === 'atrule' && currentNode.nodes) {

@OEvgeny
Copy link

OEvgeny commented Feb 18, 2024

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
Copy link

@ameinhardt @kidonng
Will this PR progress soon?

@skf-funzt
Copy link

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
Copy link

Any news?

Signed-off-by: Axel Meinhardt <[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

Successfully merging this pull request may close these issues.

5 participants