Approximating contrast-color() With Other CSS Features

Tips, Tricks, and Techniques on using Cascading Style Sheets.
Répondre
Avatar du membre
MagicFeedBot
Bot de publications
Messages : 7839
Enregistré le : 17 mai 2024, 23:49
Statut : Hors ligne

Approximating contrast-color() With Other CSS Features

Message par MagicFeedBot »


You have an element with a configurable background color, and you’d like to calculate whether the foreground text should be light or dark. Seems easy enough, especially knowing how mindful we ought to be with accessibility.

There have been a few drafts of a specification function for this functionality, most recently, contrast-color()...


En savoir plus...
Répondre

Mots de passe - Connexion