Tint User-Interface Controls with CSS accent-color

CSS accent-color from the CSS UI specification is here to tint elements with one line of CSS, saving you from customization efforts by providing a way to bring your brand into elements.

The CSS for the screenshot above is this:

input {
  accent-color: hotpink;

💡 You can also set this declaration onto form, as the value will inherit down to the contained controls.

Supported in Chromium 93+ and Firefox 92+

CSS accent-color
[css-ui-4] Widget Accent Colors: the accent-color property →

Published by Bramus!

Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.