Skip to content

Applying percentage values to named color variables #1415

Discussion options

You must be logged in to vote

Thanks for liking the changes. I really hoped this system would improve things when I introduced it in 2017 :D.

Its been a few years I wrote this color stuff, let me look back.

For named colors:

window {
   background-color: black / 50%;
}

This makes the window background black with 50% opacity.

The other formats, it is an extra optional field:

window { 
    background-color: rgb(244,244,244, 50%); 
}

or

window {
    background-color: hsl(1,0.4,0.3, 0.5); }
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@woltersdylan
Comment options

Answer selected by woltersdylan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants