LibWeb: Add MediaFeatures.json file, and associated identifiers

This data will be used to generate code for parsing media-queries. So
far, it includes all MEDIAQUERIES-4 features, and
`prefers-color-scheme` from MEDIAQUERIES-5 since we support that.
This commit is contained in:
Sam Atkins 2022-03-07 17:30:30 +00:00 committed by Andreas Kling
parent 096e44285a
commit f5fe75f12c
2 changed files with 175 additions and 8 deletions

View file

@ -66,15 +66,16 @@
"block",
"bold",
"bolder",
"border-box",
"both",
"bottom",
"border-box",
"break-word",
"capitalize",
"cell",
"center",
"circle",
"clip",
"coarse",
"col-resize",
"collapse",
"column",
@ -90,6 +91,7 @@
"crosshair",
"currentcolor",
"cursive",
"dark",
"dashed",
"decimal",
"decimal-leading-zero",
@ -100,10 +102,12 @@
"e-resize",
"ew-resize",
"fantasy",
"fast",
"fine",
"fixed",
"flex",
"flex-start",
"flex-end",
"flex-start",
"flow",
"flow-root",
"from-font",
@ -116,31 +120,37 @@
"help",
"hidden",
"high-quality",
"hover",
"infinite",
"inline",
"inline-block",
"inline-flex",
"inline-table",
"inset",
"inside",
"interlace",
"invert",
"italic",
"justify",
"landscape",
"large",
"larger",
"left",
"light",
"lighter",
"line-through",
"list-item",
"local",
"lowercase",
"lower-alpha",
"lower-latin",
"lower-roman",
"lowercase",
"ltr",
"medium",
"middle",
"monospace",
"move",
"n-resize",
"ne-resize",
"nesw-resize",
"no-drop",
@ -149,7 +159,6 @@
"normal",
"not-allowed",
"nowrap",
"n-resize",
"ns-resize",
"nw-resize",
"nwse-resize",
@ -157,13 +166,18 @@
"outset",
"outside",
"overline",
"p3",
"padding-box",
"paged",
"pixelated",
"pointer",
"portrait",
"pre",
"pre-line",
"pre-wrap",
"progress",
"progressive",
"rec2020",
"relative",
"repeat",
"repeat-x",
@ -181,11 +195,13 @@
"ruby-text",
"ruby-text-container",
"run-in",
"s-resize",
"sans-serif",
"scroll",
"se-resize",
"separate",
"serif",
"slow",
"small",
"small-caps",
"smaller",
@ -193,9 +209,9 @@
"solid",
"space",
"space-around",
"s-resize",
"space-between",
"square",
"srgb",
"static",
"sticky",
"stretch",
@ -222,17 +238,17 @@
"ui-sans-serif",
"ui-serif",
"underline",
"uppercase",
"upper-alpha",
"upper-latin",
"upper-roman",
"visible",
"uppercase",
"vertical-text",
"visible",
"w-resize",
"wait",
"wavy",
"wrap",
"wrap-reverse",
"w-resize",
"x-large",
"x-small",
"xx-large",

View file

@ -0,0 +1,151 @@
{
"any-hover": {
"type": "discrete",
"values": [
"none",
"hover"
]
},
"any-pointer": {
"type": "discrete",
"values": [
"none",
"coarse",
"fine"
]
},
"aspect-ratio": {
"type": "range",
"values": [
"<ratio>"
]
},
"color": {
"type": "range",
"values": [
"<integer>"
]
},
"color-gamut": {
"type": "discrete",
"values": [
"srgb",
"p3",
"rec2020"
]
},
"color-index": {
"type": "range",
"values": [
"<integer>"
]
},
"device-aspect-ratio": {
"type": "range",
"values": [
"<ratio>"
]
},
"device-height": {
"type": "range",
"values": [
"<length>"
]
},
"device-width": {
"type": "range",
"values": [
"<length>"
]
},
"grid": {
"type": "discrete",
"values": [
"<mq-boolean>"
]
},
"height": {
"type": "range",
"values": [
"<length>"
]
},
"hover": {
"type": "discrete",
"values": [
"none",
"hover"
]
},
"monochrome": {
"type": "range",
"values": [
"<integer>"
]
},
"orientation": {
"type": "discrete",
"values": [
"portrait",
"landscape"
]
},
"overflow-block": {
"type": "discrete",
"values": [
"none",
"scroll",
"paged"
]
},
"overflow-inline": {
"type": "discrete",
"values": [
"none",
"scroll"
]
},
"pointer": {
"type": "discrete",
"values": [
"none",
"coarse",
"fine"
]
},
"prefers-color-scheme": {
"type": "discrete",
"values": [
"light",
"dark"
]
},
"resolution": {
"type": "range",
"values": [
"<resolution>",
"infinite"
]
},
"scan": {
"type": "discrete",
"values": [
"interlace",
"progressive"
]
},
"update": {
"type": "discrete",
"values": [
"none",
"slow",
"fast"
]
},
"width": {
"type": "range",
"values": [
"<length>"
]
}
}