-
Notifications
You must be signed in to change notification settings - Fork 77
/
css-color-6.json
47 lines (47 loc) · 1.92 KB
/
css-color-6.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
"spec": {
"title": "CSS Color Module Level 6",
"url": "https://drafts.csswg.org/css-color-6/"
},
"properties": [],
"atrules": [],
"selectors": [],
"values": [
{
"name": "contrast-color()",
"prose": "The contrast-color() functional notation identifies a sufficiently contrasting color against a specified background or foreground color without requiring manual computation.",
"type": "function",
"value": "contrast-color( [ [ <color> && [ tbd-fg | tbd-bg ] && <target-contrast>? ] | [ <color> && [ tbd-fg | tbd-bg ] && <target-contrast>, <color># ] ] )",
"values": [
{
"name": "text",
"prose": "The tbd-fg and tbd-bg keywords indicate the role of the base color in calculating the contrast: as text against a list of candidate background colors (text) or as a background against a list of candidate text colors. (The effective contrast of a pair of colors depends on their usage.)",
"type": "value",
"value": "text"
},
{
"name": "wcag2",
"prose": "The wcag2 keyword and wcag2() functional notations indicate use of the [WCAG21] luminance contrast algorithm. Their syntax is:",
"type": "value",
"value": "wcag2"
},
{
"name": "wcag2()",
"prose": "The wcag2 keyword and wcag2() functional notations indicate use of the [WCAG21] luminance contrast algorithm. Their syntax is:",
"type": "function"
}
]
},
{
"name": "<target-contrast>",
"prose": "The <target-contrast> argument specifies the contrast algorithm(s) to use. If no color candidates have been provided, <target-contrast> may be omitted, in which case a UA-chosen algorithm is used.",
"type": "type",
"value": "<wcag2>"
},
{
"name": "<wcag2>",
"type": "type",
"value": "wcag | wcag2([<number> | [ aa | aaa ] && large? ])"
}
]
}