mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:57:35 +00:00
LibWeb: Add a new code generator for CSS enums
Alias values are represented by "alias-name=real-name". We have a lot of repetitive code for converting between ValueID and property-specific enums. Let's see if we can generate it. :^) This first step just produces the enums, from a JSON file. The values in there are a duplication of what's in Properties.json, but eventually those will go away.
This commit is contained in:
parent
66170ff632
commit
a97944e483
4 changed files with 328 additions and 0 deletions
216
Userland/Libraries/LibWeb/CSS/Enums.json
Normal file
216
Userland/Libraries/LibWeb/CSS/Enums.json
Normal file
|
@ -0,0 +1,216 @@
|
|||
{
|
||||
"align-items": [
|
||||
"flex-start",
|
||||
"flex-end",
|
||||
"center",
|
||||
"baseline",
|
||||
"stretch"
|
||||
],
|
||||
"background-attachment": [
|
||||
"fixed",
|
||||
"local",
|
||||
"scroll"
|
||||
],
|
||||
"background-box": [
|
||||
"border-box",
|
||||
"content-box",
|
||||
"padding-box"
|
||||
],
|
||||
"box-sizing": [
|
||||
"border-box",
|
||||
"content-box"
|
||||
],
|
||||
"clear": [
|
||||
"none",
|
||||
"left",
|
||||
"right",
|
||||
"both"
|
||||
],
|
||||
"cursor": [
|
||||
"auto",
|
||||
"default",
|
||||
"none",
|
||||
"context-menu",
|
||||
"help",
|
||||
"pointer",
|
||||
"progress",
|
||||
"wait",
|
||||
"cell",
|
||||
"crosshair",
|
||||
"text",
|
||||
"vertical-text",
|
||||
"alias",
|
||||
"copy",
|
||||
"move",
|
||||
"no-drop",
|
||||
"not-allowed",
|
||||
"grab",
|
||||
"grabbing",
|
||||
"e-resize",
|
||||
"n-resize",
|
||||
"ne-resize",
|
||||
"nw-resize",
|
||||
"s-resize",
|
||||
"se-resize",
|
||||
"sw-resize",
|
||||
"w-resize",
|
||||
"ew-resize",
|
||||
"ns-resize",
|
||||
"nesw-resize",
|
||||
"nwse-resize",
|
||||
"col-resize",
|
||||
"row-resize",
|
||||
"all-scroll",
|
||||
"zoom-in",
|
||||
"zoom-out"
|
||||
],
|
||||
"flex-direction": [
|
||||
"row",
|
||||
"row-reverse",
|
||||
"column",
|
||||
"column-reverse"
|
||||
],
|
||||
"flex-wrap": [
|
||||
"nowrap",
|
||||
"wrap",
|
||||
"wrap-reverse"
|
||||
],
|
||||
"float": [
|
||||
"none",
|
||||
"left",
|
||||
"right"
|
||||
],
|
||||
"font-variant": [
|
||||
"normal",
|
||||
"small-caps"
|
||||
],
|
||||
"image-rendering": [
|
||||
"auto",
|
||||
"crisp-edges",
|
||||
"high-quality",
|
||||
"pixelated",
|
||||
"smooth"
|
||||
],
|
||||
"justify-content": [
|
||||
"flex-start",
|
||||
"flex-end",
|
||||
"center",
|
||||
"space-between",
|
||||
"space-around"
|
||||
],
|
||||
"line-style": [
|
||||
"none",
|
||||
"hidden",
|
||||
"dotted",
|
||||
"dashed",
|
||||
"solid",
|
||||
"double",
|
||||
"groove",
|
||||
"ridge",
|
||||
"inset",
|
||||
"outset"
|
||||
],
|
||||
"list-style-type": [
|
||||
"circle",
|
||||
"decimal",
|
||||
"decimal-leading-zero",
|
||||
"disc",
|
||||
"lower-alpha",
|
||||
"lower-latin",
|
||||
"lower-roman",
|
||||
"none",
|
||||
"square",
|
||||
"upper-alpha",
|
||||
"upper-latin",
|
||||
"upper-roman"
|
||||
],
|
||||
"overflow": [
|
||||
"auto",
|
||||
"clip",
|
||||
"hidden",
|
||||
"scroll",
|
||||
"visible"
|
||||
],
|
||||
"pointer-events": [
|
||||
"auto",
|
||||
"all",
|
||||
"none"
|
||||
],
|
||||
"position": [
|
||||
"absolute",
|
||||
"fixed",
|
||||
"relative",
|
||||
"static",
|
||||
"sticky"
|
||||
],
|
||||
"position-edge": [
|
||||
"left",
|
||||
"right",
|
||||
"top",
|
||||
"bottom"
|
||||
],
|
||||
"repeat": [
|
||||
"no-repeat",
|
||||
"repeat",
|
||||
"round",
|
||||
"space"
|
||||
],
|
||||
"text-align": [
|
||||
"center",
|
||||
"justify",
|
||||
"left",
|
||||
"right",
|
||||
"-libweb-center"
|
||||
],
|
||||
"text-decoration-line": [
|
||||
"blink",
|
||||
"line-through",
|
||||
"none",
|
||||
"overline",
|
||||
"underline"
|
||||
],
|
||||
"text-decoration-style": [
|
||||
"dashed",
|
||||
"dotted",
|
||||
"double",
|
||||
"solid",
|
||||
"wavy"
|
||||
],
|
||||
"text-justify": [
|
||||
"auto",
|
||||
"none",
|
||||
"inter-word",
|
||||
"inter-character",
|
||||
"distribute=inter-character"
|
||||
],
|
||||
"text-transform": [
|
||||
"capitalize",
|
||||
"full-size-kana",
|
||||
"full-width",
|
||||
"lowercase",
|
||||
"none",
|
||||
"uppercase"
|
||||
],
|
||||
"vertical-align": [
|
||||
"baseline",
|
||||
"bottom",
|
||||
"middle",
|
||||
"sub",
|
||||
"super",
|
||||
"text-bottom",
|
||||
"text-top",
|
||||
"top"
|
||||
],
|
||||
"visibility": [
|
||||
"collapse",
|
||||
"hidden",
|
||||
"visible"
|
||||
],
|
||||
"white-space": [
|
||||
"normal",
|
||||
"nowrap",
|
||||
"pre",
|
||||
"pre-line",
|
||||
"pre-wrap"
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue