Keep your coding agent up to date with the latest web best practices
Release v0.0.190
github-actions[bot]22ab18dfb50a
diff --git a/.agents/plugins/marketplace.json b/.agents/plugins/marketplace.jsonindex 7bfcc61..d9c5296 100644--- a/.agents/plugins/marketplace.json+++ b/.agents/plugins/marketplace.json@@ -14,8 +14,8 @@"installation": "AVAILABLE","authentication": "ON_INSTALL"},- "category": "Development",- "version": "0.0.189"+ "category": "Developer Tools",+ "version": "0.0.190"}]}diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.jsonindex 8fb4512..629cc94 100644--- a/.claude-plugin/marketplace.json+++ b/.claude-plugin/marketplace.json@@ -8,7 +8,7 @@"name": "modern-web-guidance","source": "./","description": "Keep your coding agent up to date with the latest web best practices",- "version": "0.0.189"+ "version": "0.0.190"}]}diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonindex 02bd1d0..6d2760c 100644--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@ -1,7 +1,7 @@{"name": "modern-web-guidance","description": "Keep your coding agent up to date with the latest web best practices",- "version": "0.0.189",+ "version": "0.0.190","author": {"name": "Google Chrome"}diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.jsonindex 63985cc..52c9a03 100644--- a/.codex-plugin/plugin.json+++ b/.codex-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "modern-web-guidance",- "version": "0.0.189",+ "version": "0.0.190","description": "Keep your coding agent up to date with the latest web best practices","author": {"name": "Google Chrome",@@ -19,10 +19,12 @@"skills": "./skills/","interface": {"displayName": "Modern Web Guidance",- "shortDescription": "Keep your coding agent up to date with modern web platform best practices",+ "shortDescription": "Web platform expertise","longDescription": "Modern Web Guidance is an agent skill and CLI tool designed to help AI coding agents build web applications using modern, secure, and high-performance APIs rather than outdated workarounds. Supported by the Google Chrome team, it injects expert-curated web platform best practices directly into an agent's context window to prevent the generation of bloated, legacy code.","developerName": "Google Chrome",- "category": "Development",+ "category": "Developer Tools",+ "composerIcon": "./assets/logo.png",+ "logo": "./assets/logo.png","capabilities": ["Read"],diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.jsonindex 14648cd..4d46aff 100644--- a/.cursor-plugin/plugin.json+++ b/.cursor-plugin/plugin.json@@ -1,7 +1,7 @@{"name": "modern-web-guidance","description": "Modern Web Guidance is an agent skill and CLI tool designed to help AI coding agents build web applications using modern, secure, and high-performance APIs rather than outdated workarounds. Supported by the Google Chrome team, it injects expert-curated web platform best practices directly into an agent's context window to prevent the generation of bloated, legacy code.",- "version": "0.0.189",+ "version": "0.0.190","author": {"name": "Google Chrome"}diff --git a/.github/plugin/plugin.json b/.github/plugin/plugin.jsonindex 14648cd..4d46aff 100644--- a/.github/plugin/plugin.json+++ b/.github/plugin/plugin.json@@ -1,7 +1,7 @@{"name": "modern-web-guidance","description": "Modern Web Guidance is an agent skill and CLI tool designed to help AI coding agents build web applications using modern, secure, and high-performance APIs rather than outdated workarounds. Supported by the Google Chrome team, it injects expert-curated web platform best practices directly into an agent's context window to prevent the generation of bloated, legacy code.",- "version": "0.0.189",+ "version": "0.0.190","author": {"name": "Google Chrome"}diff --git a/.grok-plugin/marketplace.json b/.grok-plugin/marketplace.jsonindex 8fb4512..629cc94 100644--- a/.grok-plugin/marketplace.json+++ b/.grok-plugin/marketplace.json@@ -8,7 +8,7 @@"name": "modern-web-guidance","source": "./","description": "Keep your coding agent up to date with the latest web best practices",- "version": "0.0.189"+ "version": "0.0.190"}]}diff --git a/README.md b/README.mdindex 35d75ef..db15ab7 100644--- a/README.md+++ b/README.md@@ -79,69 +79,72 @@ We cover the past several years of the web platform's new features, all the way</tr></table>-_View an example:_ [the `navigation-drawer` guide](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/ui-components/navigation-drawer.md).+_View an example:_ [the `navigation-drawer` guide](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/overlays/navigation-drawer.md).<!-- INJECT_SKILL_COVERAGE_START -->#### The full list<details>-<summary><strong>108 modern web features</strong></summary>+<summary><strong>113 modern web features</strong></summary>-### CSS & Layout (54 features)+### CSS & Layout (55 features)| | | || :--- | :--- | :--- |-| [::backdrop](https://web-platform-dx.github.io/web-features-explorer/features/backdrop/) | [Custom highlights](https://web-platform-dx.github.io/web-features-explorer/features/highlight/) | [Scroll snap events](https://web-platform-dx.github.io/web-features-explorer/features/scroll-snap-events/) |-| [:has()](https://web-platform-dx.github.io/web-features-explorer/features/has/) | [field-sizing](https://web-platform-dx.github.io/web-features-explorer/features/field-sizing/) | [Scroll-driven animations](https://web-platform-dx.github.io/web-features-explorer/features/scroll-driven-animations/) |-| [:not()](https://web-platform-dx.github.io/web-features-explorer/features/not/) | [font-size-adjust](https://web-platform-dx.github.io/web-features-explorer/features/font-size-adjust/) | [scroll-initial-target](https://web-platform-dx.github.io/web-features-explorer/features/scroll-initial-target/) |-| [:user-valid and :user-invalid](https://web-platform-dx.github.io/web-features-explorer/features/user-pseudos/) | [image-set()](https://web-platform-dx.github.io/web-features-explorer/features/image-set/) | [scroll-target-group](https://web-platform-dx.github.io/web-features-explorer/features/scroll-target-group/) |-| [@function](https://web-platform-dx.github.io/web-features-explorer/features/function/) | [Individual transform properties](https://web-platform-dx.github.io/web-features-explorer/features/individual-transforms/) | [scrollbar-color](https://web-platform-dx.github.io/web-features-explorer/features/scrollbar-color/) |-| [@starting-style](https://web-platform-dx.github.io/web-features-explorer/features/starting-style/) | [interpolate-size](https://web-platform-dx.github.io/web-features-explorer/features/interpolate-size/) | [scrollbar-width](https://web-platform-dx.github.io/web-features-explorer/features/scrollbar-width/) |-| [accent-color](https://web-platform-dx.github.io/web-features-explorer/features/accent-color/) | [light-dark()](https://web-platform-dx.github.io/web-features-explorer/features/light-dark/) | [scrollend](https://web-platform-dx.github.io/web-features-explorer/features/scrollend/) |-| [Active view transition](https://web-platform-dx.github.io/web-features-explorer/features/active-view-transition/) | [linear() easing](https://web-platform-dx.github.io/web-features-explorer/features/linear-easing/) | [scrollIntoView()](https://web-platform-dx.github.io/web-features-explorer/features/scroll-into-view/) |-| [Anchor position container queries](https://web-platform-dx.github.io/web-features-explorer/features/container-anchor-position-queries/) | [Masks](https://web-platform-dx.github.io/web-features-explorer/features/masks/) | [sibling-count() and sibling-index()](https://web-platform-dx.github.io/web-features-explorer/features/sibling-count/) |-| [Anchor positioning](https://web-platform-dx.github.io/web-features-explorer/features/anchor-positioning/) | [overflow-clip-margin](https://web-platform-dx.github.io/web-features-explorer/features/overflow-clip-margin/) | [text-box](https://web-platform-dx.github.io/web-features-explorer/features/text-box/) |-| [calc-size()](https://web-platform-dx.github.io/web-features-explorer/features/calc-size/) | [overflow: clip](https://web-platform-dx.github.io/web-features-explorer/features/overflow-clip/) | [text-wrap](https://web-platform-dx.github.io/web-features-explorer/features/text-wrap/) |-| [color-scheme](https://web-platform-dx.github.io/web-features-explorer/features/color-scheme/) | [overlay](https://web-platform-dx.github.io/web-features-explorer/features/overlay/) | [text-wrap: balance](https://web-platform-dx.github.io/web-features-explorer/features/text-wrap-balance/) |-| [Conic gradients](https://web-platform-dx.github.io/web-features-explorer/features/conic-gradients/) | [overscroll-behavior](https://web-platform-dx.github.io/web-features-explorer/features/overscroll-behavior/) | [text-wrap: pretty](https://web-platform-dx.github.io/web-features-explorer/features/text-wrap-pretty/) |-| [Container queries](https://web-platform-dx.github.io/web-features-explorer/features/container-queries/) | [prefers-color-scheme media query](https://web-platform-dx.github.io/web-features-explorer/features/prefers-color-scheme/) | [transition-behavior](https://web-platform-dx.github.io/web-features-explorer/features/transition-behavior/) |-| [Container scroll-state queries](https://web-platform-dx.github.io/web-features-explorer/features/container-scroll-state-queries/) | [prefers-contrast media query](https://web-platform-dx.github.io/web-features-explorer/features/prefers-contrast/) | [Trigonometric functions (CSS)](https://web-platform-dx.github.io/web-features-explorer/features/trig-functions/) |-| [Container style queries](https://web-platform-dx.github.io/web-features-explorer/features/container-style-queries/) | [prefers-reduced-motion media query](https://web-platform-dx.github.io/web-features-explorer/features/prefers-reduced-motion/) | [View transitions](https://web-platform-dx.github.io/web-features-explorer/features/view-transitions/) |-| [content-visibility](https://web-platform-dx.github.io/web-features-explorer/features/content-visibility/) | [Scroll marker target pseudo-classes](https://web-platform-dx.github.io/web-features-explorer/features/scroll-marker-targets/) | [view-transition-class](https://web-platform-dx.github.io/web-features-explorer/features/view-transition-class/) |-| [Cross-document view transitions](https://web-platform-dx.github.io/web-features-explorer/features/cross-document-view-transitions/) | [Scroll snap](https://web-platform-dx.github.io/web-features-explorer/features/scroll-snap/) | [Web animations](https://web-platform-dx.github.io/web-features-explorer/features/web-animations/) |--### HTML & DOM (21 features)+| [::backdrop](https://web-platform-dx.github.io/web-features-explorer/features/backdrop/) | [Custom highlights](https://web-platform-dx.github.io/web-features-explorer/features/highlight/) | [Scroll-driven animations](https://web-platform-dx.github.io/web-features-explorer/features/scroll-driven-animations/) |+| [:has()](https://web-platform-dx.github.io/web-features-explorer/features/has/) | [field-sizing](https://web-platform-dx.github.io/web-features-explorer/features/field-sizing/) | [scroll-initial-target](https://web-platform-dx.github.io/web-features-explorer/features/scroll-initial-target/) |+| [:not()](https://web-platform-dx.github.io/web-features-explorer/features/not/) | [font-size-adjust](https://web-platform-dx.github.io/web-features-explorer/features/font-size-adjust/) | [scroll-target-group](https://web-platform-dx.github.io/web-features-explorer/features/scroll-target-group/) |+| [:user-valid and :user-invalid](https://web-platform-dx.github.io/web-features-explorer/features/user-pseudos/) | [image-set()](https://web-platform-dx.github.io/web-features-explorer/features/image-set/) | [scrollbar-color](https://web-platform-dx.github.io/web-features-explorer/features/scrollbar-color/) |+| [@function](https://web-platform-dx.github.io/web-features-explorer/features/function/) | [Individual transform properties](https://web-platform-dx.github.io/web-features-explorer/features/individual-transforms/) | [scrollbar-width](https://web-platform-dx.github.io/web-features-explorer/features/scrollbar-width/) |+| [@starting-style](https://web-platform-dx.github.io/web-features-explorer/features/starting-style/) | [interpolate-size](https://web-platform-dx.github.io/web-features-explorer/features/interpolate-size/) | [scrollend](https://web-platform-dx.github.io/web-features-explorer/features/scrollend/) |+| [accent-color](https://web-platform-dx.github.io/web-features-explorer/features/accent-color/) | [light-dark()](https://web-platform-dx.github.io/web-features-explorer/features/light-dark/) | [scrollIntoView()](https://web-platform-dx.github.io/web-features-explorer/features/scroll-into-view/) |+| [Active view transition](https://web-platform-dx.github.io/web-features-explorer/features/active-view-transition/) | [linear() easing](https://web-platform-dx.github.io/web-features-explorer/features/linear-easing/) | [sibling-count() and sibling-index()](https://web-platform-dx.github.io/web-features-explorer/features/sibling-count/) |+| [Anchor position container queries](https://web-platform-dx.github.io/web-features-explorer/features/container-anchor-position-queries/) | [Masks](https://web-platform-dx.github.io/web-features-explorer/features/masks/) | [text-box](https://web-platform-dx.github.io/web-features-explorer/features/text-box/) |+| [Anchor positioning](https://web-platform-dx.github.io/web-features-explorer/features/anchor-positioning/) | [overflow-clip-margin](https://web-platform-dx.github.io/web-features-explorer/features/overflow-clip-margin/) | [text-wrap](https://web-platform-dx.github.io/web-features-explorer/features/text-wrap/) |+| [calc-size()](https://web-platform-dx.github.io/web-features-explorer/features/calc-size/) | [overflow: clip](https://web-platform-dx.github.io/web-features-explorer/features/overflow-clip/) | [text-wrap: balance](https://web-platform-dx.github.io/web-features-explorer/features/text-wrap-balance/) |+| [color-scheme](https://web-platform-dx.github.io/web-features-explorer/features/color-scheme/) | [overlay](https://web-platform-dx.github.io/web-features-explorer/features/overlay/) | [text-wrap: pretty](https://web-platform-dx.github.io/web-features-explorer/features/text-wrap-pretty/) |+| [Conic gradients](https://web-platform-dx.github.io/web-features-explorer/features/conic-gradients/) | [overscroll-behavior](https://web-platform-dx.github.io/web-features-explorer/features/overscroll-behavior/) | [transition-behavior](https://web-platform-dx.github.io/web-features-explorer/features/transition-behavior/) |+| [Container queries](https://web-platform-dx.github.io/web-features-explorer/features/container-queries/) | [prefers-color-scheme media query](https://web-platform-dx.github.io/web-features-explorer/features/prefers-color-scheme/) | [Trigonometric functions (CSS)](https://web-platform-dx.github.io/web-features-explorer/features/trig-functions/) |+| [Container scroll-state queries](https://web-platform-dx.github.io/web-features-explorer/features/container-scroll-state-queries/) | [prefers-contrast media query](https://web-platform-dx.github.io/web-features-explorer/features/prefers-contrast/) | [View transitions](https://web-platform-dx.github.io/web-features-explorer/features/view-transitions/) |+| [Container style queries](https://web-platform-dx.github.io/web-features-explorer/features/container-style-queries/) | [prefers-reduced-motion media query](https://web-platform-dx.github.io/web-features-explorer/features/prefers-reduced-motion/) | [view-transition-class](https://web-platform-dx.github.io/web-features-explorer/features/view-transition-class/) |+| [content-visibility](https://web-platform-dx.github.io/web-features-explorer/features/content-visibility/) | [Scroll marker target pseudo-classes](https://web-platform-dx.github.io/web-features-explorer/features/scroll-marker-targets/) | [Web animations](https://web-platform-dx.github.io/web-features-explorer/features/web-animations/) |+| [contrast-color()](https://web-platform-dx.github.io/web-features-explorer/features/contrast-color/) | [Scroll snap](https://web-platform-dx.github.io/web-features-explorer/features/scroll-snap/) | |+| [Cross-document view transitions](https://web-platform-dx.github.io/web-features-explorer/features/cross-document-view-transitions/) | [Scroll snap events](https://web-platform-dx.github.io/web-features-explorer/features/scroll-snap-events/) | |++### HTML & DOM (23 features)| | | || :--- | :--- | :--- |-| [:autofill](https://web-platform-dx.github.io/web-features-explorer/features/autofill/) | [blocking="render"](https://web-platform-dx.github.io/web-features-explorer/features/blocking-render/) | [Interest invokers](https://web-platform-dx.github.io/web-features-explorer/features/interest-invokers/) |-| [<details>](https://web-platform-dx.github.io/web-features-explorer/features/details/) | [Customizable <select>](https://web-platform-dx.github.io/web-features-explorer/features/customizable-select/) | [Invoker commands](https://web-platform-dx.github.io/web-features-explorer/features/invoker-commands/) |-| [<dialog closedby>](https://web-platform-dx.github.io/web-features-explorer/features/dialog-closedby/) | [Email, telephone, and URL <input> types](https://web-platform-dx.github.io/web-features-explorer/features/input-email-tel-url/) | [moveBefore()](https://web-platform-dx.github.io/web-features-explorer/features/move-before/) |-| [<dialog>](https://web-platform-dx.github.io/web-features-explorer/features/dialog/) | [Fetch priority](https://web-platform-dx.github.io/web-features-explorer/features/fetch-priority/) | [MutationObserver](https://web-platform-dx.github.io/web-features-explorer/features/mutationobserver/) |-| [<link rel="expect">](https://web-platform-dx.github.io/web-features-explorer/features/link-rel-expect/) | [hidden="until-found"](https://web-platform-dx.github.io/web-features-explorer/features/hidden-until-found/) | [Mutually exclusive <details> elements](https://web-platform-dx.github.io/web-features-explorer/features/details-name/) |-| [<link rel="preload">](https://web-platform-dx.github.io/web-features-explorer/features/link-rel-preload/) | [HTML in canvas](https://web-platform-dx.github.io/web-features-explorer/features/canvas-html/) | [Popover](https://web-platform-dx.github.io/web-features-explorer/features/popover/) |-| [<progress>](https://web-platform-dx.github.io/web-features-explorer/features/progress/) | [inert](https://web-platform-dx.github.io/web-features-explorer/features/inert/) | [popover="hint"](https://web-platform-dx.github.io/web-features-explorer/features/popover-hint/) |+| [:autofill](https://web-platform-dx.github.io/web-features-explorer/features/autofill/) | [Customizable <select>](https://web-platform-dx.github.io/web-features-explorer/features/customizable-select/) | [Interest invokers](https://web-platform-dx.github.io/web-features-explorer/features/interest-invokers/) |+| [<details>](https://web-platform-dx.github.io/web-features-explorer/features/details/) | [Email, telephone, and URL <input> types](https://web-platform-dx.github.io/web-features-explorer/features/input-email-tel-url/) | [Invoker commands](https://web-platform-dx.github.io/web-features-explorer/features/invoker-commands/) |+| [<dialog closedby>](https://web-platform-dx.github.io/web-features-explorer/features/dialog-closedby/) | [Fetch priority](https://web-platform-dx.github.io/web-features-explorer/features/fetch-priority/) | [moveBefore()](https://web-platform-dx.github.io/web-features-explorer/features/move-before/) |+| [<dialog>](https://web-platform-dx.github.io/web-features-explorer/features/dialog/) | [hidden="until-found"](https://web-platform-dx.github.io/web-features-explorer/features/hidden-until-found/) | [MutationObserver](https://web-platform-dx.github.io/web-features-explorer/features/mutationobserver/) |+| [<link rel="expect">](https://web-platform-dx.github.io/web-features-explorer/features/link-rel-expect/) | [HTML in canvas](https://web-platform-dx.github.io/web-features-explorer/features/canvas-html/) | [Mutually exclusive <details> elements](https://web-platform-dx.github.io/web-features-explorer/features/details-name/) |+| [<link rel="preload">](https://web-platform-dx.github.io/web-features-explorer/features/link-rel-preload/) | [HTML setter methods](https://web-platform-dx.github.io/web-features-explorer/features/html-setters/) | [Popover](https://web-platform-dx.github.io/web-features-explorer/features/popover/) |+| [<progress>](https://web-platform-dx.github.io/web-features-explorer/features/progress/) | [HTML streaming setters](https://web-platform-dx.github.io/web-features-explorer/features/html-streaming-setters/) | [popover="hint"](https://web-platform-dx.github.io/web-features-explorer/features/popover-hint/) |+| [blocking="render"](https://web-platform-dx.github.io/web-features-explorer/features/blocking-render/) | [inert](https://web-platform-dx.github.io/web-features-explorer/features/inert/) | |-### JavaScript & APIs (33 features)+### JavaScript & APIs (35 features)| | | || :--- | :--- | :--- |-| [AbortController and AbortSignal](https://web-platform-dx.github.io/web-features-explorer/features/aborting/) | [Keyboard events](https://web-platform-dx.github.io/web-features-explorer/features/keyboard-events/) | [Resize observer](https://web-platform-dx.github.io/web-features-explorer/features/resize-observer/) |-| [document.modelContext](https://web-platform-dx.github.io/web-features-explorer/features/document-modelcontext/) | [Language detector](https://web-platform-dx.github.io/web-features-explorer/features/languagedetector/) | [Scheduler API](https://web-platform-dx.github.io/web-features-explorer/features/scheduler/) |-| [enterkeyhint](https://web-platform-dx.github.io/web-features-explorer/features/enterkeyhint/) | [LanguageModel](https://web-platform-dx.github.io/web-features-explorer/features/languagemodel/) | [Speculation rules](https://web-platform-dx.github.io/web-features-explorer/features/speculation-rules/) |-| [Event timing](https://web-platform-dx.github.io/web-features-explorer/features/event-timing/) | [Lazy-loading images and iframes](https://web-platform-dx.github.io/web-features-explorer/features/loading-lazy/) | [Summarizer](https://web-platform-dx.github.io/web-features-explorer/features/summarizer/) |-| [Federated credential management](https://web-platform-dx.github.io/web-features-explorer/features/fedcm/) | [Long animation frames](https://web-platform-dx.github.io/web-features-explorer/features/long-animation-frames/) | [SVG](https://web-platform-dx.github.io/web-features-explorer/features/svg/) |-| [Fetch](https://web-platform-dx.github.io/web-features-explorer/features/fetch/) | [Navigation API](https://web-platform-dx.github.io/web-features-explorer/features/navigation/) | [Temporal](https://web-platform-dx.github.io/web-features-explorer/features/temporal/) |-| [fetchLater](https://web-platform-dx.github.io/web-features-explorer/features/fetchlater/) | [Page visibility](https://web-platform-dx.github.io/web-features-explorer/features/page-visibility/) | [Top-level await](https://web-platform-dx.github.io/web-features-explorer/features/top-level-await/) |-| [Form-associated WebMCP attributes](https://web-platform-dx.github.io/web-features-explorer/features/declarative-webmcp/) | [Page visibility state](https://web-platform-dx.github.io/web-features-explorer/features/page-visibility-state/) | [Translator](https://web-platform-dx.github.io/web-features-explorer/features/translator/) |-| [inputmode](https://web-platform-dx.github.io/web-features-explorer/features/inputmode/) | [Partitioned cookies](https://web-platform-dx.github.io/web-features-explorer/features/partitioned-cookies/) | [User agent client hints](https://web-platform-dx.github.io/web-features-explorer/features/ua-client-hints/) |-| [Intersection observer](https://web-platform-dx.github.io/web-features-explorer/features/intersection-observer/) | [Permissions policy](https://web-platform-dx.github.io/web-features-explorer/features/permissions-policy/) | [Web authentication](https://web-platform-dx.github.io/web-features-explorer/features/webauthn/) |-| [Intl.DurationFormat](https://web-platform-dx.github.io/web-features-explorer/features/intl-duration-format/) | [Registered custom properties](https://web-platform-dx.github.io/web-features-explorer/features/registered-custom-properties/) | [Web authentication signal methods](https://web-platform-dx.github.io/web-features-explorer/features/webauthn-signals/) |+| [<template for>](https://web-platform-dx.github.io/web-features-explorer/features/template-for/) | [Keyboard events](https://web-platform-dx.github.io/web-features-explorer/features/keyboard-events/) | [Sanitizer API](https://web-platform-dx.github.io/web-features-explorer/features/sanitizer/) |+| [AbortController and AbortSignal](https://web-platform-dx.github.io/web-features-explorer/features/aborting/) | [Language detector](https://web-platform-dx.github.io/web-features-explorer/features/languagedetector/) | [Scheduler API](https://web-platform-dx.github.io/web-features-explorer/features/scheduler/) |+| [document.modelContext](https://web-platform-dx.github.io/web-features-explorer/features/document-modelcontext/) | [LanguageModel](https://web-platform-dx.github.io/web-features-explorer/features/languagemodel/) | [Speculation rules](https://web-platform-dx.github.io/web-features-explorer/features/speculation-rules/) |+| [enterkeyhint](https://web-platform-dx.github.io/web-features-explorer/features/enterkeyhint/) | [Lazy-loading images and iframes](https://web-platform-dx.github.io/web-features-explorer/features/loading-lazy/) | [Summarizer](https://web-platform-dx.github.io/web-features-explorer/features/summarizer/) |+| [Event timing performance entries](https://web-platform-dx.github.io/web-features-explorer/features/event-timing/) | [Long animation frames performance entries](https://web-platform-dx.github.io/web-features-explorer/features/long-animation-frames/) | [SVG](https://web-platform-dx.github.io/web-features-explorer/features/svg/) |+| [Federated credential management](https://web-platform-dx.github.io/web-features-explorer/features/fedcm/) | [Navigation API](https://web-platform-dx.github.io/web-features-explorer/features/navigation/) | [Temporal](https://web-platform-dx.github.io/web-features-explorer/features/temporal/) |+| [Fetch](https://web-platform-dx.github.io/web-features-explorer/features/fetch/) | [Page visibility](https://web-platform-dx.github.io/web-features-explorer/features/page-visibility/) | [Top-level await](https://web-platform-dx.github.io/web-features-explorer/features/top-level-await/) |+| [fetchLater](https://web-platform-dx.github.io/web-features-explorer/features/fetchlater/) | [Page visibility state performance entries](https://web-platform-dx.github.io/web-features-explorer/features/page-visibility-state/) | [Translator](https://web-platform-dx.github.io/web-features-explorer/features/translator/) |+| [Form-associated WebMCP attributes](https://web-platform-dx.github.io/web-features-explorer/features/declarative-webmcp/) | [Partitioned cookies](https://web-platform-dx.github.io/web-features-explorer/features/partitioned-cookies/) | [User agent client hints](https://web-platform-dx.github.io/web-features-explorer/features/ua-client-hints/) |+| [inputmode](https://web-platform-dx.github.io/web-features-explorer/features/inputmode/) | [Permissions policy](https://web-platform-dx.github.io/web-features-explorer/features/permissions-policy/) | [Web authentication](https://web-platform-dx.github.io/web-features-explorer/features/webauthn/) |+| [Intersection observer](https://web-platform-dx.github.io/web-features-explorer/features/intersection-observer/) | [Registered custom properties](https://web-platform-dx.github.io/web-features-explorer/features/registered-custom-properties/) | [Web authentication signal methods](https://web-platform-dx.github.io/web-features-explorer/features/webauthn-signals/) |+| [Intl.DurationFormat](https://web-platform-dx.github.io/web-features-explorer/features/intl-duration-format/) | [Resize observer](https://web-platform-dx.github.io/web-features-explorer/features/resize-observer/) | |</details><details>-<summary><strong>135 real-world developer use cases</strong></summary>+<summary><strong>138 real-world developer use cases</strong></summary><h3>accessibility</h3>@@ -221,6 +224,7 @@ _View an example:_ [the `navigation-drawer` guide](https://github.com/GoogleChro- **[optimize-image-priority](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/optimize-image-priority.md)**: Optimize the loading priority of Largest Contentful Paint (LCP) candidate images and deprioritize non-critical images to reduce critical resource load delays.- **[optimize-preload-priority](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/optimize-preload-priority.md)**: Optimize the relative priority of preloaded content to reduce critical resource load delays.- **[optimize-script-priority](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/optimize-script-priority.md)**: Optimize the loading priority of scripts by boosting critical asynchronous scripts and deprioritizing non-essential or late-body scripts to improve sequencing and reduce delays.+- **[out-of-order-html-streaming](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/out-of-order-html-streaming.md)**: Declaratively update a page with content streamed later into the same HTML document or via imperative JavaScript APIs.- **[resolution-optimized-pseudo-elements](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/resolution-optimized-pseudo-elements.md)**: Use resolution-optimized images in CSS pseudo-elements (such as `::before` and `::after`) to reduce the number of DOM nodes.- **[schedule-tasks-by-priority](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/schedule-tasks-by-priority.md)**: Schedule tasks with different priorities to ensure critical work runs first while background work is deferred.- **[sequence-distributed-events](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/performance/sequence-distributed-events.md)**: Log and sequence operations in distributed microservices or high-throughput tracing environments by recording timestamps with nanosecond resolution.@@ -237,6 +241,7 @@ _View an example:_ [the `navigation-drawer` guide](https://github.com/GoogleChro- **[passkey-reauthentication](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/passkey-reauthentication.md)**: Verify a signed-in user's identity using their existing passkeys before a sensitive action.- **[passkey-registration](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/passkey-registration.md)**: Register a passkey for an existing user account.- **[passkeys](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/passkeys.md)**: Comprehensive orientation and cross-cutting principles for implementing WebAuthn and Passkeys in web applications. Use this guide when handling passkey registration, authentication, management, or reauthentication.+- **[sanitize-untrusted-html](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/security/sanitize-untrusted-html.md)**: Safely parse and display untrusted HTML content from user input by removing unsafe elements and attributes.<h3>ui-atoms</h3>@@ -298,6 +303,7 @@ _View an example:_ [the `navigation-drawer` guide](https://github.com/GoogleChro- **[adapt-scrollbar-to-contrast-preferences](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/adapt-scrollbar-to-contrast-preferences.md)**: Enhance scrollbar visibility for users who prefer high-contrast interfaces- **[apply-webgl-shaders](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/apply-webgl-shaders.md)**: Apply custom visual effects with WebGL shaders to HTML content.- **[complex-shapes](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/complex-shapes.md)**: Clip elements and their content to any free-form shape, like a symbol, brush stroke, or organic texture for more expressive designs.+- **[contrast-color](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/contrast-color.md)**: Select a readable text color with sufficient contrast on a dynamic background color.- **[customize-scrollbar-color-and-thickness](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/customize-scrollbar-color-and-thickness.md)**: Customize the color or thickness of a scrollbar- **[dark-mode](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/dark-mode.md)**: Implement dark mode support in a way that respects the user's light/dark theme preference and adapts browser UI (e.g. scrollbars, form controls, etc)- **[export-html-media-from-canvas](https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/visual-design/export-html-media-from-canvas.md)**: Capture and export dynamic HTML content as images or video frames from within canvas.@@ -403,6 +409,7 @@ grok plugin install https://github.com/GoogleChrome/modern-web-guidance --trust```shellcodex plugin marketplace add GoogleChrome/modern-web-guidance+codex plugin add modern-web-guidance@googlechrome```</details>diff --git a/assets/logo.png b/assets/logo.pngnew file mode 100644index 0000000..8e11dffBinary files /dev/null and b/assets/logo.png differdiff --git a/gemini-extension.json b/gemini-extension.jsonindex 02bd1d0..6d2760c 100644--- a/gemini-extension.json+++ b/gemini-extension.json@@ -1,7 +1,7 @@{"name": "modern-web-guidance","description": "Keep your coding agent up to date with the latest web best practices",- "version": "0.0.189",+ "version": "0.0.190","author": {"name": "Google Chrome"}diff --git a/kimi.plugin.json b/kimi.plugin.jsonindex 488ac21..3cc1138 100644--- a/kimi.plugin.json+++ b/kimi.plugin.json@@ -1,7 +1,7 @@{"name": "modern-web-guidance","description": "Modern Web Guidance is an agent skill and CLI tool designed to help AI coding agents build web applications using modern, secure, and high-performance APIs rather than outdated workarounds. Supported by the Google Chrome team, it injects expert-curated web platform best practices directly into an agent's context window to prevent the generation of bloated, legacy code.",- "version": "0.0.189",+ "version": "0.0.190","author": {"name": "Google Chrome"},diff --git a/package.json b/package.jsonindex 10c271c..320a249 100644--- a/package.json+++ b/package.json@@ -3,7 +3,7 @@"displayName": "Modern Web Guidance","description": "Keep your agent up to date on the latest web best practices.","license": "Apache-2.0",- "version": "0.0.189",+ "version": "0.0.190","publisher": "GoogleChrome","repository": {"url": "https://github.com/GoogleChrome/modern-web-guidance-src"diff --git a/skills/modern-web-guidance/guides/css/css-layout.md b/skills/modern-web-guidance/guides/css/css-layout.mdindex 58cb2fe..ef240ad 100644--- a/skills/modern-web-guidance/guides/css/css-layout.md+++ b/skills/modern-web-guidance/guides/css/css-layout.md@@ -209,7 +209,9 @@ Supported by: Chrome 37 (Aug 2014), Edge 79 (Jan 2020), Firefox 98 (Mar 2022), aBaseline status for Popover: Newly available. It's been Baseline since 2025-01-27.Supported by: Chrome 116 (Aug 2023), Edge 116 (Aug 2023), Firefox 125 (Apr 2024), Safari 17 (Sep 2023), and Safari iOS 18.3 (Jan 2025).-Anchor positioning is not natively supported by any major browser yet.+Anchor positioning has limited availability.+Supported by: Safari 27.+Unsupported in: Chrome, Edge, and Firefox.**When to use each overlay primitive:**@@ -278,7 +280,10 @@ Supported by: Chrome 108 (Nov 2022), Edge 108 (Dec 2022), Firefox 101 (May 2022)## 8 Grid lanes (aka masonry)-Masonry is not natively supported by any major browser yet.+Grid lanes has limited availability.+Supported by: Safari 26.4 (Mar 2026).+Unsupported in: Chrome, Edge, and Firefox.+The spec is in development. The currently agreed-upon name is "grid lanes" (e.g., `display: grid-lanes`). Firefox ships `grid-template-rows: masonry` behind a flag; no other engines ship it in stable as of this writing.diff --git a/skills/modern-web-guidance/guides/forms/animated-select-picker.md b/skills/modern-web-guidance/guides/forms/animated-select-picker.mdindex 7ed987e..4a86e12 100644--- a/skills/modern-web-guidance/guides/forms/animated-select-picker.md+++ b/skills/modern-web-guidance/guides/forms/animated-select-picker.md@@ -159,8 +159,8 @@ The following example demonstrates a custom select styled with standard page ani### Fallbacks & browser support for Customizable <select>Customizable <select> has limited availability.-Supported by: Chrome 135 (Apr 2025) and Edge 135 (Apr 2025).-Unsupported in: Firefox and Safari.+Supported by: Chrome 135 (Apr 2025), Edge 135 (Apr 2025), and Safari 27.+Unsupported in: Firefox.For browsers that do not yet support `appearance: base-select`, the `<select>` element degrades gracefully to a standard operating system dropdown.diff --git a/skills/modern-web-guidance/guides/forms/branded-select-styling.md b/skills/modern-web-guidance/guides/forms/branded-select-styling.mdindex 29ade1a..8b2b667 100644--- a/skills/modern-web-guidance/guides/forms/branded-select-styling.md+++ b/skills/modern-web-guidance/guides/forms/branded-select-styling.md@@ -95,8 +95,8 @@ The following example demonstrates a custom select styled with a monospace font### Fallbacks & browser support for Customizable <select>Customizable <select> has limited availability.-Supported by: Chrome 135 (Apr 2025) and Edge 135 (Apr 2025).-Unsupported in: Firefox and Safari.+Supported by: Chrome 135 (Apr 2025), Edge 135 (Apr 2025), and Safari 27.+Unsupported in: Firefox.For browsers that do not yet support `appearance: base-select`, the `<select>` element degrades gracefully to a standard operating system dropdown.diff --git a/skills/modern-web-guidance/guides/forms/custom-select-picker-layouts.md b/skills/modern-web-guidance/guides/forms/custom-select-picker-layouts.mdindex f0d2e34..5234b21 100644--- a/skills/modern-web-guidance/guides/forms/custom-select-picker-layouts.md+++ b/skills/modern-web-guidance/guides/forms/custom-select-picker-layouts.md@@ -84,8 +84,8 @@ To implement a custom select picker layout:### Fallbacks & browser support for Customizable <select>Customizable <select> has limited availability.-Supported by: Chrome 135 (Apr 2025) and Edge 135 (Apr 2025).-Unsupported in: Firefox and Safari.+Supported by: Chrome 135 (Apr 2025), Edge 135 (Apr 2025), and Safari 27.+Unsupported in: Firefox.For browsers that do not yet support `appearance: base-select`, the `<select>` element degrades gracefully to a standard operating system dropdown.diff --git a/skills/modern-web-guidance/guides/forms/ime-safe-enter-submit.md b/skills/modern-web-guidance/guides/forms/ime-safe-enter-submit.mdindex 8e30adc..07f23d8 100644--- a/skills/modern-web-guidance/guides/forms/ime-safe-enter-submit.md+++ b/skills/modern-web-guidance/guides/forms/ime-safe-enter-submit.md@@ -48,13 +48,12 @@ Note: Other custom submission shortcuts (such as `Cmd+Enter` or `Ctrl+Enter`) do## Fallback strategies-the api.KeyboardEvent.isComposing capability has limited availability.-Supported by: Chrome 56 (Jan 2017), Edge 79 (Jan 2020), and Firefox 31 (Jul 2014).-Unsupported in: Safari.+Baseline status for the api.KeyboardEvent.isComposing capability: Newly available. It's been Baseline since 2026-09-14.+Supported by: Chrome 56 (Jan 2017), Edge 79 (Jan 2020), Firefox 31 (Jul 2014), and Safari 27.-In Safari, an event-ordering issue (WebKit bug 165004) delivers `compositionend` to script handlers before the confirming `Enter` `keydown`, even though the underlying events are dispatched in the opposite order. By the time the keydown handler runs, `event.isComposing` has already been reset to `false`, meaning the standard check alone will fail to prevent premature submission.+In recent versions of Safari, an event-ordering issue (WebKit bug 165004) delivered `compositionend` to script handlers before the confirming `Enter` `keydown`, even though the underlying events were dispatched in the opposite order. By the time the keydown handler ran, `event.isComposing` had already been reset to `false`, meaning the standard check alone would have failed to prevent premature submission.-If you need to support cross-browser compatibility across Safari and other platforms, adopt one of the following fallback strategies:+If you need to support cross-browser compatibility across older versions of Safari and other platforms, adopt one of the following fallback strategies:### Strategy 1: Add a `keyCode === 229` check (recommended)diff --git a/skills/modern-web-guidance/guides/forms/rich-media-picker.md b/skills/modern-web-guidance/guides/forms/rich-media-picker.mdindex a0e448a..1f495ac 100644--- a/skills/modern-web-guidance/guides/forms/rich-media-picker.md+++ b/skills/modern-web-guidance/guides/forms/rich-media-picker.md@@ -113,8 +113,8 @@ select.custom-select option:checked .option-title {### Fallbacks & browser support for Customizable <select>Customizable <select> has limited availability.-Supported by: Chrome 135 (Apr 2025) and Edge 135 (Apr 2025).-Unsupported in: Firefox and Safari.+Supported by: Chrome 135 (Apr 2025), Edge 135 (Apr 2025), and Safari 27.+Unsupported in: Firefox.For browsers that do not yet support `appearance: base-select`, the `<select>` element degrades gracefully to a standard operating system dropdown.diff --git a/skills/modern-web-guidance/guides/performance/calculate-total-foreground-time.md b/skills/modern-web-guidance/guides/performance/calculate-total-foreground-time.mdindex 9794788..2f170e5 100644--- a/skills/modern-web-guidance/guides/performance/calculate-total-foreground-time.md+++ b/skills/modern-web-guidance/guides/performance/calculate-total-foreground-time.md@@ -48,7 +48,7 @@ function getTotalForegroundTime() {## Fallbacks & browser support-Page visibility state has limited availability.+Page visibility state performance entries has limited availability.Supported by: Chrome 115 (Jul 2023) and Edge 115 (Jul 2023).Unsupported in: Firefox and Safari.diff --git a/skills/modern-web-guidance/guides/performance/conditional-async-dependencies.md b/skills/modern-web-guidance/guides/performance/conditional-async-dependencies.mdindex f1d950a..dd9209c 100644--- a/skills/modern-web-guidance/guides/performance/conditional-async-dependencies.md+++ b/skills/modern-web-guidance/guides/performance/conditional-async-dependencies.md@@ -62,9 +62,8 @@ import './app.js';### Fallback strategies-Top-level await has limited availability.-Supported by: Chrome 89 (Mar 2021), Edge 89 (Mar 2021), and Firefox 89 (Jun 2021).-Unsupported in: Safari.+Baseline status for Top-level await: Newly available. It's been Baseline since 2026-09-14.+Supported by: Chrome 89 (Mar 2021), Edge 89 (Mar 2021), Firefox 89 (Jun 2021), and Safari 27.Top-level `await` has been supported in all major browsers since 2021 (Chrome 89, Firefox 89, Safari 15). Because of this broad support, **you do not need to implement a fallback strategy for modern web applications.**diff --git a/skills/modern-web-guidance/guides/performance/detect-initial-visibility-state.md b/skills/modern-web-guidance/guides/performance/detect-initial-visibility-state.mdindex bffb690..1e8fbe7 100644--- a/skills/modern-web-guidance/guides/performance/detect-initial-visibility-state.md+++ b/skills/modern-web-guidance/guides/performance/detect-initial-visibility-state.md@@ -45,7 +45,7 @@ function getVisibilityInfo() {### Fallback strategies-Page visibility state has limited availability.+Page visibility state performance entries has limited availability.Supported by: Chrome 115 (Jul 2023) and Edge 115 (Jul 2023).Unsupported in: Firefox and Safari.diff --git a/skills/modern-web-guidance/guides/performance/identify-heavy-scripts.md b/skills/modern-web-guidance/guides/performance/identify-heavy-scripts.mdindex 30a11d0..7decd22 100644--- a/skills/modern-web-guidance/guides/performance/identify-heavy-scripts.md+++ b/skills/modern-web-guidance/guides/performance/identify-heavy-scripts.md@@ -62,7 +62,7 @@ observer.observe({type: 'long-animation-frame', buffered: true});## Browser support and fallback strategies-Long animation frames has limited availability.+Long animation frames performance entries has limited availability.Supported by: Chrome 123 (Mar 2024) and Edge 123 (Mar 2024).Unsupported in: Firefox and Safari..diff --git a/skills/modern-web-guidance/guides/performance/identify-inp-causes.md b/skills/modern-web-guidance/guides/performance/identify-inp-causes.mdindex c055b4f..9b71179 100644--- a/skills/modern-web-guidance/guides/performance/identify-inp-causes.md+++ b/skills/modern-web-guidance/guides/performance/identify-inp-causes.md@@ -61,12 +61,12 @@ onINP((metric) => {## Browser support and fallback strategies-Baseline status for Event timing: Newly available. It's been Baseline since 2025-12-12.+Baseline status for Event timing performance entries: Newly available. It's been Baseline since 2025-12-12.Supported by: Chrome 76 (Jul 2019), Edge 79 (Jan 2020), Firefox 89 (Jun 2021), and Safari 26.2 (Dec 2025).The Event Timing API is available in most modern browsers and is necessary to calculate INP and the INP subparts. For browsers that do not support this API INP cannot be measured.-Long animation frames has limited availability.+Long animation frames performance entries has limited availability.Supported by: Chrome 123 (Mar 2024) and Edge 123 (Mar 2024).Unsupported in: Firefox and Safari.diff --git a/skills/modern-web-guidance/guides/performance/out-of-order-html-streaming.md b/skills/modern-web-guidance/guides/performance/out-of-order-html-streaming.mdnew file mode 100644index 0000000..e12edde--- /dev/null+++ b/skills/modern-web-guidance/guides/performance/out-of-order-html-streaming.md@@ -0,0 +1,113 @@+# Out-of-Order (OOO) HTML Streaming++Out-of-Order (OOO) HTML Streaming (also known as Declarative Partial Updates) is an alternative to the traditional "top-to-bottom" linear processing of HTML. It allows developers to define placeholders earlier in a document and "patch" them with content that arrives later in the same network stream, or via new imperative JavaScript streaming APIs.++## Quick Overview++The feature consists of two primary mechanisms:++1. **Declarative Patching (HTML-based)**: Uses new processing instructions (`<?marker>`, `<?start>`, `<?end>`) and `<template for>` to swap content in the DOM as it streams in from the server.+2. **Imperative setting and streaming (JS-based)**: A suite of new methods (e.g., `streamHTML()`, `setHTMLUnsafe()`) that allow setting of HTML or piping readable streams directly into DOM elements with native performance and optional script execution.++## Best Practices++* **Prioritize Above-the-Fold Content**: Stream critical UI (header, hero, primary navigation, primary content) first. Use placeholders for "expensive" or lower priority components like comments, ads, or related content.+* **Implement Native Loading States**: Use the `<?start>` and `<?end>` markers to wrap fallback content. The browser automatically replaces everything between these markers when the corresponding `<template for>` arrives.+* **Minimize Cumulative Layout Shift (CLS)**: Always provide stable dimensions for placeholders. If the final content size is unknown, use skeleton screens or CSS `aspect-ratio` to reserve space and prevent jarring shifts.+* **Accessibility & Focus Management**: Be mindful that out-of-order updates can confuse screen reader users. Use `aria-live` regions for critical updates and ensure that focus isn't lost if a placeholder containing the active element is replaced.++## Implementation Details++### 1. Declarative HTML Markers+The browser looks for specific processing instructions to identify where content should be patched.++```html+<!-- A simple insertion point -->+<div id="sidebar">+ <?marker name="dynamic-comments">+</div>++<!-- A replacement range with loading state -->+<main>+ <?start name="main-content">+ <div class="skeleton">Loading content...</div>+ <?end>+</main>++... (other content) ...++<!-- Later in the same stream, provide the content -->+<template for="dynamic-comments">+ <div class="comments">...</div>+</template>++<template for="main-content">+ <article>+ <h1>The Real Content</h1>+ <p>This replaces the skeleton div automatically.</p>+ </article>+</template>+```++Once a `<template>` replaces an insertion point, that insertion point no longer exists, and can not be reused. However, a `<template>` may contain insertion points that can be used later in the stream.++```html+ <?start name="replaced-content">+ <div class="skeleton">+<?end>+<!-- Later in the same stream, provide initial content -->+<template for="replaced-content">+ <?start name="replaced-content">+ <div>Quickly computed result</div>+ <?end>+</template>+<!-- Later in the same stream, provide full content -->+<template for="replaced-content">+ <?start name="replaced-content">+ <div>Full result</div>+ <?end>+</template>+```++### 2. Imperative JS Streaming+You can now pipe fetch responses directly into the DOM without manual chunk handling.++```javascript+const main = document.querySelector('main');+const response = await fetch('/api/partial-update');++// Pipe the stream directly into the element+await response.body+ .pipeThrough(new TextDecoderStream())+ .pipeTo(main.streamHTMLUnsafe({ runScripts: true }));++// Or use the `textStream()` convenience method which streams directly without needing the intermediate `TextDecoderStream()` step+await response+ .textStream()+ .pipeTo(main.streamHTMLUnsafe({ runScripts: true }))+```++## Use Case Reference Matrix++* **Island Architecture**: Hydrate independent interactive components on top of static HTML without a full framework runtime.+* **Deferred "Expensive" Blocks**: Deliver the shell of a page immediately and stream database-heavy components as they become available.+* **Single Page Application (SPA) Updates**: Stream large UI transitions in SPAs using `streamHTML()` instead of waiting for a full JSON payload and manual DOM construction.++## Anti-Patterns & Warnings (DO NOT DO THIS)++* **Do not use OOO streaming for everything.** Over-fragmenting a page can increase the complexity of the stream and potentially delay content if the browser spends too much time patching small nodes.+* **Do not ignore Trusted Types.** When using `*Unsafe` methods in environments with Trusted Types enforced, ensure you are passing a sanitized policy object if required.+* **Do not assume script execution order.** Scripts inside a `<template for>` will execute as soon as they are patched into the document. Do not rely on them executing in a specific sequence relative to other deferred templates.+* **Do not use without a polyfill strategy.** Ensure you have a fallback or use polyfills (`html-setters-polyfill` and `template-for-polyfill`) to support your required browsers until this feature becomes Baseline.++## Fallback strategies++<template for> has limited availability.+Supported by: Chrome 150 and Edge 150.+Unsupported in: Firefox and Safari.++HTML setter methods is not natively supported by any major browser yet.++HTML streaming setters is not natively supported by any major browser yet.++You can use polyfills like `template-for-polyfill` and `html-setters-polyfill` to emulate the API surface for non-supporting browsers.diff --git a/skills/modern-web-guidance/guides/performance/performance.md b/skills/modern-web-guidance/guides/performance/performance.mdindex 82d8d30..fdbbb34 100644--- a/skills/modern-web-guidance/guides/performance/performance.md+++ b/skills/modern-web-guidance/guides/performance/performance.md@@ -187,7 +187,7 @@ Rendering involves Layout, Style, Paint, and Compositing calculations. CSS ContaImages typically represent the largest payload on a given web page. Optimization requires format negotiation, responsive sizing, and layout stabilization.### DOs-* **DO serve modern formats (AVIF / WebP)**: Use the `<picture>` element to offer AVIF (best compression), falling back to WebP, and finally JPEG/PNG for legacy browsers.+* **DO serve modern formats (AVIF / WebP / JPEG XL)**: Use the `<picture>` element to offer AVIF or JPEG XL (best compression), falling back to WebP, and finally JPEG/PNG for legacy browsers.* **DO apply explicit `width` and `height` attributes**: Setting native attributes allows the browser to compute the aspect ratio immediately, reserving space and eliminating CLS. Image dimensions may be set either as HTML attributes or CSS properties.* **DO utilize `loading="lazy"` on all below-the-fold images**: Utilize native browser lazy loading to defer network requests for images outside the initial viewport.* **DO implement responsive images with `srcset` and `sizes`**: Serve tailored resolutions based on screen density and viewport width to prevent mobile devices from downloading desktop-sized images.diff --git a/skills/modern-web-guidance/guides/security/sanitize-untrusted-html.md b/skills/modern-web-guidance/guides/security/sanitize-untrusted-html.mdnew file mode 100644index 0000000..a5f850e--- /dev/null+++ b/skills/modern-web-guidance/guides/security/sanitize-untrusted-html.md@@ -0,0 +1,90 @@+# Sanitizing Untrusted HTML++Safely displaying user-generated HTML is a common security challenge. The native **Sanitizer API** provides a built-in, browser-optimized way to strip dangerous content (like `<script>` tags or `on*` attributes) before it reaches the DOM.++MANDATORY: Do not rely solely on client-side sanitization for user-generated content. Always sanitize content on the server. Make sure that the server and client sanitization rules do not conflict.++## 1. Safely Inserting HTML with `setHTML()`++The primary way to use the Sanitizer API is through the `setHTML()` method on any `Element`. This method handles parsing, sanitization and insertion in a single step, ensuring that content is sanitized specifically for the context in which it will be inserted.++```javascript+const untrustedHTML = `+ <p>Hello!</p>+ <script>alert('XSS')</script>+ <img src="x" onerror="alert('XSS')">+ <div onclick="doBadThing()">Click me</div>+`;++const container = document.getElementById('output');++// Sanitize and insert in one call+// Default behavior strips scripts and event handlers+container.setHTML(untrustedHTML);+```++## 2. Using Custom Sanitizer Configurations++You can customize the sanitization rules by creating a `Sanitizer` instance. This allows you to define exactly which elements and attributes are permitted for your specific use case.++When using `Element.setHTML()` and `Document.parseHTML()`, the default `Sanitizer` settings remove all XSS-unsafe elements and attributes. You can not make a more permissive `Sanitizer` that allows those elements, but you can further restrict what is allowed.+++```javascript+// Define a restrictive configuration that only allows the specified elements and attributes.+const config = {+ elements: ["p", "b", "i", "strong", "em"],+ attributes: ["class"],+ replaceWithChildrenElements: ['div']+};++const mySanitizer = new Sanitizer(config);++// Apply custom sanitization+container.setHTML(untrustedHTML, { sanitizer: mySanitizer });+```++If you need a more permissive `Sanitizer` that allows some XSS-unsafe elements or attributes, you can use a custom Sanitizer with `Element.setHTMLUnsafe()` and `Document.parseHTMLUnsafe()`.++## 3. Parsing User Input with `Document.parseHTML()`++If you need to parse untrusted HTML without immediately inserting it into the live DOM, use `Document.parseHTML()`. This method returns a `Document` that has been sanitized according to default or custom rules.++This can be used for sanitizing user content before sending it to a server.++```javascript+const rawHTML = '<p>Hello <script>console.log("bad")</script></p>';++const doc = Document.parseHTML(rawHTML);+// doc.body now contains the sanitized nodes: <p>Hello </p>+console.log(doc.body.innerHTML);+```++## Fallbacks & browser support for Sanitizer API++Sanitizer API has limited availability.+Supported by: Chrome 146 (Mar 2026), Edge 146 (Mar 2026), and Firefox 148 (Feb 2026).+Unsupported in: Safari.++If the native Sanitizer API is not available in your target browsers, you MUST use a library like **DOMPurify** to ensure security. You must also apply a configuration via DOMPurify's API to match the Sanitizer API.++```javascript+function safeSetHTML(el, html) {+ if (Object.hasOwn(Element.prototype, 'setHTML') && 'Sanitizer' in window) {+ const config = {+ elements: ["p", "b", "i", "strong", "em"],+ attributes: ["style"],+ replaceWithChildrenElements: ['div']+ };++ const mySanitizer = new Sanitizer(config);+ el.setHTML(html, {sanitizer: mySanitizer});+ } else {+ // Load DOMPurify only in browsers that do not support Element.setHTML(). Match configuration.+ el.innerHTML = DOMPurify.sanitize(html, {+ ALLOWED_TAGS: ["p", "b", "i", "strong", "em"],+ ALLOWED_ATTR: ["style"]+ });+ }+}+```diff --git a/skills/modern-web-guidance/guides/security/security.md b/skills/modern-web-guidance/guides/security/security.mdindex d30b6f2..61ece2e 100644--- a/skills/modern-web-guidance/guides/security/security.md+++ b/skills/modern-web-guidance/guides/security/security.md@@ -310,15 +310,16 @@ These carry significantly lower breakage risk than the core enforcement track. T#### Permissions Policy- **DO**: Disable unused browser features (camera, geolocation, microphone) for the page and iframes using Structured Fields syntax.+- **DO**: Disable `focus-without-user-activation` for third-party iframes to prevent focus stealing.- **DO**: When delegating features to an iframe, use the `allow` attribute in HTML *in addition* to the header.- **CAUTION**: Unintentionally blocking a delegated feature will cause silent failures in third-party widgets (like embedded video players or payment gateways). Audit third-party dependencies before blocking.```http-Permissions-Policy: camera=(), geolocation=(), microphone=()+Permissions-Policy: camera=(), geolocation=(), microphone=(), focus-without-user-activation=()``````html-<iframe src="https://trusted-video.com/player" allow="fullscreen; camera"></iframe>+<iframe src="https://trusted-video.com/player" allow="fullscreen; camera; focus-without-user-activation 'none'"></iframe>```#### Subresource Integrity (SRI)diff --git a/skills/modern-web-guidance/guides/ui-atoms/resilient-context-menus-and-nested-dropdowns.md b/skills/modern-web-guidance/guides/ui-atoms/resilient-context-menus-and-nested-dropdowns.mdindex 4424096..c2442f1 100644--- a/skills/modern-web-guidance/guides/ui-atoms/resilient-context-menus-and-nested-dropdowns.md+++ b/skills/modern-web-guidance/guides/ui-atoms/resilient-context-menus-and-nested-dropdowns.md@@ -100,7 +100,9 @@ Without a bundler, import from a CDN inside a `<script type="module">`:Alternatively, for a legacy fallback without a polyfill, use `position: fixed` and manually calculate coordinates via `getBoundingClientRect()` or rely on default positioning with `inset: auto` if that's acceptable for the use case.-Anchor positioning is not natively supported by any major browser yet.+Anchor positioning has limited availability.+Supported by: Safari 27.+Unsupported in: Chrome, Edge, and Firefox.To support browsers without anchor positioning, you must set a reasonable position. By default popovers are centered in the middle of the screen, which may work for your use case.diff --git a/skills/modern-web-guidance/guides/ui-behaviors/anchor-positioning-tab-underline.md b/skills/modern-web-guidance/guides/ui-behaviors/anchor-positioning-tab-underline.mdindex 95a0f19..44c6627 100644--- a/skills/modern-web-guidance/guides/ui-behaviors/anchor-positioning-tab-underline.md+++ b/skills/modern-web-guidance/guides/ui-behaviors/anchor-positioning-tab-underline.md@@ -83,7 +83,9 @@ This is only a visual indicator, and must not be a replacement for setting the a## Fallback strategies-Anchor positioning is not natively supported by any major browser yet.+Anchor positioning has limited availability.+Supported by: Safari 27.+Unsupported in: Chrome, Edge, and Firefox.If anchor positioning is not supported in the browser, use a `border-bottom` to add an underline. It will not be animated.diff --git a/skills/modern-web-guidance/guides/ui-behaviors/interest-triggered-tooltips.md b/skills/modern-web-guidance/guides/ui-behaviors/interest-triggered-tooltips.mdindex fd2b0ca..eb0c51b 100644--- a/skills/modern-web-guidance/guides/ui-behaviors/interest-triggered-tooltips.md+++ b/skills/modern-web-guidance/guides/ui-behaviors/interest-triggered-tooltips.md@@ -132,7 +132,9 @@ Unsupported in: Safari.The `popover-polyfill` does not polyfill the hint behavior in browsers that support `popover` but not `popover="hint"`. For those browsers, a tooltip opened via focus may stay open when a second tooltip opened via hover.-Anchor positioning is not natively supported by any major browser yet.+Anchor positioning has limited availability.+Supported by: Safari 27.+Unsupported in: Chrome, Edge, and Firefox.**MANDATORY:** To support browsers without anchor positioning, you MUST use the `@oddbird/css-anchor-positioning` polyfill. It does not support implicit anchors, so you MUST add anchor names to the trigger. Additionally, `position-area` is not supported on popovers by the polyfill, so you MUST use `anchor()` on the desired insets.diff --git a/skills/modern-web-guidance/guides/ui-components/persistent-app-tours.md b/skills/modern-web-guidance/guides/ui-components/persistent-app-tours.mdindex 3d6d8fa..9096877 100644--- a/skills/modern-web-guidance/guides/ui-components/persistent-app-tours.md+++ b/skills/modern-web-guidance/guides/ui-components/persistent-app-tours.md@@ -94,7 +94,9 @@ Alternatively, for a legacy fallback without a polyfill, use `position: fixed` a#### anchor-positioning-Anchor positioning is not natively supported by any major browser yet.+Anchor positioning has limited availability.+Supported by: Safari 27.+Unsupported in: Chrome, Edge, and Firefox.To support browsers without anchor positioning, you can choose between using a polyfill or a pure CSS fallback.diff --git a/skills/modern-web-guidance/guides/ui-components/progress-ring.md b/skills/modern-web-guidance/guides/ui-components/progress-ring.mdindex 417891b..a60f3c1 100644--- a/skills/modern-web-guidance/guides/ui-components/progress-ring.md+++ b/skills/modern-web-guidance/guides/ui-components/progress-ring.md@@ -162,7 +162,9 @@ For browsers that don't yet support `background-clip: border-area`, fall back to}```-attr() is not natively supported by any major browser yet.+attr() has limited availability.+Supported by: Chrome 133 (Feb 2025), Edge 133 (Feb 2025), and Firefox 155.+Unsupported in: Safari.For browsers that don't support the `attr()` CSS function for any property, use a `MutationObserver` to automatically sync the `value` attribute to the `--value` custom property.diff --git a/skills/modern-web-guidance/guides/visual-design/contrast-color.md b/skills/modern-web-guidance/guides/visual-design/contrast-color.mdnew file mode 100644index 0000000..8218cf1--- /dev/null+++ b/skills/modern-web-guidance/guides/visual-design/contrast-color.md@@ -0,0 +1,187 @@+# Ensure text readability with dynamic background colors++When building reusable UI components (like badges or buttons) or supporting dynamic themes, ensuring text is readable against an unpredictable background color can be challenging. The `contrast-color()` CSS function resolves to `black` or `white`, maximizing the contrast ratio against the specified background color.++## Determine optimal text color++When an element has a variable or dynamically injected background color, you can rely on the browser to compute the safest text color.++MANDATORY: Set the `color` property using the `contrast-color()` function, passing the background color (or its custom property) as the argument.++```css+.badge {+ /* Define the background color as a custom property */+ --badge-bg: #e02424;+ background-color: var(--badge-bg);+ /* MANDATORY: Dynamic contrasting color */+ color: contrast-color(var(--badge-bg));+}+```++DO NOT: Use `contrast-color()` for `background-color`. It is specifically designed for foreground colors (like text or borders) to contrast against a given background color.++## Integrate with theming++Because `contrast-color()` accepts any valid `<color>` value, including CSS custom properties, it is especially powerful within design systems. By centralizing your background themes as variables, you ensure that foreground content automatically updates its contrast whenever the theme shifts, even to user-specified colors.++DO: Reference shared background variables inside `contrast-color()` to guarantee synchronization across your application.++```css+.theme-card {+ background-color: var(--theme-surface-color);+ color: contrast-color(var(--theme-surface-color));+}++.theme-container[data-theme="light"] {+ --theme-surface-color: #f4f4f4;+}+.theme-container[data-theme="dark"] {+ --theme-surface-color: #1a1a1a;+}+.theme-container[data-theme="custom"] {+ --theme-surface-color: var(--user-custom-theme);+}+```++DO NOT: Hard-code a separate text color for each interaction state when the background is dynamic. Doing so reintroduces the very mismatch `contrast-color()` exists to prevent.++## Fallback strategies++Baseline status for contrast-color(): Newly available. It's been Baseline since 2026-04-10.+Supported by: Chrome 147 (Apr 2026), Edge 147 (Apr 2026), Firefox 146 (Dec 2025), and Safari 26 (Sep 2025).++To support browsers without `contrast-color()`, you must provide a fallback. If the background color is known and fixed, use a hard-coded contrasting color. For dynamic backgrounds where the color is unknown, choose a strategy from the table below based on your UI requirements and browser support targets.++| Strategy | Best For... | Considerations |+| :--- | :--- | :--- |+| **Relative Color Syntax** | Automated, high-quality CSS-only contrast calculation. | Highest quality CSS-only fallback. |+| **Text Shadow** | Quick readability boost on any background. | Can look "dirty" or "glowy"; may not fit all designs. |+| **Text Stroke** | Preserving font weight while ensuring edge contrast. | Use `paint-order` to avoid thinning letterforms, if available. |+| **Translucent Overlay** | Ensuring a minimum contrast area behind the text. | Changes the look of the background color under the text, requires a separate text element. |+| **SVG Filters** | Reactive contrast that updates as the background changes. | Requires a separate text element; hacky implementation. |++### Recommended: Relative Color Syntax (RCS)++For browsers that support it, RCS provides the most robust automated fallback for dynamic colors.++Baseline status for Relative colors: Newly available. It's been Baseline since 2024-09-16.+Supported by: Chrome 125 (May 2024), Edge 125 (May 2024), Firefox 128 (Jul 2024), and Safari 18 (Sep 2024).++```css+@supports (color: oklch(from red l c h)) {+ .badge {+ /* Highest threshold that passes WCAG. Higher values may be more legible. */+ --threshold: 0.623;+ --l: max(0, sign(var(--threshold) - l));+ color: oklch(from var(--badge-bg) var(--l) 0 h);+ }+}++@supports (color: contrast-color(red)) {+ .badge {+ color: contrast-color(var(--badge-bg));+ }+}+```++### Alternative CSS Fallbacks++DO: Select the fallback that best matches your design constraints if RCS is not sufficient or supported.++#### Option 1: Text Stroke++Baseline status for Text stroke and fill (compatibility prefixes): Widely available. It's been Baseline since 2017-04-05.+Supported by: Chrome 4 (Jan 2010), Edge 15 (Apr 2017), Firefox 49 (Sep 2016), Safari 3 (Oct 2007), and Safari iOS 2 (Jul 2008).++```css+.badge--stroke {+ -webkit-text-stroke: 4px black;+}+```++#### Option 2: Text Stroke with `paint-order` to preserve letterforms++Baseline status for paint-order: Newly available. It's been Baseline since 2024-03-22.+Supported by: Chrome 123 (Mar 2024), Edge 123 (Mar 2024), Firefox ≤66, and Safari ≤12.++```css+.badge--stroke {+ -webkit-text-stroke: 4px black;+ paint-order: stroke fill;+}+```++#### Option 3: Translucent background overlay++```css+.badge--overlay {+ position: relative;+ color: #fff;+ overflow: hidden;+}+.badge--overlay::before {+ content: "";+ position: absolute;+ inset: 0;+ background-color: rgb(0 0 0 / 0.4);+ z-index: 0;+}+.badge--overlay span {+ position: relative;+ z-index: 1;+}+```++#### Option 4: Text Shadow++```css+.badge--shadow {+ text-shadow: 0 1px 3px rgb(0 0 0 / 0.8);+}+```++#### Option 5: SVG Filters++Baseline status for SVG filters: Widely available. It's been Baseline since 2015-07-29.+Supported by: Chrome 5 (May 2010), Edge 12 (Jul 2015), Firefox 3 (Jun 2008), and Safari 6 (Jul 2012).++1. Load this SVG filter definition. It must be added directly to the HTML document if you need to support Safari versions affected by [this WebKit bug](https://bugs.webkit.org/show_bug.cgi?id=320118), which prevents external and data url references for filters. Otherwise, it should be loaded from an external file, either an SVG file or inlined in CSS.++```html+<!-- Technique from https://miunau.com/posts/dynamic-text-contrast-in-css/ -->+<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="0" style="display: none;">+ <defs>+ <filter id="contrast-filter" color-interpolation-filters="sRGB">+ <feColorMatrix type="matrix"+ values="0.2126 0.7152 0.0722 0 0+ 0.2126 0.7152 0.0722 0 0+ 0.2126 0.7152 0.0722 0 0+ 0 0 0 1 0"/>+ <feMorphology operator="dilate" radius="2"/>+ <feComponentTransfer>+ <feFuncR type="linear" slope="-255" intercept="128"/>+ <feFuncG type="linear" slope="-255" intercept="128"/>+ <feFuncB type="linear" slope="-255" intercept="128"/>+ </feComponentTransfer>+ <feComposite operator="in" in2="SourceGraphic"/>+ </filter>+ </defs>+</svg>+```++2. Wrap the text in a `<span>`.++```html+<div class="badge--svg">+ <span>Badge content</span>+</div>+```++3. Apply the filter to the `<span>`.++```css+.badge--svg span{+ color: var(--badge-bg);+ filter: url(#contrast-filter);+}+```