DEV Community

Cover image for Finally accent-color in CSS
Aslam Shah
Aslam Shah

Posted on • Updated on

Finally accent-color in CSS

If you're a web developer, you're likely familiar with the role of CSS in defining the visual style of a webpage. One key aspect of CSS is the use of color, and recently a new accent color property has been added to the CSS specification.

The accent-color property is a new addition to CSS that allows you to specify a single color that can be used as an accent throughout your website.

Currently accent-color only works on Checkboxes, Radio Buttons, Range and Progress elements.

To use the accent-color property in your CSS, simply specify the desired color value using any valid CSS color syntax. Here's an example:

input {
  accent-color: #007bff;
}
Enter fullscreen mode Exit fullscreen mode

It's worth noting that the accent-color property is still relatively new, and surprisingly the support is very good.

More info can be found here: https://developer.mozilla.org/en-US/docs/Web/CSS/accent-color

Top comments (0)