style: Add scrollbar-{face,track}-color properties.

Bug: 1460456
Reviewed-by: heycam
MozReview-Commit-ID: ImNfHHfzRdM
This commit is contained in:
Xidorn Quan 2018-05-10 10:40:17 +10:00 committed by Emilio Cobos Álvarez
parent 1b236bf620
commit 3016a7f552
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 24 additions and 3 deletions

View file

@ -50,3 +50,25 @@ ${helpers.predefined_type(
ignored_when_colors_disabled=True,
products="gecko",
)}
// Only scrollbar-face-color and scrollbar-track-color are added here.
// These two are the only common parts of scrollbar among Windows and
// macOS. We may or may not want to provide other properties to allow
// finer-grain control.
//
// NOTE The syntax in spec is currently `normal | <color>`, but I think
// reusing `auto | <color>` as `caret-color` makes more sense. See
// https://github.com/w3c/csswg-drafts/issues/2660
% for part in ["face", "track"]:
${helpers.predefined_type(
"scrollbar-%s-color" % part,
"ColorOrAuto",
"Either::Second(Auto)",
spec="https://drafts.csswg.org/css-scrollbars-1/#scrollbar-color-properties",
gecko_pref="layout.css.scrollbar-colors.enabled",
animation_value_type="ColorOrAuto",
ignored_when_colors_disabled=True,
enabled_in="chrome",
products="gecko",
)}
% endfor