catppuccin / palette

🎨 Soothing pastel theme to use within your projects!
https://www.npmjs.com/package/@catppuccin/palette
MIT License
433 stars 37 forks source link

fix: CSS RGB/HSL variables (Alpha usage) #89

Closed alic3dev closed 1 month ago

alic3dev commented 1 month ago

CSS variables are currently being built without commas in their declaration which is preventing them from working with alpha values. Adding in commas between the individual values fixes this issue and allows the variables to be used with rgba and hsla again.

Changes in this PR

Without commas (Previous)

Works without alpha

Screenshot 2024-08-03 at 21 48 46

Doesn't work with alpha

Screenshot 2024-08-03 at 21 49 04

With commas (Fixed)

Works without alpha

Screenshot 2024-08-03 at 21 49 46

Works with alpha

Screenshot 2024-08-03 at 21 49 27
uncenter commented 1 month ago

Instead of rgba(var(--ctp-latte-blue-rgb) 0.9) can't you do rgba(var(--ctp-latte-blue-rgb) / 0.9)? Without commas I believe you are supposed to use a / to mark the alpha value.

alic3dev commented 1 month ago

@uncenter You are correct! I'll close this PR and open another one with an update to the documentation instead, thanks!