diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-03-07 17:30:30 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-09 23:06:30 +0100 |
commit | f5fe75f12c3162f51403f19d8f38b288f3603006 (patch) | |
tree | a8827b3ad481f581210017812b3120e71a9a78a9 | |
parent | 096e44285aa8f828c90b23ef3f0c88872d082374 (diff) | |
download | serenity-f5fe75f12c3162f51403f19d8f38b288f3603006.zip |
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.
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/Identifiers.json | 32 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/MediaFeatures.json | 151 |
2 files changed, 175 insertions, 8 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Identifiers.json b/Userland/Libraries/LibWeb/CSS/Identifiers.json index 7fe992bc29..816333bb0d 100644 --- a/Userland/Libraries/LibWeb/CSS/Identifiers.json +++ b/Userland/Libraries/LibWeb/CSS/Identifiers.json @@ -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", diff --git a/Userland/Libraries/LibWeb/CSS/MediaFeatures.json b/Userland/Libraries/LibWeb/CSS/MediaFeatures.json new file mode 100644 index 0000000000..ba7295904e --- /dev/null +++ b/Userland/Libraries/LibWeb/CSS/MediaFeatures.json @@ -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>" + ] + } +} |