Re: [csswg-drafts] [css-color-4] limited use of contrast adjuster

The [Material component library]( has a Sass mixin allowing to select an accessible ink color, to have enough contrast with the provided background. but it will always return one of 2 possible colors: `white` or `rgba(black, .87)` (for different cases, it has different sets of values with different alpha channels, but the idea stays the same).
AFAICT, the current proposal for adjusters does not allow to implement the same in CSS.

A use case here is of course that the background color comes from a CSS custom property, to allow building a theming system. Currently, building such theming would still require having 2 initial CSS files (one for dark themes and one for light themes), and choosing the right one based on the theme color, as things cannot be computed in the browser.

GitHub Notification of comment by stof
Please view or discuss this issue at using your GitHub account

Received on Wednesday, 1 August 2018 10:47:46 UTC