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

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

Closed
wants to merge 2 commits into from
Closed

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

wants to merge 2 commits into from

Conversation

alic3dev
Copy link
Contributor

@alic3dev alic3dev commented Aug 4, 2024

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

  • Adds commas between individual RGB/HSL values during CSS build process
  • Updates CSS usage documentation to include a comma for rgba/hsla usage

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

uncenter commented Aug 5, 2024

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

alic3dev commented Aug 5, 2024

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

@alic3dev alic3dev closed this Aug 5, 2024
@alic3dev alic3dev deleted the fix-css-rgb-hsl branch August 5, 2024 12:29
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.

2 participants