@miaskiewicz/turbo-dom 0.5.8 → 0.7.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/Cargo.lock +3227 -389
- package/Cargo.toml +53 -3
- package/README.md +193 -224
- package/package.json +5 -3
- package/pkg/package.json +1 -1
- package/pkg/turbo_dom_parser_bg.wasm +0 -0
- package/pkg-web/package.json +1 -1
- package/pkg-web/turbo_dom_parser_bg.wasm +0 -0
- package/src/core.rs +387 -44
- package/src/lib.rs +43 -10
- package/src/runtime/buffer.mjs +0 -1
- package/src/runtime/cascade.mjs +18 -24
- package/src/runtime/color.mjs +1 -1
- package/src/runtime/css-shorthand-table.mjs +238 -0
- package/src/runtime/css-shorthand.mjs +2803 -0
- package/src/runtime/cssom.mjs +3 -4
- package/src/runtime/custom-elements.mjs +398 -0
- package/src/runtime/dom.mjs +924 -238
- package/src/runtime/html-serialize.mjs +15 -7
- package/src/runtime/index.d.ts +100 -0
- package/src/runtime/index.mjs +5 -0
- package/src/runtime/parser.mjs +2 -4
- package/src/runtime/selectors.mjs +1080 -402
- package/src/runtime/stubs.mjs +1 -19
- package/src/runtime/window.mjs +15 -7
- package/src/spike.rs +26 -6
- package/turbo-dom-parser.darwin-arm64.node +0 -0
- package/turbo-dom-parser.linux-arm64-gnu.node +0 -0
- package/turbo-dom-parser.linux-x64-gnu.node +0 -0
- package/turbo-dom-parser.linux-x64-musl.node +0 -0
- package/turbo-dom-parser.win32-x64-msvc.node +0 -0
package/src/runtime/cascade.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Partial computed-style cascade — resolves getComputedStyle from injected <style>
|
|
2
|
-
// sheets (emotion/MUI `.css-HASH { … }`), inline styles, and specificity ordering
|
|
2
|
+
// sheets (emotion/MUI `.css-HASH { … }`), inline styles, and specificity ordering (Selectors 4
|
|
3
|
+
// specificity per rule item, selectors.mjs `specificity()`, then source order).
|
|
3
4
|
//
|
|
4
5
|
// PERF: every hot path (parse, querySelectorAll, getElementsBy*, matching, events)
|
|
5
6
|
// NEVER calls getComputedStyle — only test assertions do. So all work here is lazy,
|
|
@@ -14,12 +15,13 @@
|
|
|
14
15
|
// CSS custom-property resolution. Colors ARE canonicalized to rgb()/rgba() (color.mjs)
|
|
15
16
|
// and bare-0 lengths to `0px`, matching what a browser serializes.
|
|
16
17
|
|
|
17
|
-
import { matchesSelector } from './selectors.mjs';
|
|
18
|
+
import { compareSpecificity, matchesSelector, matchesSlotted, ruleSelectors, specificity } from './selectors.mjs';
|
|
18
19
|
import { COLOR_PROPS, canonicalizeColor } from './color.mjs';
|
|
19
20
|
|
|
20
21
|
const kebab = (s) => s.replace(/[A-Z]/g, (m) => '-' + m.toLowerCase());
|
|
21
22
|
|
|
22
|
-
// Longhand → shorthand fallback for single-token shorthands (
|
|
23
|
+
// Longhand → shorthand fallback for single-token shorthands of the computed map (the inline
|
|
24
|
+
// el.style itself expands shorthands since turbo-dom#90, css-shorthand.mjs).
|
|
23
25
|
const SHORTHAND_OF = {
|
|
24
26
|
'background-color': 'background',
|
|
25
27
|
'margin-top': 'margin', 'margin-right': 'margin', 'margin-bottom': 'margin', 'margin-left': 'margin',
|
|
@@ -75,14 +77,6 @@ function parseDecls(text, into) {
|
|
|
75
77
|
return map;
|
|
76
78
|
}
|
|
77
79
|
|
|
78
|
-
// rough WHATWG specificity: a*10000 + b*100 + c (ids, classes/attrs/pseudos, types)
|
|
79
|
-
function specificity(sel) {
|
|
80
|
-
const a = (sel.match(/#[\w-]+/g) || []).length;
|
|
81
|
-
const b = (sel.match(/\.[\w-]+|\[[^\]]*\]|:[\w-]+/g) || []).length;
|
|
82
|
-
const c = (sel.match(/(^|[\s>+~])[a-zA-Z][\w-]*/g) || []).length;
|
|
83
|
-
return a * 10000 + b * 100 + c;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
80
|
// Brace-depth scan: emit only depth-1 rules whose selector isn't an at-rule; the
|
|
87
81
|
// bodies of @media/@keyframes (nested braces) are skipped wholesale.
|
|
88
82
|
function parseStylesheet(css, startOrder, rules) {
|
|
@@ -105,9 +99,11 @@ function parseStylesheet(css, startOrder, rules) {
|
|
|
105
99
|
while (k < n && depth > 0) { const ch = css[k]; if (ch === '{') depth++; else if (ch === '}') depth--; k++; }
|
|
106
100
|
if (sel && sel[0] !== '@') {
|
|
107
101
|
const decls = parseDecls(css.slice(j + 1, k - 1));
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
102
|
+
// the prelude is a selector LIST split at top-level commas only (`:is(a, b)` stays
|
|
103
|
+
// whole); an invalid list drops the whole rule, as in a browser; each item carries its
|
|
104
|
+
// Selectors 4 specificity (mirrors rtdom::cascade::parse_stylesheet)
|
|
105
|
+
if (decls.size) for (const t of ruleSelectors(sel)) {
|
|
106
|
+
rules.push({ selector: t, decls, spec: specificity(t), order: order++ });
|
|
111
107
|
}
|
|
112
108
|
} else { order++; }
|
|
113
109
|
i = k;
|
|
@@ -148,8 +144,8 @@ const SLOTTED_RE = /::slotted\(([^)]*)\)/; // ::slotted(sel)
|
|
|
148
144
|
// Collect rules from one index that apply to `el` under a given `kind`:
|
|
149
145
|
// 'normal' — el matched against the selector (skips :host/::slotted rules)
|
|
150
146
|
// 'host' — el is a shadow host; match the inner of a :host[(sel)] rule
|
|
151
|
-
// 'slotted' — el is a slotted light node
|
|
152
|
-
function collectMatched(el, rules, kind, into) {
|
|
147
|
+
// 'slotted' — el is a slotted light node assigned to `slot`; match ::slotted() rules
|
|
148
|
+
function collectMatched(el, rules, kind, into, slot) {
|
|
153
149
|
for (let i = 0; i < rules.length; i++) {
|
|
154
150
|
const r = rules[i];
|
|
155
151
|
const sel = r.selector;
|
|
@@ -157,16 +153,14 @@ function collectMatched(el, rules, kind, into) {
|
|
|
157
153
|
const slotM = SLOTTED_RE.exec(sel);
|
|
158
154
|
if (kind === 'normal') {
|
|
159
155
|
if (hostM || slotM) continue; // shadow-only selectors never match plain elements
|
|
160
|
-
try { if (matchesSelector(el, sel)) into.push(r); } catch { /* unsupported → skip */ }
|
|
156
|
+
try { if (matchesSelector(el, sel, null)) into.push(r); } catch { /* unsupported → skip */ }
|
|
161
157
|
} else if (kind === 'host') {
|
|
162
158
|
if (!hostM) continue;
|
|
163
159
|
const inner = hostM[1];
|
|
164
160
|
if (inner === undefined) into.push(r);
|
|
165
|
-
else try { if (matchesSelector(el, inner.trim())) into.push(r); } catch { /* skip */ }
|
|
166
|
-
} else { // slotted
|
|
167
|
-
|
|
168
|
-
const inner = (slotM[1] || '*').trim() || '*';
|
|
169
|
-
try { if (matchesSelector(el, inner)) into.push(r); } catch { /* skip */ }
|
|
161
|
+
else try { if (matchesSelector(el, inner.trim(), null)) into.push(r); } catch { /* skip */ }
|
|
162
|
+
} else if (slotM && matchesSlotted(el, slot, sel)) { // slotted
|
|
163
|
+
into.push(r);
|
|
170
164
|
}
|
|
171
165
|
}
|
|
172
166
|
}
|
|
@@ -192,7 +186,7 @@ function flattenedParent(el) {
|
|
|
192
186
|
}
|
|
193
187
|
|
|
194
188
|
function applyMatched(matched, out) {
|
|
195
|
-
matched.sort((x, y) => x.spec
|
|
189
|
+
matched.sort((x, y) => compareSpecificity(x.spec, y.spec) || x.order - y.order);
|
|
196
190
|
for (const r of matched) for (const [k, val] of r.decls) out.set(k, val);
|
|
197
191
|
}
|
|
198
192
|
|
|
@@ -260,7 +254,7 @@ export function makeGetComputedStyle() {
|
|
|
260
254
|
if (el.__shadow) collectMatched(el, getIndex(el.__shadow, v), 'host', matched);
|
|
261
255
|
// slotted light node: overlay ::slotted rules from the slot's shadow root
|
|
262
256
|
const slot = el.assignedSlot;
|
|
263
|
-
if (slot) { const sr = slot.getRootNode(); if (sr.__isShadowRoot) collectMatched(el, getIndex(sr, v), 'slotted', matched); }
|
|
257
|
+
if (slot) { const sr = slot.getRootNode(); if (sr.__isShadowRoot) collectMatched(el, getIndex(sr, v), 'slotted', matched, slot); }
|
|
264
258
|
}
|
|
265
259
|
applyMatched(matched, map);
|
|
266
260
|
|
package/src/runtime/color.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// `toHaveStyle` compares the element's computed value against the expected value
|
|
4
4
|
// AS STRINGS, after each is run through the DOM's own normalization — so to match
|
|
5
5
|
// a browser (and jsdom) both getComputedStyle (cascade.mjs) and inline style
|
|
6
|
-
// read-back (dom.mjs
|
|
6
|
+
// read-back (dom.mjs makeStyle) must canonicalize. This module is the shared core.
|
|
7
7
|
//
|
|
8
8
|
// PERF: only ever called from getComputedStyle + el.style reads (test/app time),
|
|
9
9
|
// and only for properties in COLOR_PROPS. Parse/query/match/event hot paths never
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
// Chrome 156's CSSStyleDeclaration shorthand table and longhand aliases: the same data as turbo-dom's
|
|
2
|
+
// crates/turbo-dom/src/rtdom/css_shorthand/table.rs and block.rs LONGHAND_ALIASES, measured from Chrome
|
|
3
|
+
// 156 (crates/turbo-dom/tests/fixtures/css_shorthand_chrome156.json; test/css-shorthand-chrome.test.mjs
|
|
4
|
+
// checks both against it). Rows: [name, canonical, grammar, allowInitial, longhands].
|
|
5
|
+
export const SHORTHAND_TABLE = [
|
|
6
|
+
["-webkit-animation", "animation", "animation", false, ["animation-duration", "animation-timing-function", "animation-delay", "animation-iteration-count", "animation-direction", "animation-fill-mode", "animation-play-state", "animation-name", "animation-timeline", "animation-range-start", "animation-range-end"]],
|
|
7
|
+
["-webkit-border-after", "border-block-end", "border-block-end", true, ["border-block-end-width", "border-block-end-style", "border-block-end-color"]],
|
|
8
|
+
["-webkit-border-before", "border-block-start", "border-block-start", true, ["border-block-start-width", "border-block-start-style", "border-block-start-color"]],
|
|
9
|
+
["-webkit-border-end", "border-inline-end", "border-inline-end", true, ["border-inline-end-width", "border-inline-end-style", "border-inline-end-color"]],
|
|
10
|
+
["-webkit-border-radius", "border-radius", "-webkit-border-radius", false, ["border-top-left-radius", "border-top-right-radius", "border-bottom-right-radius", "border-bottom-left-radius"]],
|
|
11
|
+
["-webkit-border-start", "border-inline-start", "border-inline-start", true, ["border-inline-start-width", "border-inline-start-style", "border-inline-start-color"]],
|
|
12
|
+
["-webkit-column-rule", "column-rule", "column-rule", false, ["column-rule-width", "column-rule-style", "column-rule-color"]],
|
|
13
|
+
["-webkit-columns", "columns", "columns", false, ["column-width", "column-count", "column-height", "column-wrap"]],
|
|
14
|
+
["-webkit-flex", "flex", "flex", false, ["flex-grow", "flex-shrink", "flex-basis"]],
|
|
15
|
+
["-webkit-flex-flow", "flex-flow", "flex-flow", false, ["flex-direction", "flex-wrap"]],
|
|
16
|
+
["-webkit-mask", "mask", "mask", false, ["mask-image", "-webkit-mask-position-x", "-webkit-mask-position-y", "mask-size", "mask-repeat", "mask-origin", "mask-clip", "mask-composite", "mask-mode"]],
|
|
17
|
+
["-webkit-mask-box-image", "-webkit-mask-box-image", "-webkit-mask-box-image", true, ["-webkit-mask-box-image-source", "-webkit-mask-box-image-slice", "-webkit-mask-box-image-width", "-webkit-mask-box-image-outset", "-webkit-mask-box-image-repeat"]],
|
|
18
|
+
["-webkit-mask-position", "mask-position", "-webkit-mask-position", false, ["-webkit-mask-position-x", "-webkit-mask-position-y"]],
|
|
19
|
+
["-webkit-text-emphasis", "text-emphasis", "text-emphasis", true, ["text-emphasis-style", "text-emphasis-color"]],
|
|
20
|
+
["-webkit-text-stroke", "-webkit-text-stroke", "-webkit-text-stroke", true, ["-webkit-text-stroke-width", "-webkit-text-stroke-color"]],
|
|
21
|
+
["-webkit-transition", "transition", "transition", false, ["transition-property", "transition-duration", "transition-timing-function", "transition-delay", "transition-behavior"]],
|
|
22
|
+
["animation", "animation", "animation", false, ["animation-duration", "animation-timing-function", "animation-delay", "animation-iteration-count", "animation-direction", "animation-fill-mode", "animation-play-state", "animation-name", "animation-timeline", "animation-range-start", "animation-range-end"]],
|
|
23
|
+
["animation-range", "animation-range", "animation-range", false, ["animation-range-start", "animation-range-end"]],
|
|
24
|
+
["background", "background", "background", true, ["background-image", "background-position-x", "background-position-y", "background-size", "background-repeat", "background-attachment", "background-origin", "background-clip", "background-color"]],
|
|
25
|
+
["background-position", "background-position", "background-position", false, ["background-position-x", "background-position-y"]],
|
|
26
|
+
["border", "border", "border", false, ["border-top-color", "border-top-style", "border-top-width", "border-right-color", "border-right-style", "border-right-width", "border-bottom-color", "border-bottom-style", "border-bottom-width", "border-left-color", "border-left-style", "border-left-width", "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat"]],
|
|
27
|
+
["border-block", "border-block", "border-block", false, ["border-block-start-color", "border-block-start-style", "border-block-start-width", "border-block-end-color", "border-block-end-style", "border-block-end-width"]],
|
|
28
|
+
["border-block-color", "border-block-color", "border-block-color", false, ["border-block-start-color", "border-block-end-color"]],
|
|
29
|
+
["border-block-end", "border-block-end", "border-block-end", true, ["border-block-end-width", "border-block-end-style", "border-block-end-color"]],
|
|
30
|
+
["border-block-start", "border-block-start", "border-block-start", true, ["border-block-start-width", "border-block-start-style", "border-block-start-color"]],
|
|
31
|
+
["border-block-style", "border-block-style", "border-block-style", false, ["border-block-start-style", "border-block-end-style"]],
|
|
32
|
+
["border-block-width", "border-block-width", "border-block-width", false, ["border-block-start-width", "border-block-end-width"]],
|
|
33
|
+
["border-bottom", "border-bottom", "border-bottom", false, ["border-bottom-width", "border-bottom-style", "border-bottom-color"]],
|
|
34
|
+
["border-color", "border-color", "border-color", false, ["border-top-color", "border-right-color", "border-bottom-color", "border-left-color"]],
|
|
35
|
+
["border-image", "border-image", "border-image", false, ["border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat"]],
|
|
36
|
+
["border-inline", "border-inline", "border-inline", false, ["border-inline-start-color", "border-inline-start-style", "border-inline-start-width", "border-inline-end-color", "border-inline-end-style", "border-inline-end-width"]],
|
|
37
|
+
["border-inline-color", "border-inline-color", "border-inline-color", false, ["border-inline-start-color", "border-inline-end-color"]],
|
|
38
|
+
["border-inline-end", "border-inline-end", "border-inline-end", true, ["border-inline-end-width", "border-inline-end-style", "border-inline-end-color"]],
|
|
39
|
+
["border-inline-start", "border-inline-start", "border-inline-start", true, ["border-inline-start-width", "border-inline-start-style", "border-inline-start-color"]],
|
|
40
|
+
["border-inline-style", "border-inline-style", "border-inline-style", false, ["border-inline-start-style", "border-inline-end-style"]],
|
|
41
|
+
["border-inline-width", "border-inline-width", "border-inline-width", false, ["border-inline-start-width", "border-inline-end-width"]],
|
|
42
|
+
["border-left", "border-left", "border-left", false, ["border-left-width", "border-left-style", "border-left-color"]],
|
|
43
|
+
["border-radius", "border-radius", "border-radius", false, ["border-top-left-radius", "border-top-right-radius", "border-bottom-right-radius", "border-bottom-left-radius"]],
|
|
44
|
+
["border-right", "border-right", "border-right", false, ["border-right-width", "border-right-style", "border-right-color"]],
|
|
45
|
+
["border-spacing", "border-spacing", "border-spacing", false, ["-webkit-border-horizontal-spacing", "-webkit-border-vertical-spacing"]],
|
|
46
|
+
["border-style", "border-style", "border-style", false, ["border-top-style", "border-right-style", "border-bottom-style", "border-left-style"]],
|
|
47
|
+
["border-top", "border-top", "border-top", false, ["border-top-width", "border-top-style", "border-top-color"]],
|
|
48
|
+
["border-width", "border-width", "border-width", false, ["border-top-width", "border-right-width", "border-bottom-width", "border-left-width"]],
|
|
49
|
+
["column-rule", "column-rule", "column-rule", false, ["column-rule-width", "column-rule-style", "column-rule-color"]],
|
|
50
|
+
["column-rule-inset", "column-rule-inset", "column-rule-inset", false, ["column-rule-inset-cap-start", "column-rule-inset-cap-end", "column-rule-inset-junction-start", "column-rule-inset-junction-end"]],
|
|
51
|
+
["column-rule-inset-cap", "column-rule-inset-cap", "column-rule-inset-cap", false, ["column-rule-inset-cap-start", "column-rule-inset-cap-end"]],
|
|
52
|
+
["column-rule-inset-end", "column-rule-inset-end", "column-rule-inset-end", false, ["column-rule-inset-cap-end", "column-rule-inset-junction-end"]],
|
|
53
|
+
["column-rule-inset-junction", "column-rule-inset-junction", "column-rule-inset-junction", false, ["column-rule-inset-junction-start", "column-rule-inset-junction-end"]],
|
|
54
|
+
["column-rule-inset-start", "column-rule-inset-start", "column-rule-inset-start", false, ["column-rule-inset-cap-start", "column-rule-inset-junction-start"]],
|
|
55
|
+
["columns", "columns", "columns", false, ["column-width", "column-count", "column-height", "column-wrap"]],
|
|
56
|
+
["contain-intrinsic-size", "contain-intrinsic-size", "contain-intrinsic-size", false, ["contain-intrinsic-width", "contain-intrinsic-height"]],
|
|
57
|
+
["container", "container", "container", false, ["container-name", "container-type"]],
|
|
58
|
+
["corner-block-end-shape", "corner-block-end-shape", "corner-block-end-shape", false, ["corner-end-start-shape", "corner-end-end-shape"]],
|
|
59
|
+
["corner-block-start-shape", "corner-block-start-shape", "corner-block-start-shape", false, ["corner-start-start-shape", "corner-start-end-shape"]],
|
|
60
|
+
["corner-bottom-shape", "corner-bottom-shape", "corner-bottom-shape", false, ["corner-bottom-left-shape", "corner-bottom-right-shape"]],
|
|
61
|
+
["corner-inline-end-shape", "corner-inline-end-shape", "corner-inline-end-shape", false, ["corner-start-end-shape", "corner-end-end-shape"]],
|
|
62
|
+
["corner-inline-start-shape", "corner-inline-start-shape", "corner-inline-start-shape", false, ["corner-start-start-shape", "corner-end-start-shape"]],
|
|
63
|
+
["corner-left-shape", "corner-left-shape", "corner-left-shape", false, ["corner-top-left-shape", "corner-bottom-left-shape"]],
|
|
64
|
+
["corner-right-shape", "corner-right-shape", "corner-right-shape", false, ["corner-top-right-shape", "corner-bottom-right-shape"]],
|
|
65
|
+
["corner-shape", "corner-shape", "corner-shape", false, ["corner-top-left-shape", "corner-top-right-shape", "corner-bottom-right-shape", "corner-bottom-left-shape"]],
|
|
66
|
+
["corner-top-shape", "corner-top-shape", "corner-top-shape", false, ["corner-top-left-shape", "corner-top-right-shape"]],
|
|
67
|
+
["flex", "flex", "flex", false, ["flex-grow", "flex-shrink", "flex-basis"]],
|
|
68
|
+
["flex-flow", "flex-flow", "flex-flow", false, ["flex-direction", "flex-wrap"]],
|
|
69
|
+
["font", "font", "font", false, ["font-style", "font-variant-ligatures", "font-variant-caps", "font-variant-numeric", "font-variant-east-asian", "font-variant-alternates", "font-variant-position", "font-variant-emoji", "font-weight", "font-stretch", "font-size", "line-height", "font-family", "font-optical-sizing", "font-size-adjust", "font-kerning", "font-feature-settings", "font-variation-settings", "font-language-override"]],
|
|
70
|
+
["font-synthesis", "font-synthesis", "font-synthesis", false, ["font-synthesis-weight", "font-synthesis-style", "font-synthesis-small-caps"]],
|
|
71
|
+
["font-variant", "font-variant", "font-variant", false, ["font-variant-ligatures", "font-variant-caps", "font-variant-alternates", "font-variant-numeric", "font-variant-east-asian", "font-variant-position", "font-variant-emoji"]],
|
|
72
|
+
["gap", "gap", "gap", false, ["row-gap", "column-gap"]],
|
|
73
|
+
["grid", "grid", "grid", false, ["grid-template-rows", "grid-template-columns", "grid-template-areas", "grid-auto-flow", "grid-auto-rows", "grid-auto-columns"]],
|
|
74
|
+
["grid-area", "grid-area", "grid-area", false, ["grid-row-start", "grid-column-start", "grid-row-end", "grid-column-end"]],
|
|
75
|
+
["grid-column", "grid-column", "grid-column", false, ["grid-column-start", "grid-column-end"]],
|
|
76
|
+
["grid-gap", "gap", "gap", false, ["row-gap", "column-gap"]],
|
|
77
|
+
["grid-row", "grid-row", "grid-row", false, ["grid-row-start", "grid-row-end"]],
|
|
78
|
+
["grid-template", "grid-template", "grid-template", false, ["grid-template-rows", "grid-template-columns", "grid-template-areas"]],
|
|
79
|
+
["inset", "inset", "inset", false, ["top", "right", "bottom", "left"]],
|
|
80
|
+
["inset-block", "inset-block", "inset-block", false, ["inset-block-start", "inset-block-end"]],
|
|
81
|
+
["inset-inline", "inset-inline", "inset-inline", false, ["inset-inline-start", "inset-inline-end"]],
|
|
82
|
+
["interest-delay", "interest-delay", "interest-delay", false, ["interest-delay-start", "interest-delay-end"]],
|
|
83
|
+
["list-style", "list-style", "list-style", true, ["list-style-position", "list-style-image", "list-style-type"]],
|
|
84
|
+
["margin", "margin", "margin", false, ["margin-top", "margin-right", "margin-bottom", "margin-left"]],
|
|
85
|
+
["margin-block", "margin-block", "margin-block", false, ["margin-block-start", "margin-block-end"]],
|
|
86
|
+
["margin-inline", "margin-inline", "margin-inline", false, ["margin-inline-start", "margin-inline-end"]],
|
|
87
|
+
["marker", "marker", "marker", false, ["marker-start", "marker-mid", "marker-end"]],
|
|
88
|
+
["mask", "mask", "mask", false, ["mask-image", "-webkit-mask-position-x", "-webkit-mask-position-y", "mask-size", "mask-repeat", "mask-origin", "mask-clip", "mask-composite", "mask-mode"]],
|
|
89
|
+
["mask-position", "mask-position", "mask-position", false, ["-webkit-mask-position-x", "-webkit-mask-position-y"]],
|
|
90
|
+
["offset", "offset", "offset", false, ["offset-position", "offset-path", "offset-distance", "offset-rotate", "offset-anchor"]],
|
|
91
|
+
["outline", "outline", "outline", true, ["outline-color", "outline-style", "outline-width"]],
|
|
92
|
+
["overflow", "overflow", "overflow", false, ["overflow-x", "overflow-y"]],
|
|
93
|
+
["overscroll-behavior", "overscroll-behavior", "overscroll-behavior", false, ["overscroll-behavior-x", "overscroll-behavior-y"]],
|
|
94
|
+
["padding", "padding", "padding", false, ["padding-top", "padding-right", "padding-bottom", "padding-left"]],
|
|
95
|
+
["padding-block", "padding-block", "padding-block", false, ["padding-block-start", "padding-block-end"]],
|
|
96
|
+
["padding-inline", "padding-inline", "padding-inline", false, ["padding-inline-start", "padding-inline-end"]],
|
|
97
|
+
["place-content", "place-content", "place-content", false, ["align-content", "justify-content"]],
|
|
98
|
+
["place-items", "place-items", "place-items", false, ["align-items", "justify-items"]],
|
|
99
|
+
["place-self", "place-self", "place-self", false, ["align-self", "justify-self"]],
|
|
100
|
+
["position-try", "position-try", "position-try", false, ["position-try-order", "position-try-fallbacks"]],
|
|
101
|
+
["row-rule", "row-rule", "row-rule", false, ["row-rule-width", "row-rule-style", "row-rule-color"]],
|
|
102
|
+
["row-rule-inset", "row-rule-inset", "row-rule-inset", false, ["row-rule-inset-cap-start", "row-rule-inset-cap-end", "row-rule-inset-junction-start", "row-rule-inset-junction-end"]],
|
|
103
|
+
["row-rule-inset-cap", "row-rule-inset-cap", "row-rule-inset-cap", false, ["row-rule-inset-cap-start", "row-rule-inset-cap-end"]],
|
|
104
|
+
["row-rule-inset-end", "row-rule-inset-end", "row-rule-inset-end", false, ["row-rule-inset-cap-end", "row-rule-inset-junction-end"]],
|
|
105
|
+
["row-rule-inset-junction", "row-rule-inset-junction", "row-rule-inset-junction", false, ["row-rule-inset-junction-start", "row-rule-inset-junction-end"]],
|
|
106
|
+
["row-rule-inset-start", "row-rule-inset-start", "row-rule-inset-start", false, ["row-rule-inset-cap-start", "row-rule-inset-junction-start"]],
|
|
107
|
+
["rule", "rule", "rule", false, ["column-rule-width", "column-rule-style", "column-rule-color", "row-rule-width", "row-rule-style", "row-rule-color"]],
|
|
108
|
+
["rule-break", "rule-break", "rule-break", false, ["row-rule-break", "column-rule-break"]],
|
|
109
|
+
["rule-color", "rule-color", "rule-color", false, ["column-rule-color", "row-rule-color"]],
|
|
110
|
+
["rule-inset", "rule-inset", "rule-inset", false, ["row-rule-inset-cap-start", "row-rule-inset-cap-end", "row-rule-inset-junction-start", "row-rule-inset-junction-end", "column-rule-inset-cap-start", "column-rule-inset-cap-end", "column-rule-inset-junction-start", "column-rule-inset-junction-end"]],
|
|
111
|
+
["rule-inset-cap", "rule-inset-cap", "rule-inset-cap", false, ["row-rule-inset-cap-start", "row-rule-inset-cap-end", "column-rule-inset-cap-start", "column-rule-inset-cap-end"]],
|
|
112
|
+
["rule-inset-end", "rule-inset-end", "rule-inset-end", false, ["column-rule-inset-cap-end", "column-rule-inset-junction-end", "row-rule-inset-cap-end", "row-rule-inset-junction-end"]],
|
|
113
|
+
["rule-inset-junction", "rule-inset-junction", "rule-inset-junction", false, ["row-rule-inset-junction-start", "row-rule-inset-junction-end", "column-rule-inset-junction-start", "column-rule-inset-junction-end"]],
|
|
114
|
+
["rule-inset-start", "rule-inset-start", "rule-inset-start", false, ["column-rule-inset-cap-start", "column-rule-inset-junction-start", "row-rule-inset-cap-start", "row-rule-inset-junction-start"]],
|
|
115
|
+
["rule-style", "rule-style", "rule-style", false, ["column-rule-style", "row-rule-style"]],
|
|
116
|
+
["rule-visibility-items", "rule-visibility-items", "rule-visibility-items", false, ["column-rule-visibility-items", "row-rule-visibility-items"]],
|
|
117
|
+
["rule-width", "rule-width", "rule-width", false, ["column-rule-width", "row-rule-width"]],
|
|
118
|
+
["scroll-margin", "scroll-margin", "scroll-margin", false, ["scroll-margin-top", "scroll-margin-right", "scroll-margin-bottom", "scroll-margin-left"]],
|
|
119
|
+
["scroll-margin-block", "scroll-margin-block", "scroll-margin-block", false, ["scroll-margin-block-start", "scroll-margin-block-end"]],
|
|
120
|
+
["scroll-margin-inline", "scroll-margin-inline", "scroll-margin-inline", false, ["scroll-margin-inline-start", "scroll-margin-inline-end"]],
|
|
121
|
+
["scroll-padding", "scroll-padding", "scroll-padding", false, ["scroll-padding-top", "scroll-padding-right", "scroll-padding-bottom", "scroll-padding-left"]],
|
|
122
|
+
["scroll-padding-block", "scroll-padding-block", "scroll-padding-block", false, ["scroll-padding-block-start", "scroll-padding-block-end"]],
|
|
123
|
+
["scroll-padding-inline", "scroll-padding-inline", "scroll-padding-inline", false, ["scroll-padding-inline-start", "scroll-padding-inline-end"]],
|
|
124
|
+
["scroll-timeline", "scroll-timeline", "scroll-timeline", false, ["scroll-timeline-name", "scroll-timeline-axis"]],
|
|
125
|
+
["text-box", "text-box", "text-box", false, ["text-box-trim", "text-box-edge"]],
|
|
126
|
+
["text-decoration", "text-decoration", "text-decoration", true, ["text-decoration-line", "text-decoration-thickness", "text-decoration-style", "text-decoration-color"]],
|
|
127
|
+
["text-emphasis", "text-emphasis", "text-emphasis", true, ["text-emphasis-style", "text-emphasis-color"]],
|
|
128
|
+
["text-wrap", "text-wrap", "text-wrap", true, ["text-wrap-mode", "text-wrap-style"]],
|
|
129
|
+
["timeline-trigger", "timeline-trigger", "timeline-trigger", false, ["timeline-trigger-name", "timeline-trigger-source", "timeline-trigger-activation-range-start", "timeline-trigger-activation-range-end", "timeline-trigger-active-range-start", "timeline-trigger-active-range-end"]],
|
|
130
|
+
["timeline-trigger-activation-range", "timeline-trigger-activation-range", "timeline-trigger-activation-range", false, ["timeline-trigger-activation-range-start", "timeline-trigger-activation-range-end"]],
|
|
131
|
+
["timeline-trigger-active-range", "timeline-trigger-active-range", "timeline-trigger-active-range", false, ["timeline-trigger-active-range-start", "timeline-trigger-active-range-end"]],
|
|
132
|
+
["transition", "transition", "transition", false, ["transition-property", "transition-duration", "transition-timing-function", "transition-delay", "transition-behavior"]],
|
|
133
|
+
["view-timeline", "view-timeline", "view-timeline", false, ["view-timeline-name", "view-timeline-axis", "view-timeline-inset"]],
|
|
134
|
+
["white-space", "white-space", "white-space", true, ["white-space-collapse", "text-wrap-mode"]],
|
|
135
|
+
];
|
|
136
|
+
export const LONGHAND_ALIASES = [
|
|
137
|
+
["-webkit-align-content", "align-content"],
|
|
138
|
+
["-webkit-align-items", "align-items"],
|
|
139
|
+
["-webkit-align-self", "align-self"],
|
|
140
|
+
["-webkit-animation-delay", "animation-delay"],
|
|
141
|
+
["-webkit-animation-direction", "animation-direction"],
|
|
142
|
+
["-webkit-animation-duration", "animation-duration"],
|
|
143
|
+
["-webkit-animation-fill-mode", "animation-fill-mode"],
|
|
144
|
+
["-webkit-animation-iteration-count", "animation-iteration-count"],
|
|
145
|
+
["-webkit-animation-name", "animation-name"],
|
|
146
|
+
["-webkit-animation-play-state", "animation-play-state"],
|
|
147
|
+
["-webkit-animation-timing-function", "animation-timing-function"],
|
|
148
|
+
["-webkit-app-region", "app-region"],
|
|
149
|
+
["-webkit-appearance", "appearance"],
|
|
150
|
+
["-webkit-backface-visibility", "backface-visibility"],
|
|
151
|
+
["-webkit-background-clip", "background-clip"],
|
|
152
|
+
["-webkit-background-origin", "background-origin"],
|
|
153
|
+
["-webkit-background-size", "background-size"],
|
|
154
|
+
["-webkit-border-after-color", "border-block-end-color"],
|
|
155
|
+
["-webkit-border-after-style", "border-block-end-style"],
|
|
156
|
+
["-webkit-border-after-width", "border-block-end-width"],
|
|
157
|
+
["-webkit-border-before-color", "border-block-start-color"],
|
|
158
|
+
["-webkit-border-before-style", "border-block-start-style"],
|
|
159
|
+
["-webkit-border-before-width", "border-block-start-width"],
|
|
160
|
+
["-webkit-border-bottom-left-radius", "border-bottom-left-radius"],
|
|
161
|
+
["-webkit-border-bottom-right-radius", "border-bottom-right-radius"],
|
|
162
|
+
["-webkit-border-end-color", "border-inline-end-color"],
|
|
163
|
+
["-webkit-border-end-style", "border-inline-end-style"],
|
|
164
|
+
["-webkit-border-end-width", "border-inline-end-width"],
|
|
165
|
+
["-webkit-border-start-color", "border-inline-start-color"],
|
|
166
|
+
["-webkit-border-start-style", "border-inline-start-style"],
|
|
167
|
+
["-webkit-border-start-width", "border-inline-start-width"],
|
|
168
|
+
["-webkit-border-top-left-radius", "border-top-left-radius"],
|
|
169
|
+
["-webkit-border-top-right-radius", "border-top-right-radius"],
|
|
170
|
+
["-webkit-box-shadow", "box-shadow"],
|
|
171
|
+
["-webkit-box-sizing", "box-sizing"],
|
|
172
|
+
["-webkit-clip-path", "clip-path"],
|
|
173
|
+
["-webkit-column-break-after", "break-after"],
|
|
174
|
+
["-webkit-column-break-before", "break-before"],
|
|
175
|
+
["-webkit-column-break-inside", "break-inside"],
|
|
176
|
+
["-webkit-column-count", "column-count"],
|
|
177
|
+
["-webkit-column-gap", "column-gap"],
|
|
178
|
+
["-webkit-column-rule-color", "column-rule-color"],
|
|
179
|
+
["-webkit-column-rule-style", "column-rule-style"],
|
|
180
|
+
["-webkit-column-rule-width", "column-rule-width"],
|
|
181
|
+
["-webkit-column-span", "column-span"],
|
|
182
|
+
["-webkit-column-width", "column-width"],
|
|
183
|
+
["-webkit-filter", "filter"],
|
|
184
|
+
["-webkit-flex-basis", "flex-basis"],
|
|
185
|
+
["-webkit-flex-direction", "flex-direction"],
|
|
186
|
+
["-webkit-flex-grow", "flex-grow"],
|
|
187
|
+
["-webkit-flex-shrink", "flex-shrink"],
|
|
188
|
+
["-webkit-flex-wrap", "flex-wrap"],
|
|
189
|
+
["-webkit-font-feature-settings", "font-feature-settings"],
|
|
190
|
+
["-webkit-hyphenate-character", "hyphenate-character"],
|
|
191
|
+
["-webkit-justify-content", "justify-content"],
|
|
192
|
+
["-webkit-logical-height", "block-size"],
|
|
193
|
+
["-webkit-logical-width", "inline-size"],
|
|
194
|
+
["-webkit-margin-after", "margin-block-end"],
|
|
195
|
+
["-webkit-margin-before", "margin-block-start"],
|
|
196
|
+
["-webkit-margin-end", "margin-inline-end"],
|
|
197
|
+
["-webkit-margin-start", "margin-inline-start"],
|
|
198
|
+
["-webkit-mask-clip", "mask-clip"],
|
|
199
|
+
["-webkit-mask-composite", "mask-composite"],
|
|
200
|
+
["-webkit-mask-image", "mask-image"],
|
|
201
|
+
["-webkit-mask-origin", "mask-origin"],
|
|
202
|
+
["-webkit-mask-repeat", "mask-repeat"],
|
|
203
|
+
["-webkit-mask-size", "mask-size"],
|
|
204
|
+
["-webkit-max-logical-height", "max-block-size"],
|
|
205
|
+
["-webkit-max-logical-width", "max-inline-size"],
|
|
206
|
+
["-webkit-min-logical-height", "min-block-size"],
|
|
207
|
+
["-webkit-min-logical-width", "min-inline-size"],
|
|
208
|
+
["-webkit-opacity", "opacity"],
|
|
209
|
+
["-webkit-order", "order"],
|
|
210
|
+
["-webkit-padding-after", "padding-block-end"],
|
|
211
|
+
["-webkit-padding-before", "padding-block-start"],
|
|
212
|
+
["-webkit-padding-end", "padding-inline-end"],
|
|
213
|
+
["-webkit-padding-start", "padding-inline-start"],
|
|
214
|
+
["-webkit-perspective", "perspective"],
|
|
215
|
+
["-webkit-perspective-origin", "perspective-origin"],
|
|
216
|
+
["-webkit-print-color-adjust", "print-color-adjust"],
|
|
217
|
+
["-webkit-shape-image-threshold", "shape-image-threshold"],
|
|
218
|
+
["-webkit-shape-margin", "shape-margin"],
|
|
219
|
+
["-webkit-shape-outside", "shape-outside"],
|
|
220
|
+
["-webkit-text-emphasis-color", "text-emphasis-color"],
|
|
221
|
+
["-webkit-text-emphasis-position", "text-emphasis-position"],
|
|
222
|
+
["-webkit-text-emphasis-style", "text-emphasis-style"],
|
|
223
|
+
["-webkit-text-size-adjust", "text-size-adjust"],
|
|
224
|
+
["-webkit-transform", "transform"],
|
|
225
|
+
["-webkit-transform-origin", "transform-origin"],
|
|
226
|
+
["-webkit-transform-style", "transform-style"],
|
|
227
|
+
["-webkit-transition-delay", "transition-delay"],
|
|
228
|
+
["-webkit-transition-duration", "transition-duration"],
|
|
229
|
+
["-webkit-transition-property", "transition-property"],
|
|
230
|
+
["-webkit-transition-timing-function", "transition-timing-function"],
|
|
231
|
+
["-webkit-user-select", "user-select"],
|
|
232
|
+
["grid-column-gap", "column-gap"],
|
|
233
|
+
["grid-row-gap", "row-gap"],
|
|
234
|
+
["page-break-after", "break-after"],
|
|
235
|
+
["page-break-before", "break-before"],
|
|
236
|
+
["page-break-inside", "break-inside"],
|
|
237
|
+
["word-wrap", "overflow-wrap"],
|
|
238
|
+
];
|