jd-solanki / anu

Anu - DX focused utility based vue component library built on top of UnoCSS & VueUse ⚡️🔥
https://anu-vue.netlify.app/
MIT License
1.03k stars 56 forks source link

Colors broken with UnoCSS v0.57 #216

Open hermit99 opened 8 months ago

hermit99 commented 8 months ago

Looks like with UnoCSS v0.57.0's breaking changes, Anu's hsla colors are also broken.

Could we align and keep hsla and rgba consistent with tailwindcss too?

jd-solanki commented 8 months ago

Hi @hermit99

Sorry to say but I don't have enough bandwidth to work on this anymore. Feel free to submit a PR I'll surely merge it.

Thanks for raising the issue.

hermit99 commented 8 months ago

Hi @jd-solanki PR 218 raised for your review. Please be aware that this will be a breaking change version once merged, due to UnoCSS's underlying changes.

jingyuexing commented 7 months ago

image the text color:

.text-primary {
    --un-text-opacity: 1;
    color: hsl(var(--a-primary) / var(--un-text-opacity));
}

But such css cannot be parsed correctly. The following code is the code that can be parsed correctly.

.text-primary {
    --un-text-opacity: 1;
    color: hsl(var(--a-primary) , var(--un-text-opacity));
}

image

jingyuexing commented 7 months ago

@jd-solanki

hermit99 commented 7 months ago

Depending on how --a-primary is defined, it's safer to use hsla() in such cases:

.text-primary {
    --un-text-opacity: 1;
    color: hsla(var(--a-primary), var(--un-text-opacity));
}

That's what #219 was trying to fix anyway.

SoCuul commented 5 months ago

@jd-solanki Would it be possible to merge this in? I'm currently having issues with the library trying to resolve this.

SoCuul commented 5 months ago

I'd also like to add that this is genuinely the best component library I've ever used. The simplicity of it while looking incredible has made it genuinely amazing to develop with.