@xtframe/skills 0.0.0-stage → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -2
- package/package.json +41 -4
- package/payload/plugins/xtframe/.claude-plugin/plugin.json +17 -0
- package/payload/plugins/xtframe/.codex-plugin/plugin.json +11 -0
- package/payload/plugins/xtframe/gemini-extension.json +5 -0
- package/payload/plugins/xtframe/skills/xtui/SKILL.md +218 -0
- package/payload/plugins/xtframe/skills/xtui/references/canvas.md +90 -0
- package/payload/plugins/xtframe/skills/xtui/references/dialect.md +799 -0
- package/payload/plugins/xtframe/skills/xtui/references/flow.md +338 -0
- package/payload/plugins/xtframe/skills/xtui/references/not-like-web.md +358 -0
- package/payload/plugins/xtframe/skills/xtui/references/performance.md +162 -0
- package/payload/plugins/xtframe/skills/xtui/references/responsive.md +137 -0
- package/payload/plugins/xtframe/skills/xtui/references/style-groups.md +378 -0
- package/payload/plugins/xtframe/skills/xtui/references/template.dc.html +56 -0
- package/payload/plugins/xtframe/skills/xtui/references/tokens.json +42 -0
- package/payload/plugins/xtframe/skills/xtui/references/ui-project.md +161 -0
- package/payload/plugins/xtframe/skills/xtui/references/upgrade.md +140 -0
- package/payload/plugins/xtframe/skills/xtui/references/vector.md +219 -0
- package/payload/plugins/xtframe/skills/xtui/references/verify.md +327 -0
- package/payload/plugins/xtframe/skills/xtui-editor/SKILL.md +209 -0
- package/payload/plugins/xtframe/skills/xtui-editor/references/design.md +158 -0
- package/payload/plugins/xtframe/skills/xtui-editor/references/ops.md +849 -0
- package/payload/plugins/xtframe/skills/xtui-editor/references/recipes.md +70 -0
- package/payload/plugins/xtframe/skills/xtui-editor/references/scenarios.md +180 -0
- package/payload/plugins/xtframe/skills/xtui-editor/references/service.md +167 -0
- package/src/agents.mjs +73 -0
- package/src/bin.mjs +4 -0
- package/src/cli.mjs +286 -0
- package/src/converter.mjs +73 -0
- package/src/fsutil.mjs +76 -0
- package/src/install.mjs +154 -0
- package/src/packs.mjs +150 -0
- package/src/plugins.mjs +109 -0
- package/src/proc.mjs +66 -0
- package/src/tar.mjs +103 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
Read this when the user asks for a UI that works on any window, screen or aspect ratio ("fit any window", "ultrawide", "4:3 too", "portrait"), or when a screenshot at another aspect shows panels drifting, overlapping or cut off.
|
|
2
|
+
|
|
3
|
+
# Responsive: one board, every screen
|
|
4
|
+
|
|
5
|
+
A board is drawn at one size (1280x720 or 1920x1080). The import turns it into the layout contract
|
|
6
|
+
(`references/dialect.md`, **Board setup**): the root fills the screen, children are anchored to the
|
|
7
|
+
safe-area edges or kept proportional, and the project's **uiscale rule** decides how big a design
|
|
8
|
+
pixel is on a given screen. Responsive work is choosing that rule, placing elements so the anchoring
|
|
9
|
+
does the right thing, and checking a fixed set of aspects. Every rule below has an example from the
|
|
10
|
+
challenge menu demo (`Examples/demos/challenge-menu/`: board `claude-design/project/Main.dc.html`,
|
|
11
|
+
UI Project `ui-project/Tactical Challenges.xtui`, flow generated by
|
|
12
|
+
`ui-project/challenge-menu/gen_challenge_menu.py`).
|
|
13
|
+
|
|
14
|
+
## 1. Pick the uiscale rule
|
|
15
|
+
|
|
16
|
+
`1uiscale` (and every `px` on the board) is one design pixel times the screen's scale. The rule is
|
|
17
|
+
`spec.uiscaleRule` of `<name>.xtui`; the board's design height is `spec.logicalHeight` (the
|
|
18
|
+
import sets it from the board height, 720 for the challenge menu).
|
|
19
|
+
|
|
20
|
+
| Rule | Scale = | Choose it when |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| `fit` | the smaller of screen width / design width and screen height / design height | "fit any window": the whole design is always visible; a wide screen gets side margins, a narrow one shrinks the UI. The default suggestion for "any window" requests. |
|
|
23
|
+
| `height` | screen height / design height | landscape games (HUDs, menus) where the height drives the layout and wider screens should show more at the sides. A 4:3 or portrait window crops or crowds the sides. |
|
|
24
|
+
| `width` | screen width / design width | layouts driven by the width (a horizontal strip, a side-scrolling list); a tall window gets empty space below. |
|
|
25
|
+
| `shortEdge` | the short screen edge / 1080 | phones and tablets that rotate (`references/ui-project.md` 3b): portrait scales by the width, landscape by the height. |
|
|
26
|
+
|
|
27
|
+
**Set it on the board**: `data-xt-uiscale="fit"` (or `height` / `width` / `shortEdge`) on the
|
|
28
|
+
board's root element. The import writes it to `spec.uiscaleRule`; a re-import of a board with the
|
|
29
|
+
tag replaces the project's value, a board without it keeps the project's value. This is the only
|
|
30
|
+
regular way to set the rule: files under `<project>` change only through the import
|
|
31
|
+
(`references/ui-project.md` section 4).
|
|
32
|
+
|
|
33
|
+
*Transition (until the converter knows the tag, T-486):* when the lint reports
|
|
34
|
+
`data-xt-uiscale ... is not a known data-xt-* tag`, keep the tag on the board (it takes over once
|
|
35
|
+
the converter supports it) and, **only with the user's consent**, set `"uiscaleRule"` under
|
|
36
|
+
`spec` in `<name>.xtui` by hand. Say in the report that this was a hand edit of the project file
|
|
37
|
+
and why.
|
|
38
|
+
|
|
39
|
+
Example: the challenge menu is a landscape menu with two panels and a 3D backdrop; "fit any
|
|
40
|
+
window" means `data-xt-uiscale="fit"` on `#challenge-menu`, so a 4:3 window shrinks it instead of
|
|
41
|
+
cutting off the preview panel.
|
|
42
|
+
|
|
43
|
+
## 2. Full-bleed containers: position in %, `right` and `calc`
|
|
44
|
+
|
|
45
|
+
Inside a container that fills the screen (the root, an overlay root, a backdrop layer), px offsets
|
|
46
|
+
from the left only stay right at the board's size. Write positions that hold at every width:
|
|
47
|
+
|
|
48
|
+
- **Left side**: `left: <n>px`. The import turns it into `anchor: left ...; offset: <n -
|
|
49
|
+
safe_px>px ...` in the UI's `<layout>` (long-hand `calc(1safe-left + <n - safe_px>px)` when the
|
|
50
|
+
other axis cannot use the shorthand), the same spot at the board's size: `safe_px` is the
|
|
51
|
+
project's safe area at the board's size (2.5% of 1280 = 32 px), so `left: 24px` becomes the
|
|
52
|
+
offset `-8px` (`calc(1safe-left - 8px)`) and `left: 80px` the offset `48px`. `data-xt-anchor`
|
|
53
|
+
uses the same formula (24 §24.14.2 item 4; the table in `references/dialect.md`, **Tokens,
|
|
54
|
+
anchors, roles, glyphs**).
|
|
55
|
+
- **Right side**: `right: <n>px`, not `left: <board width - n - w>px`. The import infers this
|
|
56
|
+
from the 25% rule, but writing `right` makes it unambiguous.
|
|
57
|
+
- **Centre**: `left: calc(50% - <half the width>px)` with a px `width`; the vertical axis the
|
|
58
|
+
same with `top`. The import writes it as `anchor: center ...` plus `size`.
|
|
59
|
+
- **Proportional**: `left: <p>%` for something that should keep its fraction of the screen (a
|
|
60
|
+
divider at one third).
|
|
61
|
+
- **Bleed**: `left: 0; right: 0` (or `inset: 0`) for a backdrop, with `background-size: cover`.
|
|
62
|
+
|
|
63
|
+
Do not write `vw` / `vh` / `rem` (the import drops them, `references/verify.md` step 6).
|
|
64
|
+
|
|
65
|
+
Example: in the challenge menu, `#header` is drawn `left: 0px; width: 1280px` (the full board
|
|
66
|
+
width), so the import bleeds it to both screen edges (`left: 0; right: 0`); writing
|
|
67
|
+
`left: 0; right: 0` on the board says the same thing at any width. The `.corner` marks
|
|
68
|
+
(`#corner-tl`, `#corner-br`) sit inside a panel, not in the full-bleed root, so they move with
|
|
69
|
+
their panel and need nothing.
|
|
70
|
+
|
|
71
|
+
## 3. Dock wrappers: the regular way to anchor a panel something else moves
|
|
72
|
+
|
|
73
|
+
The automatic anchoring writes `anchor` / `offset` (or `left` / `top`) on the element. Two cases break that, and both have
|
|
74
|
+
one answer, a **dock**: a plain wrapper element (no `transform`, no `translateZ`, no animation of
|
|
75
|
+
its own) that takes the anchoring, with the real panel inside it at `left: 0; top: 0`.
|
|
76
|
+
|
|
77
|
+
1. **The flow moves the element** (a `.xtflow` writes its `left` / `top` / `right` / `bottom`
|
|
78
|
+
through `setStyle`: parallax, fly-ins, drag). The import does not anchor such an element (its px
|
|
79
|
+
stay, and it warns `anchor.flowMoved: <id> is moved by the flow; wrap it in a dock`), because
|
|
80
|
+
the flow would overwrite the anchor on its first frame. Put the element in a dock, anchor the
|
|
81
|
+
dock, and change the flow's positions to be relative to the dock (the rest position becomes
|
|
82
|
+
0,0 plus the offset).
|
|
83
|
+
2. **The element has a 3D transform** (`translateZ`, a perspective tilt). The anchor goes on the
|
|
84
|
+
dock, the transform stays on the panel, so the anchor is measured on a flat box.
|
|
85
|
+
|
|
86
|
+
Rules for a dock:
|
|
87
|
+
|
|
88
|
+
- Name it `<panel>-dock` and give it the panel's board box (its `left`, `top`, `width`,
|
|
89
|
+
`height`); the panel inside gets `left: 0; top: 0` and keeps its size.
|
|
90
|
+
- The dock has no `transform`, `translateZ`, `opacity` animation or `transition`; everything that
|
|
91
|
+
moves stays on the panel.
|
|
92
|
+
- **Panels that must stay aligned share one dock.** The 25% rule anchors each child to its own
|
|
93
|
+
nearest edge, so two sibling panels side by side can land on different edges (one pinned left,
|
|
94
|
+
the other right) and drift apart on a wide screen. Wrap the group in one dock (anchored once), or
|
|
95
|
+
write `data-xt-anchor` on one of them so both follow the same edge.
|
|
96
|
+
- When a dock spans a group, anchor it by the group's centre or the edge the group belongs to
|
|
97
|
+
with `data-xt-anchor` on the dock if the 25% rule would pick another.
|
|
98
|
+
|
|
99
|
+
Example: the challenge menu's flow (`gen_challenge_menu.py`, "Gaze parallax and fly-in") writes
|
|
100
|
+
`left` / `top` of `#diff-list` (rest 130,196) and `#panel-preview` (rest 650,166) for the pointer
|
|
101
|
+
parallax and the intro slide. Without docks they stay at board px and do not follow a wide screen.
|
|
102
|
+
`#profile-block` is not moved by the flow but carries `transform: translateZ(60px)` (case 2).
|
|
103
|
+
The fix, tested in that demo: `list-dock` around `#diff-list`, `preview-dock` around
|
|
104
|
+
`#panel-preview` and `profile-dock` around `#profile-block`; each dock carries the anchor, the
|
|
105
|
+
panel sits at 0,0 inside it, and the generator's rest positions become 0,0 plus the parallax
|
|
106
|
+
offset (the parked-off-screen x becomes relative too), then the generator is re-run.
|
|
107
|
+
|
|
108
|
+
## 4. The aspect check set
|
|
109
|
+
|
|
110
|
+
For a responsive request, check these and no fewer (screenshots, `references/verify.md` step 5):
|
|
111
|
+
|
|
112
|
+
| Aspect | Size | Command arguments |
|
|
113
|
+
|---|---|---|
|
|
114
|
+
| 16:9 | 1280x720 | `--width 1280 --height 720` |
|
|
115
|
+
| 16:9 | 1920x1080 | `--width 1920 --height 1080` |
|
|
116
|
+
| 21:9 | 2560x1080 | `--height 1080 --device 21:9` |
|
|
117
|
+
| 32:9 | 3840x1080 | `--height 1080 --device 32:9` |
|
|
118
|
+
| 4:3 | 1440x1080 | `--height 1080 --device 4:3` |
|
|
119
|
+
| 16:10 | 1728x1080 | `--height 1080 --device 16:10` |
|
|
120
|
+
| portrait | 1080x1920 | `--width 1080 --height 1920` |
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
xtframe-view <project-dir> --ui <ui> --headless --frames 3 <arguments> --screenshot <abs-path>-<aspect>.png
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
(the project form, so the UI Project's `spec`, uiscale rule included, applies). At each one look
|
|
127
|
+
for: corner panels on the safe edges, centred blocks centred, aligned panels still aligned, nothing
|
|
128
|
+
cut off (with `fit`: nothing at all; with `height`: only decoration at the sides), text not
|
|
129
|
+
overflowing. A portrait shot of a landscape UI is expected to letterbox with `fit`; with `height`
|
|
130
|
+
say what is lost.
|
|
131
|
+
|
|
132
|
+
## 5. What responsive work does not change
|
|
133
|
+
|
|
134
|
+
- The board size stays the design size; do not draw one board per aspect.
|
|
135
|
+
- `@media` blocks are for real layout switches (a phone layout), not for fixing one drifting
|
|
136
|
+
panel: fix the anchoring instead (`references/not-like-web.md`).
|
|
137
|
+
- Font sizes scale with uiscale; do not add per-aspect font sizes.
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
<!-- Generated by Tools/Scripts/gen_property_table.py --style-groups-doc from
|
|
2
|
+
Tools/Scripts/style_groups_data.py. Do not edit by hand. See Docs/design/46-style-stack.md. -->
|
|
3
|
+
|
|
4
|
+
# Style groups: style name <-> CSS property <-> parameter name
|
|
5
|
+
|
|
6
|
+
The XTFrame editor shows an element's CSS as a stack of **styles** (Fill, Stroke, Corners, Text,
|
|
7
|
+
Opacity & Blend, ...). Each style is a fixed group of CSS properties. Use this page to **talk to
|
|
8
|
+
the user in style names** ("add a 2 px stroke", "lower the fill opacity") and still **write CSS
|
|
9
|
+
on the board**: the dialect does not change (`dialect.md`) and a board never names a style. The
|
|
10
|
+
parameter name is what the editor's `style.setStyleParams` takes (`xtui-editor` skill, `ops.md`);
|
|
11
|
+
the same table is the Editor Service resource `xtui://style-groups.json`.
|
|
12
|
+
|
|
13
|
+
- **Kind**: `fixed` is always present (position & size); `style` can be added and removed;
|
|
14
|
+
`effect` is the `effect:` sequence; `modifier` the vector modifiers; `raw` only in the raw CSS list.
|
|
15
|
+
- **Scope**: `composite` styles act on the composited result of the element (on a group they show
|
|
16
|
+
as its adjustment layer); `container` styles act on the element itself.
|
|
17
|
+
- **Adds**: the declarations "+ add style" writes; `var(--<token>)` instead when the UI has a token
|
|
18
|
+
of that meaning.
|
|
19
|
+
- **Row**: the editor's row type; percent rows are written 0..1; lengths are written with `px`.
|
|
20
|
+
**Values** empty on a `choice` row: any keyword the property accepts (`dialect.md`).
|
|
21
|
+
|
|
22
|
+
- **Catalog id**: the effect catalog entries ("+ Add effect", `catalog.add {id}`) that add the
|
|
23
|
+
style; the effect parameters are listed per catalog id at the end of this page.
|
|
24
|
+
- **Section**: where the declaration goes in a source format 2 `.xt` (Docs/design/54 §54.5):
|
|
25
|
+
`layout` = the `<layout>` section (geometry: position, anchoring, size, stacking, grid, order,
|
|
26
|
+
`z-index`, `overflow`, 3D space, `layer`, responsive switches), `style` = `<style>` (or the UI's
|
|
27
|
+
`.xts` the import links as `<style src>`). A geometry property in `<style>` is the compile error
|
|
28
|
+
`style.geometryInStyle`; any other property in `<layout>` is `layout.notGeometry`. One exception:
|
|
29
|
+
`display: none` may be written in `<style>` (every other `display` value is `<layout>` only).
|
|
30
|
+
The anchor shorthands `anchor`, `offset`, `offset-end`, `size` (54 §54.5.1) are
|
|
31
|
+
`<layout>` only and belong to no style group. A board never names a section: the import splits
|
|
32
|
+
the CSS by this column.
|
|
33
|
+
|
|
34
|
+
| Style | id | Kind | Scope | Section | Offered on | Adds | Catalog id |
|
|
35
|
+
|---|---|---|---|---|---|---|---|
|
|
36
|
+
| Position & Size / 位置與尺寸 | `placement` | fixed | container | layout | every layer | -- | -- |
|
|
37
|
+
| Auto Layout / 自動版面 | `autolayout` | style | container | layout | every layer | `display: flex`; `flex-direction: column`; `gap: 8px` | -- |
|
|
38
|
+
| Fill / 填色 | `fill` | style | container | style | every layer | `background-color: #ffffff` (token `surface`) | `fill` |
|
|
39
|
+
| Stroke / 描邊 | `stroke` | style | container | style | every layer | `border-width: 1px`; `border-color: #000000` (token `border`) | `stroke` |
|
|
40
|
+
| Corners / 圓角 | `corner` | style | container | style | every layer | `border-radius: 8px` | `corner` |
|
|
41
|
+
| Image / 圖片 | `image` | style | container | style | Image | `object-fit: contain` | `image` |
|
|
42
|
+
| Text / 文字 | `text` | style | container | style | Text, Button, Input | `font-size: 16px`; `color: #000000` (token `text`) | `text-effect`, `text-reveal`, `text-decoration` |
|
|
43
|
+
| Focus Outline / 外框線(焦點) | `outline` | style | container | style | every layer | `outline-width: 2px`; `outline-offset: 2px`; `outline-color: #4c8dff` (token `focus`) | `outline` |
|
|
44
|
+
| Vector Fill & Stroke / 向量填色與描邊 | `vector` | style | container | style | Vector, Shape, ShapeGroup | `fill: #808080` | -- |
|
|
45
|
+
| Particles / 粒子 | `particles` | style | container | style | Particles | `particle-max: 256` | -- |
|
|
46
|
+
| Hit & Cursor / 命中與游標 | `interaction` | style | container | style | every layer | `cursor: pointer` | -- |
|
|
47
|
+
| Responsive / 響應式 | `responsive` | style | container | layout | every layer | `ui-scale: auto` | -- |
|
|
48
|
+
| Opacity & Blend / 不透明度與混合 | `opacity` | style | composite | style | every layer | `opacity: 1` | `opacity` |
|
|
49
|
+
| Clip Shape / 裁切形狀 | `clip` | style | composite | style | every layer | `clip-path: inset(0)` | `clip` |
|
|
50
|
+
| Effects / 效果 | `effects` | effect | composite | style | every layer | -- | `shadow`, `glow`, `blur`, `backdrop-blur`, `shine`, `color-adjust`, `gradient-mask`, `outline-fx`, `custom`, `custom-new`, `shader:<name>` |
|
|
51
|
+
| Modifiers / 修改器 | `modifiers` | modifier | none | style | Vector, ShapeGroup | -- | `mod:<tag>` |
|
|
52
|
+
| Clip / 片段 | `clip-media` | style | container | style | Clip | -- | -- |
|
|
53
|
+
| 3D | `space3d` | style | container | layout | Space3D, Camera | -- | -- |
|
|
54
|
+
| Cache & Other / 快取與其他 | `render` | raw | none | style (`layer`: layout) | every layer | -- | -- |
|
|
55
|
+
|
|
56
|
+
## Position & Size / 位置與尺寸 -- `placement`
|
|
57
|
+
|
|
58
|
+
| Parameter | Parameter name | CSS property | Section | Row | Range / unit | Values | Animatable |
|
|
59
|
+
|---|---|---|---|---|---|---|---|
|
|
60
|
+
| Position / 定位 | `position` | `position` | layout | choice | | `static`, `relative`, `absolute` | |
|
|
61
|
+
| Left / 左 | `left` | `left` | layout | length | | | yes |
|
|
62
|
+
| Top / 上 | `top` | `top` | layout | length | | | yes |
|
|
63
|
+
| Right / 右 | `right` | `right` | layout | length | | | yes |
|
|
64
|
+
| Bottom / 下 | `bottom` | `bottom` | layout | length | | | yes |
|
|
65
|
+
| Inset / 內縮 | `inset` | `inset` | layout | sides | | | |
|
|
66
|
+
| Width / 寬 | `width` | `width` | layout | length | 0.. | | yes |
|
|
67
|
+
| Height / 高 | `height` | `height` | layout | length | 0.. | | yes |
|
|
68
|
+
| Min width / 最小寬 | `minWidth` | `min-width` | layout | length | 0.. | | yes |
|
|
69
|
+
| Min height / 最小高 | `minHeight` | `min-height` | layout | length | 0.. | | yes |
|
|
70
|
+
| Max width / 最大寬 | `maxWidth` | `max-width` | layout | length | 0.. | | yes |
|
|
71
|
+
| Max height / 最大高 | `maxHeight` | `max-height` | layout | length | 0.. | | yes |
|
|
72
|
+
| Aspect ratio / 長寬比 | `aspectRatio` | `aspect-ratio` | layout | text | | | yes |
|
|
73
|
+
| Margin / 邊界 | `margin` | `margin` | layout | sides | | | |
|
|
74
|
+
| Margin top / 上邊界 | `marginTop` | `margin-top` | layout | length | | | yes |
|
|
75
|
+
| Margin right / 右邊界 | `marginRight` | `margin-right` | layout | length | | | yes |
|
|
76
|
+
| Margin bottom / 下邊界 | `marginBottom` | `margin-bottom` | layout | length | | | yes |
|
|
77
|
+
| Margin left / 左邊界 | `marginLeft` | `margin-left` | layout | length | | | yes |
|
|
78
|
+
| Transform / 變形 | `transform` | `transform` | layout | text | | | yes |
|
|
79
|
+
| Origin / 原點 | `transformOrigin` | `transform-origin` | layout | text | | | yes |
|
|
80
|
+
| Rotation / 旋轉 | `rotate` | `rotate` | layout | angle | ° | | yes |
|
|
81
|
+
| Scale / 縮放 | `scale` | `scale` | layout | percent | % | | yes |
|
|
82
|
+
| Offset / 位移 | `translate` | `translate` | layout | text | | | yes |
|
|
83
|
+
| Auto orient / 自動定向 | `autoOrient` | `auto-orient` | layout | toggle | | `none`, `path` | |
|
|
84
|
+
| Clip content / 裁切內容 | `overflow` | `overflow` | layout | choice | | `visible`, `hidden`, `scroll` | |
|
|
85
|
+
| Clip content X / 水平裁切內容 | `overflowX` | `overflow-x` | layout | choice | | | |
|
|
86
|
+
| Clip content Y / 垂直裁切內容 | `overflowY` | `overflow-y` | layout | choice | | | |
|
|
87
|
+
| Order / 順序 | `order` | `order` | layout | number | | | |
|
|
88
|
+
| Stacking order / 疊放順序 | `zIndex` | `z-index` | layout | number | | | |
|
|
89
|
+
| Display / 顯示方式 | `display` | `display` | layout | choice | | `block`, `flex`, `none` | |
|
|
90
|
+
| Self alignment / 自身對齊 | `alignSelf` | `align-self` | layout | choice | | `auto`, `stretch`, `flex-start`, `flex-end`, `center` | |
|
|
91
|
+
| Flex / 伸縮 | `flex` | `flex` | layout | text | | | |
|
|
92
|
+
| Grow / 放大比例 | `flexGrow` | `flex-grow` | layout | number | 0.. | | yes |
|
|
93
|
+
| Shrink / 縮小比例 | `flexShrink` | `flex-shrink` | layout | number | 0.. | | yes |
|
|
94
|
+
| Base size / 基準尺寸 | `flexBasis` | `flex-basis` | layout | length | 0.. | | yes |
|
|
95
|
+
| Grid area / 格線區域 | `gridArea` | `grid-area` | layout | text | | | |
|
|
96
|
+
| Grid column / 格線欄 | `gridColumn` | `grid-column` | layout | text | | | |
|
|
97
|
+
| Column start / 起始欄 | `gridColumnStart` | `grid-column-start` | layout | text | | | |
|
|
98
|
+
| Column end / 結束欄 | `gridColumnEnd` | `grid-column-end` | layout | text | | | |
|
|
99
|
+
| Grid row / 格線列 | `gridRow` | `grid-row` | layout | text | | | |
|
|
100
|
+
| Row start / 起始列 | `gridRowStart` | `grid-row-start` | layout | text | | | |
|
|
101
|
+
| Row end / 結束列 | `gridRowEnd` | `grid-row-end` | layout | text | | | |
|
|
102
|
+
|
|
103
|
+
## Auto Layout / 自動版面 -- `autolayout`
|
|
104
|
+
|
|
105
|
+
Also present when `display` is `flex` or `grid`.
|
|
106
|
+
|
|
107
|
+
| Parameter | Parameter name | CSS property | Section | Row | Range / unit | Values | Animatable |
|
|
108
|
+
|---|---|---|---|---|---|---|---|
|
|
109
|
+
| Direction / 方向 | `flexDirection` | `flex-direction` | layout | choice | | `row`, `column` | |
|
|
110
|
+
| Wrap / 換行 | `flexWrap` | `flex-wrap` | layout | choice | | `nowrap`, `wrap` | |
|
|
111
|
+
| Distribution / 分布 | `justifyContent` | `justify-content` | layout | choice | | `flex-start`, `flex-end`, `center`, `space-between`, `space-around`, `space-evenly` | |
|
|
112
|
+
| Alignment / 對齊 | `alignItems` | `align-items` | layout | choice | | `stretch`, `flex-start`, `flex-end`, `center` | |
|
|
113
|
+
| Line alignment / 行對齊 | `alignContent` | `align-content` | layout | choice | | `flex-start`, `flex-end`, `center`, `space-between`, `space-around`, `space-evenly`, `stretch` | |
|
|
114
|
+
| Cell alignment / 格內對齊 | `justifyItems` | `justify-items` | layout | choice | | | |
|
|
115
|
+
| Row gap / 列間距 | `rowGap` | `row-gap` | layout | length | 0.. | | yes |
|
|
116
|
+
| Column gap / 欄間距 | `columnGap` | `column-gap` | layout | length | 0.. | | yes |
|
|
117
|
+
| Gap / 間距 | `gap` | `gap` | layout | length | 0.. | | |
|
|
118
|
+
| Padding / 內距 | `padding` | `padding` | layout | sides | 0.. | | |
|
|
119
|
+
| Padding top / 上內距 | `paddingTop` | `padding-top` | layout | length | 0.. | | yes |
|
|
120
|
+
| Padding right / 右內距 | `paddingRight` | `padding-right` | layout | length | 0.. | | yes |
|
|
121
|
+
| Padding bottom / 下內距 | `paddingBottom` | `padding-bottom` | layout | length | 0.. | | yes |
|
|
122
|
+
| Padding left / 左內距 | `paddingLeft` | `padding-left` | layout | length | 0.. | | yes |
|
|
123
|
+
| Columns / 欄 | `gridTemplateColumns` | `grid-template-columns` | layout | text | | | |
|
|
124
|
+
| Rows / 列 | `gridTemplateRows` | `grid-template-rows` | layout | text | | | |
|
|
125
|
+
| Areas / 區域 | `gridTemplateAreas` | `grid-template-areas` | layout | text | | | |
|
|
126
|
+
|
|
127
|
+
## Fill / 填色 -- `fill`
|
|
128
|
+
|
|
129
|
+
| Parameter | Parameter name | CSS property | Section | Row | Range / unit | Values | Animatable |
|
|
130
|
+
|---|---|---|---|---|---|---|---|
|
|
131
|
+
| Color / 顏色 | `color` | `background-color` | style | color | | | yes |
|
|
132
|
+
| Gradient / 漸層 | `gradient` | `background-gradient` | style | gradient | | | |
|
|
133
|
+
| Image / 圖片 | `image` | `background-image` | style | image | | | |
|
|
134
|
+
| Image scaling / 圖片縮放 | `size` | `background-size` | style | choice | | `100% 100%`, `cover`, `contain`, `auto` | yes |
|
|
135
|
+
| Image position / 圖片位置 | `position` | `background-position` | style | choice | | `left top`, `center top`, `right top`, `left center`, `center`, `right center`, `left bottom`, `center bottom`, `right bottom` | yes |
|
|
136
|
+
| Tiling / 平鋪 | `repeat` | `background-repeat` | style | choice | | `no-repeat`, `repeat`, `repeat-x`, `repeat-y` | |
|
|
137
|
+
|
|
138
|
+
## Stroke / 描邊 -- `stroke`
|
|
139
|
+
|
|
140
|
+
| Parameter | Parameter name | CSS property | Section | Row | Range / unit | Values | Animatable |
|
|
141
|
+
|---|---|---|---|---|---|---|---|
|
|
142
|
+
| Stroke / 描邊 | `border` | `border` | style | text | | | |
|
|
143
|
+
| Width / 寬 | `width` | `border-width` | style | sides | 0.. | | |
|
|
144
|
+
| Top width / 上寬 | `topWidth` | `border-top-width` | style | length | 0.. | | yes |
|
|
145
|
+
| Right width / 右寬 | `rightWidth` | `border-right-width` | style | length | 0.. | | yes |
|
|
146
|
+
| Bottom width / 下寬 | `bottomWidth` | `border-bottom-width` | style | length | 0.. | | yes |
|
|
147
|
+
| Left width / 左寬 | `leftWidth` | `border-left-width` | style | length | 0.. | | yes |
|
|
148
|
+
| Color / 顏色 | `color` | `border-color` | style | color | | | yes |
|
|
149
|
+
| Top color / 上顏色 | `topColor` | `border-top-color` | style | color | | | yes |
|
|
150
|
+
| Right color / 右顏色 | `rightColor` | `border-right-color` | style | color | | | yes |
|
|
151
|
+
| Bottom color / 下顏色 | `bottomColor` | `border-bottom-color` | style | color | | | yes |
|
|
152
|
+
| Left color / 左顏色 | `leftColor` | `border-left-color` | style | color | | | yes |
|
|
153
|
+
| Line style / 線型 | `style` | `border-style` | style | choice | | `solid`, `dashed`, `dotted`, `none` | |
|
|
154
|
+
| Top line style / 上線型 | `topStyle` | `border-top-style` | style | choice | | `solid`, `dashed`, `dotted`, `none` | |
|
|
155
|
+
| Right line style / 右線型 | `rightStyle` | `border-right-style` | style | choice | | `solid`, `dashed`, `dotted`, `none` | |
|
|
156
|
+
| Bottom line style / 下線型 | `bottomStyle` | `border-bottom-style` | style | choice | | `solid`, `dashed`, `dotted`, `none` | |
|
|
157
|
+
| Left line style / 左線型 | `leftStyle` | `border-left-style` | style | choice | | `solid`, `dashed`, `dotted`, `none` | |
|
|
158
|
+
|
|
159
|
+
## Corners / 圓角 -- `corner`
|
|
160
|
+
|
|
161
|
+
| Parameter | Parameter name | CSS property | Section | Row | Range / unit | Values | Animatable |
|
|
162
|
+
|---|---|---|---|---|---|---|---|
|
|
163
|
+
| Radius / 半徑 | `radius` | `border-radius` | style | corners | 0.. | | |
|
|
164
|
+
| Top left / 左上 | `topLeftRadius` | `border-top-left-radius` | style | length | 0.. | | yes |
|
|
165
|
+
| Top right / 右上 | `topRightRadius` | `border-top-right-radius` | style | length | 0.. | | yes |
|
|
166
|
+
| Bottom right / 右下 | `bottomRightRadius` | `border-bottom-right-radius` | style | length | 0.. | | yes |
|
|
167
|
+
| Bottom left / 左下 | `bottomLeftRadius` | `border-bottom-left-radius` | style | length | 0.. | | yes |
|
|
168
|
+
|
|
169
|
+
## Image / 圖片 -- `image`
|
|
170
|
+
|
|
171
|
+
| Parameter | Parameter name | CSS property | Section | Row | Range / unit | Values | Animatable |
|
|
172
|
+
|---|---|---|---|---|---|---|---|
|
|
173
|
+
| Scale mode / 縮放方式 | `objectFit` | `object-fit` | style | choice | | `fill`, `contain`, `cover` | |
|
|
174
|
+
| Image opacity / 圖片不透明度 | `imageOpacity` | `image-opacity` | style | percent | 0..1 % | | yes |
|
|
175
|
+
| Pixels / 像素化 | `imageRendering` | `image-rendering` | style | toggle | | `auto`, `pixelated` | |
|
|
176
|
+
| Nine-slice / 九宮格 | `borderImage` | `border-image` | style | text | | | |
|
|
177
|
+
| Nine-slice image / 九宮格圖片 | `borderImageSource` | `border-image-source` | style | image | | | |
|
|
178
|
+
| Slice / 切割 | `borderImageSlice` | `border-image-slice` | style | sides | 0.. | | |
|
|
179
|
+
| Slice tiling / 切片重複 | `borderImageRepeat` | `border-image-repeat` | style | choice | | `stretch`, `repeat`, `round` | |
|
|
180
|
+
| Fill center / 填滿中央 | `borderImageFill` | `border-image-fill` | style | toggle | | `false`, `true` | |
|
|
181
|
+
|
|
182
|
+
## Text / 文字 -- `text`
|
|
183
|
+
|
|
184
|
+
| Parameter | Parameter name | CSS property | Section | Row | Range / unit | Values | Animatable |
|
|
185
|
+
|---|---|---|---|---|---|---|---|
|
|
186
|
+
| Font / 字型 | `fontFamily` | `font-family` | style | text | | | |
|
|
187
|
+
| Weight / 字重 | `fontWeight` | `font-weight` | style | choice | | `100`, `200`, `300`, `400`, `500`, `600`, `700`, `800`, `900`, `normal`, `bold` | |
|
|
188
|
+
| Italic / 斜體 | `fontStyle` | `font-style` | style | toggle | | `normal`, `italic` | |
|
|
189
|
+
| Font size / 字級 | `fontSize` | `font-size` | style | length | 0.. | | yes |
|
|
190
|
+
| Line height / 行高 | `lineHeight` | `line-height` | style | number | 0.. | | yes |
|
|
191
|
+
| Letter spacing / 字距 | `letterSpacing` | `letter-spacing` | style | length | | | yes |
|
|
192
|
+
| Alignment / 對齊 | `textAlign` | `text-align` | style | choice | | `left`, `center`, `right` | |
|
|
193
|
+
| Color / 顏色 | `color` | `color` | style | color | | | yes |
|
|
194
|
+
| Wrapping / 換行 | `whiteSpace` | `white-space` | style | choice | | `normal`, `nowrap` | |
|
|
195
|
+
| Overflow / 溢出 | `textOverflow` | `text-overflow` | style | choice | | `clip`, `ellipsis` | |
|
|
196
|
+
| Line limit / 行數上限 | `lineClamp` | `line-clamp` | style | number | 0.. | | |
|
|
197
|
+
| Line limit (legacy) / 行數上限(舊寫法) | `webkitLineClamp` | `-webkit-line-clamp` | style | number | 0.. | | |
|
|
198
|
+
| Case / 大小寫 | `textTransform` | `text-transform` | style | choice | | | |
|
|
199
|
+
| Decoration / 裝飾 | `textDecoration` | `text-decoration` | style | text | | | |
|
|
200
|
+
| Decoration line / 裝飾線 | `textDecorationLine` | `text-decoration-line` | style | choice | | | |
|
|
201
|
+
| Decoration color / 裝飾顏色 | `textDecorationColor` | `text-decoration-color` | style | color | | | yes |
|
|
202
|
+
| Decoration thickness / 裝飾粗細 | `textDecorationThickness` | `text-decoration-thickness` | style | length | 0.. | | yes |
|
|
203
|
+
| Tabular numbers / 等寬數字 | `fontVariantNumeric` | `font-variant-numeric` | style | toggle | | `normal`, `tabular-nums` | |
|
|
204
|
+
| Text effect / 文字效果 | `textEffect` | `text-effect` | style | effect | | | |
|
|
205
|
+
| Text reveal / 文字揭露 | `textReveal` | `text-reveal` | style | text | | | yes |
|
|
206
|
+
|
|
207
|
+
## Focus Outline / 外框線(焦點) -- `outline`
|
|
208
|
+
|
|
209
|
+
| Parameter | Parameter name | CSS property | Section | Row | Range / unit | Values | Animatable |
|
|
210
|
+
|---|---|---|---|---|---|---|---|
|
|
211
|
+
| Outline / 外框線 | `outline` | `outline` | style | text | | | |
|
|
212
|
+
| Width / 寬 | `width` | `outline-width` | style | length | 0.. | | yes |
|
|
213
|
+
| Color / 顏色 | `color` | `outline-color` | style | color | | | yes |
|
|
214
|
+
| Line style / 線型 | `style` | `outline-style` | style | choice | | `none`, `solid` | |
|
|
215
|
+
| Offset / 位移 | `offset` | `outline-offset` | style | length | | | yes |
|
|
216
|
+
|
|
217
|
+
## Vector Fill & Stroke / 向量填色與描邊 -- `vector`
|
|
218
|
+
|
|
219
|
+
| Parameter | Parameter name | CSS property | Section | Row | Range / unit | Values | Animatable |
|
|
220
|
+
|---|---|---|---|---|---|---|---|
|
|
221
|
+
| Fill / 填色 | `fill` | `fill` | style | color | | | yes |
|
|
222
|
+
| Fill opacity / 填色不透明度 | `fillOpacity` | `fill-opacity` | style | percent | 0..1 % | | yes |
|
|
223
|
+
| Stroke / 描邊 | `stroke` | `stroke` | style | color | | | yes |
|
|
224
|
+
| Stroke width / 線寬 | `strokeWidth` | `stroke-width` | style | length | 0.. | | yes |
|
|
225
|
+
| Stroke opacity / 描邊不透明度 | `strokeOpacity` | `stroke-opacity` | style | percent | 0..1 % | | yes |
|
|
226
|
+
| Dashes / 虛線 | `strokeDasharray` | `stroke-dasharray` | style | list | | | yes |
|
|
227
|
+
| Dash offset / 虛線位移 | `strokeDashoffset` | `stroke-dashoffset` | style | length | | | yes |
|
|
228
|
+
| Taper start / 起點收尖 | `strokeTaperStart` | `stroke-taper-start` | style | percent | 0..1 % | | yes |
|
|
229
|
+
| Taper end / 終點收尖 | `strokeTaperEnd` | `stroke-taper-end` | style | percent | 0..1 % | | yes |
|
|
230
|
+
| Trim / 修剪 | `pathTrim` | `path-trim` | style | text | | | yes |
|
|
231
|
+
| Trim start / 修剪起點 | `pathTrimStart` | `path-trim-start` | style | percent | 0..1 % | | yes |
|
|
232
|
+
| Trim end / 修剪終點 | `pathTrimEnd` | `path-trim-end` | style | percent | 0..1 % | | yes |
|
|
233
|
+
| Trim offset / 修剪位移 | `pathTrimOffset` | `path-trim-offset` | style | number | turn | | yes |
|
|
234
|
+
| Path / 路徑 | `d` | `d` | style | path | | | yes |
|
|
235
|
+
|
|
236
|
+
## Particles / 粒子 -- `particles`
|
|
237
|
+
|
|
238
|
+
| Parameter | Parameter name | CSS property | Section | Row | Range / unit | Values | Animatable |
|
|
239
|
+
|---|---|---|---|---|---|---|---|
|
|
240
|
+
| Rate / 速率 | `rate` | `particle-rate` | style | number | 0.. /s | | yes |
|
|
241
|
+
| Burst / 爆發 | `burst` | `particle-burst` | style | number | 0.. | | yes |
|
|
242
|
+
| Lifetime / 壽命 | `lifetime` | `particle-lifetime` | style | time | 0.. s | | yes |
|
|
243
|
+
| Min lifetime / 最短壽命 | `lifetimeMin` | `particle-lifetime-min` | style | time | 0.. s | | yes |
|
|
244
|
+
| Max lifetime / 最長壽命 | `lifetimeMax` | `particle-lifetime-max` | style | time | 0.. s | | yes |
|
|
245
|
+
| Speed / 速度 | `speed` | `particle-speed` | style | number | px/s | | yes |
|
|
246
|
+
| Min speed / 最低速度 | `speedMin` | `particle-speed-min` | style | number | px/s | | yes |
|
|
247
|
+
| Max speed / 最高速度 | `speedMax` | `particle-speed-max` | style | number | px/s | | yes |
|
|
248
|
+
| Direction / 方向 | `direction` | `particle-direction` | style | angle | ° | | yes |
|
|
249
|
+
| Spread / 擴散 | `spread` | `particle-spread` | style | angle | 0..360 ° | | yes |
|
|
250
|
+
| Gravity / 重力 | `gravity` | `particle-gravity` | style | number | px/s² | | yes |
|
|
251
|
+
| Drag / 阻力 | `drag` | `particle-drag` | style | number | 0.. | | yes |
|
|
252
|
+
| Size / 大小 | `size` | `particle-size` | style | length | 0.. | | yes |
|
|
253
|
+
| Start size / 起始大小 | `sizeStart` | `particle-size-start` | style | length | 0.. | | yes |
|
|
254
|
+
| End size / 結束大小 | `sizeEnd` | `particle-size-end` | style | length | 0.. | | yes |
|
|
255
|
+
| Color / 顏色 | `color` | `particle-color` | style | color | | | yes |
|
|
256
|
+
| Rotation / 旋轉 | `rotation` | `particle-rotation` | style | angle | ° | | yes |
|
|
257
|
+
| Min rotation / 最小旋轉 | `rotationMin` | `particle-rotation-min` | style | angle | ° | | yes |
|
|
258
|
+
| Max rotation / 最大旋轉 | `rotationMax` | `particle-rotation-max` | style | angle | ° | | yes |
|
|
259
|
+
| Max particles / 粒子上限 | `max` | `particle-max` | style | number | 1.. | | yes |
|
|
260
|
+
|
|
261
|
+
## Hit & Cursor / 命中與游標 -- `interaction`
|
|
262
|
+
|
|
263
|
+
| Parameter | Parameter name | CSS property | Section | Row | Range / unit | Values | Animatable |
|
|
264
|
+
|---|---|---|---|---|---|---|---|
|
|
265
|
+
| Cursor / 游標 | `cursor` | `cursor` | style | choice | | `default`, `pointer`, `text`, `move` | |
|
|
266
|
+
| Hit test / 命中判定 | `pointerEvents` | `pointer-events` | style | toggle | | `none`, `auto` | |
|
|
267
|
+
| Hit expansion / 命中擴張 | `hitSlop` | `hit-slop` | style | sides | 0.. | | |
|
|
268
|
+
| Pointer watch / 指標追蹤 | `pointerWatch` | `pointer-watch` | style | toggle | | `false`, `true` | |
|
|
269
|
+
| Focus navigation / 焦點導覽 | `focusNav` | `focus-nav` | style | choice | | `auto`, `explicit`, `none` | |
|
|
270
|
+
| Drag region / 拖曳區域 | `appRegion` | `app-region` | style | choice | | `none`, `drag`, `no-drag` | |
|
|
271
|
+
|
|
272
|
+
## Responsive / 響應式 -- `responsive`
|
|
273
|
+
|
|
274
|
+
| Parameter | Parameter name | CSS property | Section | Row | Range / unit | Values | Animatable |
|
|
275
|
+
|---|---|---|---|---|---|---|---|
|
|
276
|
+
| UI scale / 介面縮放 | `uiScale` | `ui-scale` | layout | choice | | `auto`, `none`, `clamp` | |
|
|
277
|
+
| Visibility exception / 顯示例外 | `mediaOverride` | `media-override` | layout | choice | | `auto`, `show`, `hide` | |
|
|
278
|
+
|
|
279
|
+
## Opacity & Blend / 不透明度與混合 -- `opacity`
|
|
280
|
+
|
|
281
|
+
| Parameter | Parameter name | CSS property | Section | Row | Range / unit | Values | Animatable |
|
|
282
|
+
|---|---|---|---|---|---|---|---|
|
|
283
|
+
| Opacity / 不透明度 | `opacity` | `opacity` | style | percent | 0..1 % | | yes |
|
|
284
|
+
| Blend mode / 混合模式 | `mixBlendMode` | `mix-blend-mode` | style | choice | | | |
|
|
285
|
+
| Visibility / 可見性 | `visibility` | `visibility` | style | choice | | `visible`, `hidden` | |
|
|
286
|
+
|
|
287
|
+
## Clip Shape / 裁切形狀 -- `clip`
|
|
288
|
+
|
|
289
|
+
| Parameter | Parameter name | CSS property | Section | Row | Range / unit | Values | Animatable |
|
|
290
|
+
|---|---|---|---|---|---|---|---|
|
|
291
|
+
| Clip shape / 裁切形狀 | `clipPath` | `clip-path` | style | shape | | `none`, `inset`, `circle`, `ellipse`, `polygon` | |
|
|
292
|
+
|
|
293
|
+
## Effects / 效果 -- `effects`
|
|
294
|
+
|
|
295
|
+
| Parameter | Parameter name | CSS property | Section | Row | Range / unit | Values | Animatable |
|
|
296
|
+
|---|---|---|---|---|---|---|---|
|
|
297
|
+
| Effects / 效果 | `effect` | `effect` | style | effect | | | yes |
|
|
298
|
+
|
|
299
|
+
## Modifiers / 修改器 -- `modifiers`
|
|
300
|
+
|
|
301
|
+
| Parameter | Parameter name | CSS property | Section | Row | Range / unit | Values | Animatable |
|
|
302
|
+
|---|---|---|---|---|---|---|---|
|
|
303
|
+
|
|
304
|
+
## Clip / 片段 -- `clip-media`
|
|
305
|
+
|
|
306
|
+
| Parameter | Parameter name | CSS property | Section | Row | Range / unit | Values | Animatable |
|
|
307
|
+
|---|---|---|---|---|---|---|---|
|
|
308
|
+
| Start / 起點 | `start` | `clip-start` | style | time | s | | |
|
|
309
|
+
| Rate / 速率 | `rate` | `clip-rate` | style | number | 0.. × | | |
|
|
310
|
+
|
|
311
|
+
## 3D -- `space3d`
|
|
312
|
+
|
|
313
|
+
| Parameter | Parameter name | CSS property | Section | Row | Range / unit | Values | Animatable |
|
|
314
|
+
|---|---|---|---|---|---|---|---|
|
|
315
|
+
| Perspective / 透視 | `perspective` | `perspective` | layout | length | 0.. | | yes |
|
|
316
|
+
| Perspective origin / 透視原點 | `perspectiveOrigin` | `perspective-origin` | layout | text | | | yes |
|
|
317
|
+
| Back face / 背面 | `backfaceVisibility` | `backface-visibility` | layout | choice | | `visible`, `hidden` | |
|
|
318
|
+
|
|
319
|
+
## Cache & Other / 快取與其他 -- `render`
|
|
320
|
+
|
|
321
|
+
| Parameter | Parameter name | CSS property | Section | Row | Range / unit | Values | Animatable |
|
|
322
|
+
|---|---|---|---|---|---|---|---|
|
|
323
|
+
| Reading direction / 閱讀方向 | `direction` | `direction` | style | choice | | `ltr`, `rtl` | |
|
|
324
|
+
| Writing mode / 書寫方向 | `writingMode` | `writing-mode` | style | choice | | `horizontal-tb`, `vertical-rl`, `vertical-lr` | |
|
|
325
|
+
| Text orientation / 文字方向 | `textOrientation` | `text-orientation` | style | choice | | `mixed`, `upright`, `sideways` | |
|
|
326
|
+
| Language / 語言 | `lang` | `lang` | style | text | | | |
|
|
327
|
+
| Text rendering / 文字繪製 | `textRendering` | `text-rendering` | style | choice | | `auto`, `geometricPrecision`, `auto`, `geometricPrecision` | |
|
|
328
|
+
| Transition / 過渡 | `transition` | `transition` | style | text | | | |
|
|
329
|
+
| Animation / 動畫 | `animation` | `animation` | style | text | | | |
|
|
330
|
+
| Layer / 圖層 | `layer` | `layer` | layout | text | | | |
|
|
331
|
+
| World layer / 世界圖層 | `worldLayer` | `world-layer` | style | toggle | | `off`, `on` | |
|
|
332
|
+
|
|
333
|
+
## Effect catalog: catalog id <-> parameter name
|
|
334
|
+
|
|
335
|
+
The parameters the Effects panel (and the stack's Effects section) shows for each effect of the
|
|
336
|
+
catalog, in order, and the `effect:` function argument each one writes (18 §18.4; the board
|
|
337
|
+
still writes the function). The drop shadow's distance and angle are `offsetX` / `offsetY` as
|
|
338
|
+
polar coordinates: `x = d cos(angle)`, `y = d sin(angle)`, 0 deg right, 90 deg down.
|
|
339
|
+
|
|
340
|
+
| Catalog id | Effect | Function | Parameter | Argument |
|
|
341
|
+
|---|---|---|---|---|
|
|
342
|
+
| `shadow` | Drop shadow / 投影 | `shadow` | Distance / 距離 | `offsetX offsetY` |
|
|
343
|
+
| `shadow` | Drop shadow / 投影 | `shadow` | Angle / 角度 | `offsetX offsetY` |
|
|
344
|
+
| `shadow` | Drop shadow / 投影 | `shadow` | Softness / 柔邊 | `blur` |
|
|
345
|
+
| `shadow` | Drop shadow / 投影 | `shadow` | Spread / 擴張 | `spread` |
|
|
346
|
+
| `shadow` | Drop shadow / 投影 | `shadow` | Color / 顏色 | `color opacity` |
|
|
347
|
+
| `shadow` | Drop shadow / 投影 | `shadow` | Inside / 內側 | `inset` |
|
|
348
|
+
| `glow` | Glow / 光暈 | `glow` | Range / 範圍 | `radius` |
|
|
349
|
+
| `glow` | Glow / 光暈 | `glow` | Color / 顏色 | `color` |
|
|
350
|
+
| `glow` | Glow / 光暈 | `glow` | Strength / 強度 | `intensity` |
|
|
351
|
+
| `glow` | Glow / 光暈 | `glow` | Inside / 內側 | `inner` |
|
|
352
|
+
| `blur` | Blur / 模糊 | `blur` | Strength / 強度 | `radiusX` |
|
|
353
|
+
| `blur` | Blur / 模糊 | `blur` | Vertical / 垂直 | `radiusY` |
|
|
354
|
+
| `backdrop-blur` | Frosted glass / 毛玻璃 | `backdrop-blur` | Strength / 強度 | `radius` |
|
|
355
|
+
| `backdrop-blur` | Frosted glass / 毛玻璃 | `backdrop-blur` | Saturation / 飽和 | `saturation` |
|
|
356
|
+
| `backdrop-blur` | Frosted glass / 毛玻璃 | `backdrop-blur` | Brightness / 亮度 | `brightness` |
|
|
357
|
+
| `shine` | Shine / 掃光 | `shine` | Angle / 角度 | `angle` |
|
|
358
|
+
| `shine` | Shine / 掃光 | `shine` | Width / 寬度 | `width` |
|
|
359
|
+
| `shine` | Shine / 掃光 | `shine` | Softness / 柔邊 | `softness` |
|
|
360
|
+
| `shine` | Shine / 掃光 | `shine` | Strength / 強度 | `intensity` |
|
|
361
|
+
| `shine` | Shine / 掃光 | `shine` | Position / 位置 | `position` |
|
|
362
|
+
| `shine` | Shine / 掃光 | `shine` | Color / 顏色 | `color` |
|
|
363
|
+
| `color-adjust` | Color adjust / 顏色調整 | `color-adjust` | Brightness / 亮度 | `brightness()` |
|
|
364
|
+
| `color-adjust` | Color adjust / 顏色調整 | `color-adjust` | Contrast / 對比 | `contrast()` |
|
|
365
|
+
| `color-adjust` | Color adjust / 顏色調整 | `color-adjust` | Saturation / 飽和 | `saturate()` |
|
|
366
|
+
| `color-adjust` | Color adjust / 顏色調整 | `color-adjust` | Hue / 色相 | `hue-rotate()` |
|
|
367
|
+
| `color-adjust` | Color adjust / 顏色調整 | `color-adjust` | Opacity / 不透明度 | `opacity()` |
|
|
368
|
+
| `color-adjust` | Color adjust / 顏色調整 | `color-adjust` | Negative / 負片 | `invert()` |
|
|
369
|
+
| `color-adjust` | Color adjust / 顏色調整 | `color-adjust` | Sepia / 懷舊 | `sepia()` |
|
|
370
|
+
| `gradient-mask` | Gradient fade / 漸層遮罩 | `gradient-mask` | Direction / 方向 | `linear \| radial` |
|
|
371
|
+
| `gradient-mask` | Gradient fade / 漸層遮罩 | `gradient-mask` | Start / 起點 | `p0 (x y)` |
|
|
372
|
+
| `gradient-mask` | Gradient fade / 漸層遮罩 | `gradient-mask` | End / 終點 | `p1 (x y)` |
|
|
373
|
+
| `gradient-mask` | Gradient fade / 漸層遮罩 | `gradient-mask` | Color stops / 色標 | `color stops` |
|
|
374
|
+
| `gradient-mask` | Gradient fade / 漸層遮罩 | `gradient-mask` | Invert / 反轉 | `invert` |
|
|
375
|
+
| `outline-fx` | Outline / 輪廓線 | `outline` | Thickness / 粗細 | `radius` |
|
|
376
|
+
| `outline-fx` | Outline / 輪廓線 | `outline` | Color / 顏色 | `color` |
|
|
377
|
+
| `outline-fx` | Outline / 輪廓線 | `outline` | Softness / 柔邊 | `softness` |
|
|
378
|
+
| `outline-fx` | Outline / 輪廓線 | `outline` | Position / 位置 | `outer \| center \| inner` |
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html><head><meta charset="utf-8"><title>Authored HUD</title></head>
|
|
3
|
+
<body><x-dc>
|
|
4
|
+
<helmet><style>
|
|
5
|
+
body { margin: 0; background: #0b0f14 }
|
|
6
|
+
.label { font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: #8b949e }
|
|
7
|
+
.btn { width: 104px; height: 40px; text-align: center; line-height: 40px;
|
|
8
|
+
background-color: #161b22e6; border: 1px solid #30363d; border-radius: 8px;
|
|
9
|
+
color: #e6edf3; font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
|
|
10
|
+
transition: background-color 140ms ease-out }
|
|
11
|
+
.btn:hover { background-color: #2f81f7; border: 1px solid #2f81f7; color: #ffffff }
|
|
12
|
+
@keyframes pulse {
|
|
13
|
+
from { opacity: 0.72; box-shadow: 0 0 0 0 #2f81f700 }
|
|
14
|
+
to { opacity: 1; box-shadow: 0 0 18px 0 #2f81f7cc }
|
|
15
|
+
}
|
|
16
|
+
</style></helmet>
|
|
17
|
+
<div id="authored-hud" style="position: relative; width: 1280px; height: 720px; background-color: #0b0f14;
|
|
18
|
+
perspective: 1400px; perspective-origin: 50% 50%;
|
|
19
|
+
font-family: 'Segoe UI', 'Noto Sans', sans-serif; font-size: 14px; color: #e6edf3;">
|
|
20
|
+
|
|
21
|
+
<div id="hp-readout" style="position: absolute; left: 32px; top: 32px; width: 320px;
|
|
22
|
+
display: flex; flex-direction: column; gap: 8px;">
|
|
23
|
+
<span id="hp-label" class="label">Vitals</span>
|
|
24
|
+
<div id="hp-track" style="width: 320px; height: 16px; border-radius: 8px; overflow: hidden;
|
|
25
|
+
background-color: #161b22e6; border: 1px solid #30363d;">
|
|
26
|
+
<div id="hp-fill" style="width: {{hp}}%; height: 100%; background-color: #2ea043;"></div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div id="ammo-readout" style="position: absolute; right: 32px; top: 28px;
|
|
31
|
+
display: flex; flex-direction: column; align-items: flex-end; gap: 4px;">
|
|
32
|
+
<span id="ammo-label" class="label">Ammo</span>
|
|
33
|
+
<span id="ammo-value" style="font-size: 48px; font-weight: 700; line-height: 52px; color: #e6edf3;">{{ammo}}</span>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div id="panel-quest" style="position: absolute; left: 48px; top: 220px; width: 320px; height: 196px;
|
|
37
|
+
padding: 20px; display: flex; flex-direction: column; gap: 12px;
|
|
38
|
+
background-color: #161b22e6; border: 1px solid #30363d; border-radius: 12px;
|
|
39
|
+
backdrop-filter: blur(10px); box-shadow: 0 10px 28px 0 #0000008c;
|
|
40
|
+
transform-origin: 100% 50%; transform: rotateY(14deg);">
|
|
41
|
+
<div id="quest-title" style="font-size: 22px; font-weight: 600; color: #e6edf3;">Signal Relay</div>
|
|
42
|
+
<p id="quest-line-1" style="margin: 0; font-size: 14px; line-height: 20px; color: #8b949e;">Reach the relay tower before the storm front closes the pass.</p>
|
|
43
|
+
<p id="quest-line-2" style="margin: 0; font-size: 14px; line-height: 20px; color: #d29922;">Objective 2 of 4 - 340 m remaining</p>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div id="hud-actions" style="position: absolute; right: 32px; bottom: 32px; display: flex; gap: 12px;">
|
|
47
|
+
<button id="btn-map" class="btn">Map</button>
|
|
48
|
+
<button id="btn-inv" class="btn">Gear</button>
|
|
49
|
+
<button id="btn-menu" class="btn" style="animation: pulse 1600ms ease-in-out 0s infinite alternate;">Menu</button>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
</div>
|
|
53
|
+
</x-dc>
|
|
54
|
+
<script type="text/x-dc" data-dc-script data-props='{"hp":{"editor":"number","default":72},"ammo":{"editor":"text","default":"240"},"$preview":{"width":1280,"height":720}}'>
|
|
55
|
+
class Component extends DCLogic { renderVals(){ return { hp: this.props.hp, ammo: this.props.ammo }; } }
|
|
56
|
+
</script></body></html>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "XTFrame game UI",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"themes": {
|
|
5
|
+
"base": {
|
|
6
|
+
"bg": "#e6e2d6",
|
|
7
|
+
"panel": "#ece8dd",
|
|
8
|
+
"panelBorder": "#1f1c18",
|
|
9
|
+
"text": "#1f1c18",
|
|
10
|
+
"textDim": "#4a463f",
|
|
11
|
+
"accent": "#1f1c18",
|
|
12
|
+
"accentText": "#e6e2d6",
|
|
13
|
+
"success": "#3f6b43",
|
|
14
|
+
"danger": "#b3281e",
|
|
15
|
+
"warning": "#a0761f"
|
|
16
|
+
},
|
|
17
|
+
"dark": {
|
|
18
|
+
"bg": "#262320",
|
|
19
|
+
"panel": "#302c27",
|
|
20
|
+
"panelBorder": "#d9d3c4",
|
|
21
|
+
"text": "#d9d3c4",
|
|
22
|
+
"textDim": "#9a9386",
|
|
23
|
+
"accent": "#d9d3c4",
|
|
24
|
+
"accentText": "#262320",
|
|
25
|
+
"success": "#7fa877",
|
|
26
|
+
"danger": "#d7493b",
|
|
27
|
+
"warning": "#c9a24a"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"font": {
|
|
31
|
+
"family": "\"Noto Serif\", \"Georgia\", \"DejaVu Serif\", \"Times New Roman\"",
|
|
32
|
+
"displayFamily": "\"Noto Serif Display ExtraCondensed\", \"Noto Serif Display\", \"Georgia\", \"Times New Roman\"",
|
|
33
|
+
"label": { "size": 12, "weight": 700, "letterSpacing": 1, "transform": "uppercase" },
|
|
34
|
+
"body": { "size": 14, "weight": 400 },
|
|
35
|
+
"title": { "size": 22, "weight": 700 },
|
|
36
|
+
"display": { "size": 48, "weight": 700 }
|
|
37
|
+
},
|
|
38
|
+
"space": [4, 8, 12, 16, 20, 24, 32, 48],
|
|
39
|
+
"radius": { "chip": 0, "button": 0, "panel": 0, "tile": 0 },
|
|
40
|
+
"shadow": { "panel": "0 0 0 0 #00000000" },
|
|
41
|
+
"board": { "width": 1280, "height": 720 }
|
|
42
|
+
}
|