skeletonlabs / skeleton

A complete design system and component solution, built on Tailwind.
https://skeleton.dev
MIT License
5.15k stars 321 forks source link

`!` prefix does not generate `!important` versions of presets #2984

Closed knd775 closed 3 days ago

knd775 commented 3 days ago

Current Behavior

The following css is generated for !preset-filled-error-500

.\!preset-filled-error-500 {
    --tw-bg-opacity: 1;
    background-color: rgb(var(--color-error-500) / var(--tw-bg-opacity, 1));
    --tw-text-opacity: 1;
    color: rgb(var(--color-error-contrast-500) / var(--tw-text-opacity, 1));
}

Expected Behavior

No response

Steps To Reproduce

No response

Link to Reproduction / Stackblitz

No response

More Information

No response

endigo9740 commented 3 days ago

Hey @knd775, unfortunately Tailwind does not provide us tools for passing ! down into the combined class list. If there's a situation where you need the preset styles to take precedence, then I'd suggest implementing them directly. The same goes for transparency.

If they provide us a means to handle these scenarios in the future, we will absolutely take advantage of this! Perhaps in Tailwind v4? fingers crossed