Skip to content

[css-scrollbars][css-scrollbars-1] Using scrollbar-color to tint the scrollbar #5651

@felipeerias

Description

@felipeerias

The property scrollbar-color from CSS Scrollbars allows the author to pass two colors, to be used by the thumb and the track of the scrollbar.

So, scrollbar-color: indigo lavender will produce a scrollbar where the thumb is #4B0082 and the track is#E6E6FA.

The spec also advises authors to "ensure the specified colors have enough contrast between them".

I don't know if this has been discussed previously, but what should happen if only one color was provided to scrollbar-color?

scrollbar-color: orange;
scrollbar-color: darkgreen;

My proposal is that when one color is provided to scrollbar-color, it would be used by the UA to automatically define the color scheme for the scrollbar (to "tint" it, so to speak).

This would allow authors to easily style the scrollbars on their pages while the UA ensures adequate accessibility by making sure that the specific colors have enough contrast between them.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions