safari-devtools-mcp 1.8.0 → 1.8.1
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 +1 -6
- package/build/src/tools/webkit-compat.d.ts +4 -5
- package/build/src/tools/webkit-compat.d.ts.map +1 -1
- package/build/src/tools/webkit-compat.js +132 -185
- package/build/src/tools/webkit-compat.js.map +1 -1
- package/build/src/version.d.ts +1 -1
- package/build/src/version.js +1 -1
- package/package.json +1 -1
- package/skills/safari-specific-debugging/SKILL.md +18 -7
package/README.md
CHANGED
|
@@ -293,12 +293,7 @@ The server exposes guided debugging workflows as MCP prompts. Clients that suppo
|
|
|
293
293
|
| `inspect_viewport_meta` | Parse the viewport meta tag and validate against iOS best practices (width, zoom, viewport-fit) |
|
|
294
294
|
| `get_safe_area_insets` | Read CSS safe-area-inset values and check whether the page handles notched devices correctly |
|
|
295
295
|
| `check_ios_web_app_readiness` | Audit the page for Add to Home Screen / PWA readiness (apple-touch-icon, manifest, splash screens, status bar) |
|
|
296
|
-
|
|
297
|
-
### WebKit CSS compatibility
|
|
298
|
-
|
|
299
|
-
| Tool | Description |
|
|
300
|
-
| ---------------------------- | -------------------------------------------------------------------------------------------------------------- |
|
|
301
|
-
| `check_webkit_compatibility` | Scan stylesheets for Safari CSS issues — missing -webkit- prefixes, known WebKit quirks, and deprecated syntax |
|
|
296
|
+
| `check_webkit_compatibility` | Check page CSS against the live Safari session via CSS.supports() |
|
|
302
297
|
|
|
303
298
|
## Architecture
|
|
304
299
|
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WebKit CSS compatibility checker.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* - Properties with different behavior in WebKit vs other engines
|
|
4
|
+
* Runs inside a live Safari WebDriver session. Extracts CSS from the page
|
|
5
|
+
* using structured DOM APIs (rule.style iteration — no regex, no false
|
|
6
|
+
* positives on custom properties), then runs CSS.supports() in the actual
|
|
7
|
+
* browser to report what is genuinely broken right now.
|
|
9
8
|
*/
|
|
10
9
|
export declare const tools: import("./types.js").ToolDef<import("zod").ZodRawShape>[];
|
|
11
10
|
//# sourceMappingURL=webkit-compat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webkit-compat.d.ts","sourceRoot":"","sources":["../../../src/tools/webkit-compat.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"webkit-compat.d.ts","sourceRoot":"","sources":["../../../src/tools/webkit-compat.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAuBH,eAAO,MAAM,KAAK,2DAkKjB,CAAC"}
|
|
@@ -1,217 +1,164 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WebKit CSS compatibility checker.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* - Properties with different behavior in WebKit vs other engines
|
|
4
|
+
* Runs inside a live Safari WebDriver session. Extracts CSS from the page
|
|
5
|
+
* using structured DOM APIs (rule.style iteration — no regex, no false
|
|
6
|
+
* positives on custom properties), then runs CSS.supports() in the actual
|
|
7
|
+
* browser to report what is genuinely broken right now.
|
|
9
8
|
*/
|
|
10
9
|
import { defineTool } from './types.js';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
'text-stroke': 'Non-standard. Use -webkit-text-stroke (Safari-only feature).',
|
|
18
|
-
'background-clip: text': 'Safari requires -webkit-background-clip: text for text clipping.',
|
|
19
|
-
'touch-callout': 'iOS-only. Use -webkit-touch-callout: none to disable long-press popups.',
|
|
20
|
-
'overflow-scrolling': 'Use -webkit-overflow-scrolling: touch for momentum scrolling on iOS <15.',
|
|
21
|
-
};
|
|
22
|
-
// Known WebKit CSS bugs and quirks
|
|
23
|
-
const KNOWN_QUIRKS = [
|
|
24
|
-
{
|
|
25
|
-
pattern: 'gap',
|
|
26
|
-
message: 'Flexbox "gap" is unsupported in Safari <14.1. Use margin-based spacing as fallback.',
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
pattern: 'position:\\s*sticky',
|
|
30
|
-
message: 'position:sticky inside overflow:hidden parents is broken in Safari. The sticky element will not stick.',
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
pattern: 'aspect-ratio',
|
|
34
|
-
message: 'aspect-ratio is unsupported in Safari <15. Use the padding-bottom hack as fallback.',
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
pattern: ':has\\(',
|
|
38
|
-
message: ':has() is supported in Safari 15.4+ but has performance edge cases with large DOM trees.',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
pattern: 'container-type|@container',
|
|
42
|
-
message: 'Container queries require Safari 16+. No support in older iOS versions still in use.',
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
pattern: 'color-mix\\(',
|
|
46
|
-
message: 'color-mix() requires Safari 16.2+.',
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
pattern: '@layer',
|
|
50
|
-
message: '@layer (cascade layers) requires Safari 15.4+.',
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
pattern: 'subgrid',
|
|
54
|
-
message: 'subgrid requires Safari 16+.',
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
pattern: ':focus-visible',
|
|
58
|
-
message: ':focus-visible requires Safari 15.4+. Older versions need :focus fallback.',
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
pattern: 'overscroll-behavior',
|
|
62
|
-
message: 'overscroll-behavior requires Safari 16+. No effect on older iOS.',
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
pattern: 'dvh|svh|lvh',
|
|
66
|
-
message: 'Dynamic viewport units (dvh/svh/lvh) require Safari 15.4+. Use vh with JS fallback for older iOS.',
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
pattern: 'content-visibility',
|
|
70
|
-
message: 'content-visibility requires Safari 18+. Not supported in most iOS versions in the wild.',
|
|
71
|
-
},
|
|
72
|
-
];
|
|
73
|
-
// Deprecated -webkit- prefixes that can be removed
|
|
74
|
-
const DEPRECATED_PREFIXES = [
|
|
75
|
-
{
|
|
76
|
-
prefix: '-webkit-border-radius',
|
|
77
|
-
standard: 'border-radius',
|
|
78
|
-
message: 'Unprefixed since Safari 5. Remove -webkit- prefix.',
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
prefix: '-webkit-box-shadow',
|
|
82
|
-
standard: 'box-shadow',
|
|
83
|
-
message: 'Unprefixed since Safari 5.1. Remove -webkit- prefix.',
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
prefix: '-webkit-transform',
|
|
87
|
-
standard: 'transform',
|
|
88
|
-
message: 'Unprefixed since Safari 9. Remove -webkit- prefix.',
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
prefix: '-webkit-transition',
|
|
92
|
-
standard: 'transition',
|
|
93
|
-
message: 'Unprefixed since Safari 9. Remove -webkit- prefix.',
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
prefix: '-webkit-animation',
|
|
97
|
-
standard: 'animation',
|
|
98
|
-
message: 'Unprefixed since Safari 9. Remove -webkit- prefix.',
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
prefix: '-webkit-flex',
|
|
102
|
-
standard: 'flex',
|
|
103
|
-
message: 'Unprefixed since Safari 9. Remove -webkit-flex and -webkit-box-flex.',
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
prefix: '-webkit-appearance',
|
|
107
|
-
standard: 'appearance',
|
|
108
|
-
message: 'Unprefixed since Safari 15.4. Keep prefix only if supporting older iOS.',
|
|
109
|
-
},
|
|
10
|
+
/**
|
|
11
|
+
* Behavioral quirks that CSS.supports() cannot detect — the property IS
|
|
12
|
+
* "supported", it just renders incorrectly. Keep this list small, precise,
|
|
13
|
+
* and each entry must be a confirmed Safari rendering bug.
|
|
14
|
+
*/
|
|
15
|
+
const BEHAVIORAL_QUIRKS = [
|
|
110
16
|
{
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
message: '
|
|
17
|
+
property: 'position',
|
|
18
|
+
matchValue: 'sticky',
|
|
19
|
+
message: 'position:sticky silently fails inside an overflow:hidden or overflow:auto ' +
|
|
20
|
+
'ancestor in Safari. Use overflow:clip on the ancestor instead.',
|
|
114
21
|
},
|
|
115
22
|
];
|
|
116
23
|
export const tools = [
|
|
117
24
|
defineTool({
|
|
118
25
|
name: 'check_webkit_compatibility',
|
|
119
|
-
description: '
|
|
120
|
-
'
|
|
121
|
-
'
|
|
122
|
-
'
|
|
123
|
-
slimDescription: '
|
|
26
|
+
description: 'Check CSS on the current page against the live Safari session. ' +
|
|
27
|
+
'Extracts every CSS property via structured DOM APIs, runs CSS.supports() ' +
|
|
28
|
+
'in the actual browser, and reports what is broken right now — unsupported ' +
|
|
29
|
+
'properties, missing -webkit- prefixes, and known Safari rendering quirks.',
|
|
30
|
+
slimDescription: 'Check CSS against live Safari via CSS.supports().',
|
|
124
31
|
schema: {},
|
|
125
32
|
handler: async (_params, driver) => {
|
|
126
|
-
//
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
33
|
+
// -----------------------------------------------------------------
|
|
34
|
+
// Step 1: Extract structured CSS from the page + run CSS.supports()
|
|
35
|
+
// in one round-trip. Uses rule.style iteration for canonical property
|
|
36
|
+
// names — custom properties (--*) are excluded automatically.
|
|
37
|
+
// -----------------------------------------------------------------
|
|
38
|
+
const results = await driver.runScript(`(() => {
|
|
39
|
+
// Collect unique property:value pairs from all accessible stylesheets
|
|
40
|
+
const seen = new Map();
|
|
41
|
+
|
|
42
|
+
function collectFromStyle(style) {
|
|
43
|
+
for (const prop of style) {
|
|
44
|
+
if (prop.startsWith('--')) continue;
|
|
45
|
+
if (seen.has(prop)) continue;
|
|
46
|
+
seen.set(prop, style.getPropertyValue(prop).trim());
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function processRules(rules) {
|
|
51
|
+
for (const rule of rules) {
|
|
52
|
+
// Skip @font-face — its descriptors (src, font-display, unicode-range)
|
|
53
|
+
// are not CSS properties and CSS.supports() always returns false for them
|
|
54
|
+
if (rule.constructor?.name === 'CSSFontFaceRule') continue;
|
|
55
|
+
if (rule.style) collectFromStyle(rule.style);
|
|
56
|
+
if (rule.cssRules) {
|
|
57
|
+
try { processRules(rule.cssRules); } catch {}
|
|
133
58
|
}
|
|
134
|
-
}
|
|
59
|
+
}
|
|
135
60
|
}
|
|
136
|
-
|
|
61
|
+
|
|
62
|
+
for (const sheet of document.styleSheets) {
|
|
63
|
+
try { processRules(sheet.cssRules); } catch {}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Inline styles
|
|
137
67
|
for (const el of document.querySelectorAll('[style]')) {
|
|
138
|
-
|
|
68
|
+
collectFromStyle(el.style);
|
|
139
69
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
70
|
+
|
|
71
|
+
const totalProperties = seen.size;
|
|
72
|
+
const unsupported = [];
|
|
73
|
+
const needsPrefix = [];
|
|
74
|
+
|
|
75
|
+
for (const [prop, value] of seen) {
|
|
76
|
+
let supported = false;
|
|
77
|
+
try { supported = CSS.supports(prop, value); } catch {}
|
|
78
|
+
|
|
79
|
+
if (!supported) {
|
|
80
|
+
// Try again with a generic value — the extracted value might be
|
|
81
|
+
// a computed/resolved form CSS.supports doesn't accept
|
|
82
|
+
try { supported = CSS.supports(prop, 'initial'); } catch {}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (supported) continue;
|
|
86
|
+
|
|
87
|
+
// Not supported unprefixed — check if -webkit- variant works
|
|
88
|
+
const webkitProp = '-webkit-' + prop;
|
|
89
|
+
let webkitSupported = false;
|
|
90
|
+
try { webkitSupported = CSS.supports(webkitProp, value); } catch {}
|
|
91
|
+
if (!webkitSupported) {
|
|
92
|
+
try { webkitSupported = CSS.supports(webkitProp, 'initial'); } catch {}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (webkitSupported) {
|
|
96
|
+
needsPrefix.push({ property: prop, value });
|
|
97
|
+
} else {
|
|
98
|
+
unsupported.push({ property: prop, value });
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Collect a subset of computed properties for behavioral quirk checks
|
|
103
|
+
const body = document.body;
|
|
104
|
+
const computedProperties = {};
|
|
105
|
+
if (body) {
|
|
106
|
+
const quirkProps = ${JSON.stringify(BEHAVIORAL_QUIRKS.map(q => q.property))};
|
|
107
|
+
for (const prop of quirkProps) {
|
|
108
|
+
if (seen.has(prop)) {
|
|
109
|
+
computedProperties[prop] = seen.get(prop);
|
|
177
110
|
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return { totalProperties, unsupported, needsPrefix, computedProperties };
|
|
115
|
+
})()`);
|
|
116
|
+
// -----------------------------------------------------------------
|
|
117
|
+
// Step 2: Check behavioral quirks
|
|
118
|
+
// -----------------------------------------------------------------
|
|
119
|
+
const quirks = [];
|
|
120
|
+
for (const quirk of BEHAVIORAL_QUIRKS) {
|
|
121
|
+
const value = results.computedProperties[quirk.property];
|
|
122
|
+
if (value === undefined)
|
|
123
|
+
continue;
|
|
124
|
+
if (quirk.matchValue && !value.includes(quirk.matchValue))
|
|
125
|
+
continue;
|
|
126
|
+
quirks.push(quirk.message);
|
|
187
127
|
}
|
|
188
|
-
//
|
|
128
|
+
// -----------------------------------------------------------------
|
|
129
|
+
// Step 3: Format output
|
|
130
|
+
// -----------------------------------------------------------------
|
|
131
|
+
const total = results.unsupported.length + results.needsPrefix.length + quirks.length;
|
|
189
132
|
const lines = [];
|
|
190
|
-
if (
|
|
191
|
-
lines.push(
|
|
133
|
+
if (total === 0) {
|
|
134
|
+
lines.push(`✅ No issues found. ${results.totalProperties} CSS properties checked via CSS.supports() in this Safari session.`);
|
|
192
135
|
}
|
|
193
136
|
else {
|
|
194
|
-
|
|
195
|
-
const infos = findings.filter(f => f.severity === 'info');
|
|
196
|
-
lines.push(`Found ${findings.length} issue(s) across accessible stylesheets:`);
|
|
137
|
+
lines.push(`Found ${total} issue(s) — ${results.totalProperties} properties checked via CSS.supports() in this Safari session.`);
|
|
197
138
|
lines.push('');
|
|
198
|
-
if (
|
|
199
|
-
lines.push(
|
|
200
|
-
for (const
|
|
201
|
-
|
|
139
|
+
if (results.unsupported.length > 0) {
|
|
140
|
+
lines.push(`❌ Unsupported in this Safari (${results.unsupported.length}):`);
|
|
141
|
+
for (const { property, value } of results.unsupported) {
|
|
142
|
+
const preview = value.length > 60 ? value.slice(0, 57) + '...' : value;
|
|
143
|
+
lines.push(` ${property}: ${preview}`);
|
|
144
|
+
}
|
|
145
|
+
lines.push('');
|
|
146
|
+
}
|
|
147
|
+
if (results.needsPrefix.length > 0) {
|
|
148
|
+
lines.push(`⚠ Needs -webkit- prefix (${results.needsPrefix.length}):`);
|
|
149
|
+
for (const { property } of results.needsPrefix) {
|
|
150
|
+
lines.push(` ${property} → use -webkit-${property} alongside it`);
|
|
202
151
|
}
|
|
203
152
|
lines.push('');
|
|
204
153
|
}
|
|
205
|
-
if (
|
|
206
|
-
lines.push(`ℹ
|
|
207
|
-
for (const
|
|
208
|
-
lines.push(`
|
|
154
|
+
if (quirks.length > 0) {
|
|
155
|
+
lines.push(`ℹ Known Safari rendering quirks (${quirks.length}):`);
|
|
156
|
+
for (const msg of quirks) {
|
|
157
|
+
lines.push(` ${msg}`);
|
|
209
158
|
}
|
|
210
159
|
}
|
|
211
160
|
}
|
|
212
|
-
return {
|
|
213
|
-
content: [{ type: 'text', text: lines.join('\n') }],
|
|
214
|
-
};
|
|
161
|
+
return { content: [{ type: 'text', text: lines.join('\n') }] };
|
|
215
162
|
},
|
|
216
163
|
}),
|
|
217
164
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webkit-compat.js","sourceRoot":"","sources":["../../../src/tools/webkit-compat.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"webkit-compat.js","sourceRoot":"","sources":["../../../src/tools/webkit-compat.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;AAEtC;;;;GAIG;AACH,MAAM,iBAAiB,GAIjB;IACJ;QACE,QAAQ,EAAE,UAAU;QACpB,UAAU,EAAE,QAAQ;QACpB,OAAO,EACL,4EAA4E;YAC5E,gEAAgE;KACnE;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,UAAU,CAAC;QACT,IAAI,EAAE,4BAA4B;QAClC,WAAW,EACT,iEAAiE;YACjE,2EAA2E;YAC3E,4EAA4E;YAC5E,2EAA2E;QAC7E,eAAe,EAAE,mDAAmD;QACpE,MAAM,EAAE,EAAE;QAEV,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;YACjC,oEAAoE;YACpE,oEAAoE;YACpE,sE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O,EAAE,CAAC,EAAC,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAC,CAAC,EAAC,CAAC;QACtE,CAAC;KACF,CAAC;CACH,CAAC"}
|
package/build/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.8.
|
|
1
|
+
export declare const VERSION = "1.8.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/build/src/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "safari-devtools-mcp",
|
|
3
3
|
"mcpName": "io.github.HayoDev/safari-devtools-mcp",
|
|
4
|
-
"version": "1.8.
|
|
4
|
+
"version": "1.8.1",
|
|
5
5
|
"description": "Safari DevTools MCP — real browser debugging with network interception, DOM inspection, cookie/storage management, and CSS analysis for AI agents on macOS",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/src/index.js",
|
|
@@ -7,18 +7,23 @@ or when debugging WebKit-specific behavior.
|
|
|
7
7
|
|
|
8
8
|
### CSS issues
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
Start by running `check_webkit_compatibility` — it checks every CSS property
|
|
11
|
+
on the page against the live Safari session via `CSS.supports()` and reports
|
|
12
|
+
what is actually broken (unsupported properties, missing `-webkit-` prefixes):
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
check_webkit_compatibility
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
For specific elements, inspect computed styles directly:
|
|
12
19
|
|
|
13
20
|
```
|
|
14
21
|
get_computed_style uid="<element-uid>" properties=["display", "gap", "aspect-ratio", "container-type", "backdrop-filter"]
|
|
15
22
|
```
|
|
16
23
|
|
|
17
|
-
**
|
|
24
|
+
**Common Safari CSS gotchas:**
|
|
18
25
|
|
|
19
|
-
-
|
|
20
|
-
- `aspect-ratio`: Works, but may not apply in some flex/grid contexts.
|
|
21
|
-
- `-webkit-backdrop-filter`: Still requires prefix in some versions.
|
|
26
|
+
- `-webkit-backdrop-filter`: Still requires prefix in Safari <18.
|
|
22
27
|
- `100vh` on iOS Safari includes the address bar — use `100dvh` instead.
|
|
23
28
|
- `position: sticky` inside `overflow: auto` containers often breaks.
|
|
24
29
|
- `:has()` selector: Safari was first to ship it, but edge cases may differ.
|
|
@@ -115,7 +120,13 @@ see what the a11y tree reports, then `take_screenshot` for visual comparison.
|
|
|
115
120
|
evaluate_script function="() => { /* feature detection code */ }"
|
|
116
121
|
```
|
|
117
122
|
|
|
118
|
-
6. Check CSS
|
|
123
|
+
6. Check CSS compatibility across the page:
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
check_webkit_compatibility
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
7. Inspect a specific element's styles:
|
|
119
130
|
```
|
|
120
131
|
get_computed_style uid="<element-uid>"
|
|
121
132
|
```
|