<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Neo Tang on Medium]]></title>
        <description><![CDATA[Stories by Neo Tang on Medium]]></description>
        <link>https://medium.com/@tangweikun123?source=rss-e6d5652b0e87------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*e1gh3BkJVh9yOcRe.</url>
            <title>Stories by Neo Tang on Medium</title>
            <link>https://medium.com/@tangweikun123?source=rss-e6d5652b0e87------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 21:30:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tangweikun123/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Best fullscreen countdown timers for presentations]]></title>
            <link>https://medium.com/@tangweikun123/best-fullscreen-countdown-timers-for-presentations-10920ae49825?source=rss-e6d5652b0e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/10920ae49825</guid>
            <category><![CDATA[presentations]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Neo Tang]]></dc:creator>
            <pubDate>Sat, 28 Nov 2026 18:26:09 GMT</pubDate>
            <atom:updated>2026-11-28T18:26:09.649Z</atom:updated>
            <content:encoded><![CDATA[<p>A presentation countdown timer is a large, readable clock you can project or screen-share: set a duration, start it, and make the digits fill the display. That is a different job from a phone clock app, a meeting-agenda tool, or a kitchen timer with no fullscreen mode. This comparison covers official web timers documented for that on-screen countdown job.</p><p>This article was written with the assistance of AI.</p><p>It is not a hands-on test of every projector, and it does not name an overall winner.</p><p>The same checks apply: how you set duration; fullscreen support; extras actually published (repeat, shareable URLs, sound); accounts and price; and whether the countdown runs locally in the browser.</p><h3>Big Timer (bigtimer.net)</h3><p><a href="https://www.bigtimer.net/">Big Timer</a> is a long-running web timer whose official page describes it as “a fullscreen countdown timer for workshops, presentations and meetings in your browser.” The public homepage, retrieved as a largely JavaScript-driven app, did not expose a full static feature list in this research pass — additional controls sometimes mentioned in unofficial write-ups are <strong>not</strong> treated as facts here. What can be said from the official page is the purpose (fullscreen countdown for talks and meetings) and that JavaScript must be enabled.</p><p><strong>Best fit:</strong> the well-known namesake for this exact “big digits on a workshop screen” use case. <strong>Trade-off:</strong> do not assume a specific control (repeat, keyboard shortcuts, sound) unless you confirm it in the live app; this article does not invent that list.</p><h3>Online Stopwatch — fullscreen timer</h3><p><a href="https://www.online-stopwatch.com/timer/full-screen/">Online Stopwatch’s fullscreen timer</a> is part of a long-standing classroom-and-meeting timer site. The official fullscreen timer URL is the one to use when you want a duration, a start control, and a fullscreen display from that vendor. The same site also publishes animated “classroom timer” variants; those are optional, more decorative paths, not required for a plain countdown.</p><p>Pricing, ads, and any account features should be confirmed on the live site. A detailed privacy policy was not part of the pages captured for this draft — unknown.</p><p><strong>Best fit:</strong> teachers and facilitators who already use the Online Stopwatch suite and want a dedicated fullscreen countdown URL. <strong>Trade-off:</strong> the broader site includes many novelty timers; pick the plain fullscreen URL if you only wanted digits.</p><h3>timeanddate.com Timer</h3><p><a href="https://www.timeanddate.com/timer/">timeanddate.com’s Timer</a> is a countdown (and related timing) page from a long-established time-reference site. It is a solid, official option when you want a timer from a general-purpose time publisher rather than a single-purpose “big digits” microsite. The exact fullscreen, repeat, and sound controls should be verified on the live page; this article does not list features that were not captured from a full live walkthrough.</p><p><strong>Best fit:</strong> people who already trust timeanddate.com for clocks and world times and want a timer in the same family. <strong>Trade-off:</strong> it may be more “utility site” than “stage typography”; check the current UI if typography and fullscreen hide-the-chrome behavior are your main needs.</p><h3>Fullscreen countdown timer</h3><p>The <a href="https://www.uwarp.design/big-timer">fullscreen countdown timer</a> on Uwarp is a free browser clock that the product page describes as inspired by bigtimer.net. Documented features include a high-contrast fullscreen display, start/pause/reset, +/− one-minute adjustments, a repeat mode, and shareable URL parameters (the page gives an example: ?minutes=11&amp;repeat=true). No account is required. The countdown is described as client-side (a one-second interval) using the browser Fullscreen API. Digits use Roboto Slab.</p><p><strong>Best fit:</strong> a documented, no-account presentation timer with preset links and repeat, when you want those controls stated on the page before you present. <strong>Trade-off:</strong> it is intentionally in the same category as bigtimer.net; confirm fullscreen on your actual browser and display during rehearsal, as the page itself recommends.</p><h3>Choose by what you can document in rehearsal</h3><p>If you already rely on the original Big Timer site, use it — and click through the live controls rather than trusting a third-party feature list. If you want a long-running classroom vendor, Online Stopwatch’s fullscreen timer URL is the official path. If you want a timer from a major time-reference site, use timeanddate.com. If you want a page that publishes repeat and URL presets up front, the Uwarp timer documents those.</p><p>Rehearse fullscreen with the same laptop, browser, and projector or screen-share you will use on the day. A timer that looks large in a window can still leave chrome, notifications, or a low-contrast tab visible on stage.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10920ae49825" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best tools for finding official iOS app icons]]></title>
            <link>https://medium.com/@tangweikun123/best-tools-for-finding-official-ios-app-icons-eed1f8c195fa?source=rss-e6d5652b0e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/eed1f8c195fa</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[mobile-apps]]></category>
            <dc:creator><![CDATA[Neo Tang]]></dc:creator>
            <pubDate>Fri, 27 Nov 2026 18:32:32 GMT</pubDate>
            <atom:updated>2026-11-27T18:32:32.116Z</atom:updated>
            <content:encoded><![CDATA[<p>This comparison is about one job: finding the official iOS App Store icon for an app, usually as a high-resolution PNG, for mockups or research. It is not a generic logo-search site, not a “make me an icon” generator, and not a brand-SVG pack such as Simple Icons. Those are useful, but they are a different task.</p><p>This article was written with the assistance of AI.</p><p>It is also not legal advice. Official App Store artwork is publisher property. Apple publishes <a href="https://developer.apple.com/app-store/marketing/guidelines/">App Store marketing guidelines</a> for how storefront imagery may be used. Follow those guidelines and the app developer’s terms before any public or commercial reuse.</p><p>The same checks apply: where the icons come from; region or storefront controls; format and typical size; whether you need an account; and what happens to your search queries.</p><h3>The App Store itself</h3><p>The <a href="https://apps.apple.com/">Apple App Store</a> (and the App Store app on a device) is the primary official source. You search for the app, open the listing, and see the current icon for that storefront. That path has no third-party aggregator in the middle, and it is the right check when you need to confirm the live listing, the publisher name, or a regional variant.</p><p>What it does not give you is a dedicated “download a 1024×1024 PNG” button in the public storefront UI. For a clean file, people often use a helper that reads Apple’s published artwork URLs.</p><p><strong>Best fit:</strong> verifying the current official listing and publisher. <strong>Trade-off:</strong> awkward as a bulk download or design-handoff step.</p><h3>iTunes Search API (Apple)</h3><p>Apple’s documented <a href="https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/iTuneSearchAPI/index.html">iTunes Search API</a> is the official lookup interface many icon finders use. It is a REST API for searching App Store (and other) content, and responses include official artwork URLs and metadata. It is not a visual gallery by itself: you or a small tool query it, then download the artwork URL it returns.</p><p>This is the correct source of truth for “is this really storefront art?” when a website claims to search the App Store. Rate limits, terms, and available fields are defined by Apple, not by a third-party wrapper.</p><p><strong>Best fit:</strong> developers who want official artwork URLs in a scripted workflow. <strong>Trade-off:</strong> no friendly UI; you must stay within Apple’s terms.</p><h3>iTunes Artwork Finder (Ben Dodson)</h3><p><a href="https://bendodson.com/projects/itunes-artwork-finder/">Ben Dodson’s iTunes Artwork Finder</a> is a well-known web front end for this job. The project page and <a href="https://github.com/bendodson/itunes-artwork-finder/">source repository</a> describe searching Apple’s catalog, including an App (iPhone or Universal) entity, and retrieving official artwork. The tool has been a long-standing public project for grabbing storefront images rather than screenshots you crop yourself.</p><p>The live project page now marks the finder as deprecated, noting that Apple is phasing out iTunes and that results can be unpredictable. Any current file-size, rate-limit, or privacy details should be read there. The finder is a convenience UI over Apple’s data; it does not replace Apple’s marketing rules.</p><p><strong>Best fit:</strong> a dedicated, established web form when you want official App Store artwork without writing the API call yourself. <strong>Trade-off:</strong> it is a third-party page in front of Apple’s API; still confirm the listing when the icon matters legally or commercially.</p><h3>App icon finder</h3><p>The <a href="https://www.uwarp.design/logo-hunter">app icon finder</a> on Uwarp (the product is also called Logo Hunter on the page) searches iOS App Store icons by name, can filter by country storefront, and previews results with app and developer names. The product page says icons are fetched from the official iTunes / App Store search API, that you can download PNG or copy the image, and that no account is required. It also states that search queries are sent to the App Store API and are not stored as accounts.</p><p>That last point is a privacy distinction worth keeping clear: the query leaves your browser and goes to Apple’s API. It is not a fully offline lookup.</p><p><strong>Best fit:</strong> a simple regional App Store icon search in the browser, with PNG download, when you do not want to write an API call. <strong>Trade-off:</strong> iOS App Store artwork only (as documented); reuse is still governed by Apple’s guidelines and the app owner’s rights.</p><h3>Choose by how official you need the path to be</h3><p>To confirm a listing, use the App Store. To script official artwork URLs, use Apple’s Search API. For a mature helper UI, Dodson’s Artwork Finder is the established public tool. For a regional search-and-download page, the Uwarp app icon finder is documented against the same API.</p><p>None of these tools grants a right to put another company’s icon in a shipping product or an ad. When in doubt, use the listing for research and follow the marketing guidelines for any public layout.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eed1f8c195fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Forcing Design Exports Through the Server — Use the File System Access API]]></title>
            <link>https://medium.com/@tangweikun123/stop-forcing-design-exports-through-the-server-use-the-file-system-access-api-de15f404c5d2?source=rss-e6d5652b0e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/de15f404c5d2</guid>
            <dc:creator><![CDATA[Neo Tang]]></dc:creator>
            <pubDate>Fri, 27 Nov 2026 16:42:15 GMT</pubDate>
            <atom:updated>2026-11-27T16:42:15.060Z</atom:updated>
            <content:encoded><![CDATA[<p><em>showSaveFilePicker writes SVG, PNG, and JSON straight to disk after a user gesture. As of 27 November 2026 this is still Limited availability: Chrome and Edge shipped the pickers in version 86, Chrome Android followed in 132 on 14 January 2025, and Firefox and Safari do not support them.</em></p><p>I used to treat “Export” as a round trip: serialize the canvas, POST a blob to an API, wait for a signed URL, then hope the download tab did not get blocked. For a local design export that never needed a server, that path is theater. The browser can ask the user where to put the file and write bytes there.</p><p>This article was written with the assistance of AI.</p><p>The File System Access API is how I ship that path now — especially <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/showSaveFilePicker">showSaveFilePicker()</a> for SVG, PNG, and JSON design documents. Chromium has had it for years. Firefox and Safari still do not expose the picker surface, so I always keep a classic &lt;a download&gt; escape hatch.</p><p>This is nurture, not a product pitch — just the local export pattern that stopped me from inventing another upload endpoint.</p><p>As of 27 November 2026, File system access remains Limited availability. I do not call it Baseline Newly or Widely available. The <a href="https://web-platform-dx.github.io/web-features-explorer/features/file-system-access/">web-features explorer</a> and the <a href="https://api.webstatus.dev/v1/features/file-system-access">webstatus.dev API</a> both report baseline.status as limited. Chrome 86 shipped on 20 October 2020, Edge 86 on 9 October 2020, and Chrome Android 132 on 14 January 2025. Firefox and Safari are listed as not supported. The explorer also records a negative standards position from Mozilla and an oppose position from Apple, with security as the stated concern, and notes that the feature is unlikely to become Baseline in its current form. I leave that record alone.</p><h3>What the pickers actually give you</h3><p>Three entry points matter for design tooling. MDN documents them as extensions on Window, under the <a href="https://developer.mozilla.org/en-US/docs/Web/API/File_System_API">File System API</a> overview:</p><ul><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/showOpenFilePicker">showOpenFilePicker()</a> — load a project JSON or an SVG the user already has.</li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/showSaveFilePicker">showSaveFilePicker()</a> — write an export and optionally remember the handle for &quot;Save&quot; versus &quot;Save as.&quot;</li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/showDirectoryPicker">showDirectoryPicker()</a> — batch-export a folder of frames or assets when the user consents to a directory.</li></ul><p>Chrome’s <a href="https://developer.chrome.com/docs/capabilities/web-apis/file-system-access">File System Access API guide</a> is the walkthrough I keep next to those pages. All of the pickers require a <a href="https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts">secure context</a> (HTTPS or localhost) and a user gesture. Call them from a click or a key handler, not from useEffect on mount. Chrome&#39;s guide is blunt about a common footgun: if you encode the file first and only then call showSaveFilePicker(), the user gesture may already have expired, and the picker throws a SecurityError. Get the handle first, then encode and write.</p><p>If the user cancels, the promise rejects with an AbortError. Treat that as a normal exit, not a toastable failure.</p><p>This is also not the Origin Private File System. OPFS is a hidden, origin-scoped sandbox. The pickers here write a real file the user chose.</p><h3>Save SVG, PNG, and JSON without a server</h3><p>Here is the shape I use for a single-file export. Feature-detect first, then fall back.</p><pre>async function saveDesignFile({ suggestedName, mimeType, extension, bytes }) {<br>  if (typeof window.showSaveFilePicker === &quot;function&quot;) {<br>    try {<br>      const handle = await window.showSaveFilePicker({<br>        suggestedName,<br>        types: [<br>          {<br>            description: &quot;Design export&quot;,<br>            accept: { [mimeType]: [extension] },<br>          },<br>        ],<br>      });<br>      const writable = await handle.createWritable();<br>      await writable.write(bytes);<br>      await writable.close();<br>      return { mode: &quot;fsa&quot;, handle };<br>    } catch (err) {<br>      if (err?.name === &quot;AbortError&quot;) return { mode: &quot;cancelled&quot; };<br>      throw err;<br>    }<br>  }</pre><pre>  const blob = new Blob([bytes], { type: mimeType });<br>  const url = URL.createObjectURL(blob);<br>  const a = document.createElement(&quot;a&quot;);<br>  a.href = url;<br>  a.download = suggestedName;<br>  a.rel = &quot;noopener&quot;;<br>  document.body.appendChild(a);<br>  a.click();<br>  a.remove();<br>  URL.revokeObjectURL(url);<br>  return { mode: &quot;download&quot; };<br>}</pre><pre>await saveDesignFile({<br>  suggestedName: &quot;poster.svg&quot;,<br>  mimeType: &quot;image/svg+xml&quot;,<br>  extension: &quot;.svg&quot;,<br>  bytes: new TextEncoder().encode(svgMarkup),<br>});</pre><pre>await saveDesignFile({<br>  suggestedName: &quot;poster.png&quot;,<br>  mimeType: &quot;image/png&quot;,<br>  extension: &quot;.png&quot;,<br>  bytes: pngArrayBuffer, // from canvas.toBlob → arrayBuffer<br>});</pre><pre>await saveDesignFile({<br>  suggestedName: &quot;poster.design.json&quot;,<br>  mimeType: &quot;application/json&quot;,<br>  extension: &quot;.json&quot;,<br>  bytes: new TextEncoder().encode(JSON.stringify(doc, null, 2)),<br>});</pre><p>For PNG I usually go canvas.toBlob first, then blob.arrayBuffer(), so the writable gets binary data instead of a base64 string I would have uploaded yesterday.</p><p>The HTML <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#download">download attribute</a> on the fallback &lt;a&gt; is enough for same-origin blob URLs. Cross-origin remote URLs still ignore download in many browsers — another reason a local blob export wins.</p><h3>Re-save the same handle, and export a folder of frames</h3><p>“Save” should not re-prompt every time once the user picked a location. Keep the FileSystemFileHandle in memory, or store it in IndexedDB — MDN notes that FileSystemHandle objects can be serialized there — and call createWritable again.</p><pre>async function openDesignJson() {<br>  const [handle] = await window.showOpenFilePicker({<br>    multiple: false,<br>    types: [<br>      {<br>        description: &quot;Design document&quot;,<br>        accept: { &quot;application/json&quot;: [&quot;.json&quot;] },<br>      },<br>    ],<br>  });<br>  const file = await handle.getFile();<br>  const text = await file.text();<br>  return { handle, doc: JSON.parse(text) };<br>}</pre><pre>async function saveWithHandle(handle, bytes) {<br>  const opts = { mode: &quot;readwrite&quot; };<br>  if ((await handle.queryPermission(opts)) !== &quot;granted&quot;) {<br>    if ((await handle.requestPermission(opts)) !== &quot;granted&quot;) {<br>      throw new Error(&quot;Write permission denied&quot;);<br>    }<br>  }<br>  const writable = await handle.createWritable();<br>  await writable.write(bytes);<br>  await writable.close();<br>}</pre><p>Permissions are sticky for the origin while the handle is alive, but they can drop after navigation or browser policy. Always queryPermission / requestPermission before a quiet autosave so you do not surprise the user with a silent failure.</p><p>When I export “all artboards,” I ask once for a folder:</p><pre>async function exportFramesToFolder(frames) {<br>  const dir = await window.showDirectoryPicker({ mode: &quot;readwrite&quot; });<br>  for (const frame of frames) {<br>    const fileHandle = await dir.getFileHandle(`${frame.id}.svg`, {<br>      create: true,<br>    });<br>    const writable = await fileHandle.createWritable();<br>    await writable.write(frame.svgText);<br>    await writable.close();<br>  }<br>}</pre><p>That is the difference between twenty download clicks and one consent dialog. Still gated on user activation, still Chromium-first.</p><h3>Limited availability, and an honest download fallback</h3><p>The contract is feature detection, not a user-agent string:</p><pre>const canUseFsa = typeof window.showSaveFilePicker === &quot;function&quot;;</pre><p>UI copy should match: “Save to disk…” when the picker is present, “Download…” when it is not. Do not promise a native save dialog you cannot open. I do not polyfill the pickers with a fake modal — that lies about OS integration and usually fails accessibility harder than a normal download.</p><p>Rechecked on 27 November 2026, Firefox and Safari still do not ship showSaveFilePicker, showOpenFilePicker, or showDirectoryPicker. Chrome Android has, since 14 January 2025. I still ship the &lt;a download&gt; path for everyone else, and I do not invent a Baseline date for this API.</p><h3>Accessibility of the trigger, not the OS dialog</h3><p>The system file dialog is the browser’s job. Your job is the control that opens it.</p><ul><li>Use a real &lt;button type=&quot;button&quot;&gt; with visible text: &quot;Export SVG&quot;, not an icon-only glyph with a vague title.</li><li>If you must use an icon, give it an accessible name (aria-label or visually hidden text) that says the format.</li><li>Do not trap focus in a custom “export modal” that only exists to wrap the same picker call — one click should call showSaveFilePicker.</li><li>Announce outcomes with a polite live region: “Saved poster.svg” or “Download started” so screen reader users get confirmation after the OS dialog closes.</li></ul><pre>&lt;button type=&quot;button&quot; id=&quot;export-svg&quot;&gt;Export SVG&lt;/button&gt;<br>&lt;p id=&quot;export-status&quot; role=&quot;status&quot; aria-live=&quot;polite&quot;&gt;&lt;/p&gt;</pre><pre>const status = document.getElementById(&quot;export-status&quot;);<br>document.getElementById(&quot;export-svg&quot;).addEventListener(&quot;click&quot;, async () =&gt; {<br>  status.textContent = &quot;&quot;;<br>  const result = await saveDesignFile({ /* suggestedName, mimeType, extension, bytes */ });<br>  if (result.mode === &quot;cancelled&quot;) return;<br>  status.textContent =<br>    result.mode === &quot;fsa&quot; ? &quot;Saved poster.svg&quot; : &quot;Download started for poster.svg&quot;;<br>});</pre><h3>What I actually ship</h3><p>I stopped uploading design bytes just to download them. I stopped assuming every browser has the File System Access pickers. I stopped shipping icon-only export buttons that fail the name check. And I stopped treating AbortError as an exception worth paging myself for.</p><p>The official record, rechecked on 27 November 2026, is still Limited availability. Until Firefox or Safari ship the pickers — and the explorer currently says that is unlikely in this form — the smallest honest stack is showSaveFilePicker where it exists, and an &lt;a download&gt; fallback where it does not. Local design exports should feel local, including in the browsers that will only ever get the fallback.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de15f404c5d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Hardcoding Which Token to Read — Firefox 161 Nests var(), attr(), and env()]]></title>
            <link>https://medium.com/@tangweikun123/stop-hardcoding-which-token-to-read-firefox-161-nests-var-attr-and-env-d560a5afdd12?source=rss-e6d5652b0e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/d560a5afdd12</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[web-design]]></category>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Neo Tang]]></dc:creator>
            <pubDate>Fri, 27 Nov 2026 14:16:00 GMT</pubDate>
            <atom:updated>2026-11-27T14:16:00.707Z</atom:updated>
            <content:encoded><![CDATA[<p><em>On 24 November 2026, </em><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/161"><em>Firefox 161</em></a><em> shipped a CSS change that is easy to miss next to the same release’s Typed OM and </em><em>random() notes: </em><em>var(), </em><em>attr(), and </em><em>env() now accept nested functions in their first parameter. The Stable MDN notes give two official examples: </em><em>var(attr(data-theme-prop type())) and </em><em>env(var(--safe-area-block-start)). The </em><a href="https://www.firefox.com/en-US/firefox/161.0/releasenotes/"><em>consumer release notes</em></a><em> use the same idea: “nested arbitrary substitution functions in the primary parameters.” If you have been mapping </em><em>data-theme values to custom-property names in JavaScript, this is the reason to try that lookup in CSS — in Firefox 161. As of 27 November 2026, I am not treating it as Baseline, and I am not deleting the fallback.</em></p><p>That first-parameter nesting is not the fallback you already use. var(--accent, var(--accent-fallback, navy)) has been valid for years. Firefox 161 adds the ability for the <em>name</em> itself to come from another substitution function.</p><h4>What actually shipped on 24 November</h4><p>The <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/161">MDN Firefox 161 developer notes</a>, labeled Stable, are explicit: the var(), attr(), and env() functions now accept nested functions in their first parameter, and they cite <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=2080511">Firefox bug 2080511</a>. That bug implements the CSS Values argument-grammar work: the first parameter can resolve at substitution time, so the name no longer has to be a literal identifier at parse time.</p><p>Do not confuse this with the Baseline badges on the functions themselves. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/var">MDN’s </a><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/var">var() page</a> still marks the long-standing function as Widely available since April 2017. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/env">env()</a> is Widely available, with some parts varying. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/attr">attr()</a> is Widely available for the classic content use; MDN is clear that other properties, and the modern type() syntax, do not have the same support everywhere. Those badges do not document first-parameter nesting.</p><p>As of 27 November 2026 I have not found a Baseline Newly available or Widely available record for this capability. <a href="https://bcd.developer.mozilla.org/bcd/api/v0/current/css.types.var.json">MDN browser-compat data</a> for css.types.var, dataset 8.1.11 (timestamp 2026-11-27T00:01:32.268Z), still describes basic var() only. I also did not find a dedicated webstatus.dev feature, or a Chrome or Safari release note, confirming the same first-parameter nesting in those engines. That dataset lists Chrome 158 as current (17 November 2026) and Chrome 159 as beta, scheduled for Stable on 8 December 2026. A separate Chrome Status entry, <a href="https://chromestatus.com/feature/6212939656462336">Short-circuiting var() and attr()</a>, is still Proposed and is a different change: it skips cycle checks in a fallback that is not taken. I am not treating that proposal as a ship.</p><p>Firefox 161 also shipped CSS Typed OM and CSS random(), already covered separately; this piece stays on nested substitutions.</p><h4>Let a data attribute name the token</h4><p>The documented form is a card that carries the custom-property name in an attribute, then a rule that reads that name with attr() and looks the token up with var():</p><pre>&lt;article class=&quot;card&quot; data-theme-prop=&quot;--surface-accent&quot;&gt;…&lt;/article&gt;</pre><pre>.card {<br>  background: var(--surface-default);<br>  background: var(attr(data-theme-prop type()), var(--surface-default));<br>}</pre><p>The first background is the portable declaration. Engines that cannot parse the nested form should keep that default. Firefox 161 can take the second declaration, read --surface-accent from the attribute, and substitute that token. The official notes write the inner call as attr(data-theme-prop type()); the type() matters because classic attr() returns a string, and a string is not a custom-property name. I am using the release-notes form, not inventing a different type argument.</p><p>The payoff is that a template or component prop can choose the token without a JavaScript map and a style.setProperty call. Put only a custom-property name in the attribute, and keep a fallback token when the name is missing or does not exist.</p><p>Jake Archibald’s <a href="https://random-stuff.jakearchibald.com/nested-css-functions/">Nested CSS substitution functions</a> walks through the same patterns, including var(var(…)), var(attr(…)), and attr(var(…)). I am citing it as a syntax explainer, not as a support table and not as a test I ran.</p><h4>Point env() at a tokenized name</h4><p>The other official example is env(var(--safe-area-block-start)). Instead of hardcoding env(safe-area-inset-top) in every dock or toolbar rule, you store the environment-variable name in a custom property and let env() resolve it:</p><pre>:root {<br>  --safe-area-block-start: safe-area-inset-top;<br>}</pre><pre>.dock {<br>  padding-top: 12px;<br>  padding-top: env(var(--safe-area-block-start), 12px);<br>}</pre><p>That is useful when a token or a writing-mode-aware sheet wants to decide <em>which</em> environment variable to read without rewriting every padding rule. The second declaration is the Firefox 161 path. The first declaration, and the fallback inside env(), keep a layout that still works when the nested form is ignored.</p><p>MDN’s env() page already documents the named variables — safe-area-inset-*, title-bar area, keyboard insets, and the rest — and already allows a fallback after the comma. What is new in Firefox 161 is that the name slot can come from var().</p><h4>What this is not</h4><p>It is not a new way to write fallbacks. Nested fallbacks such as var(--a, var(--b)) were already part of var(). If you only need a backup color, you do not need this ship. It is also not a Baseline event: as of 27 November 2026, the public record I can cite is the Firefox 161 ship. Until another core engine’s release notes, or a webstatus.dev feature, say otherwise, keep the preceding simple declaration.</p><p>It is not a license to build URLs from attributes. MDN’s attr() page is blunt: values that use attr() are marked as tainted, and using them as or inside a &lt;url&gt; makes the declaration invalid at computed-value time. Do not write background-image: url(https://medium.com/attr(data-icon)). That restriction is older than Firefox 161 and still applies. Modern attr() is also not a promise that the function works in every property, in every engine, the way the content form does. If you use attr(… type()) outside content, keep a fallback independently of the nesting question.</p><h4>What to change now</h4><p>If a component today reads data-theme-prop only so JavaScript can call style.setProperty or toggle a class that points at a token, Firefox 161 can do that lookup in CSS with var(attr(…)). Start with one surface or one accent. Put a plain var(--token) or a literal on the line above. Recheck Chrome, Edge, and Safari against their own release notes before you remove that line; as of 27 November 2026 I only have a confirmed ship in Firefox 161.</p><p>If a shell already stores safe-area names as tokens, env(var(--safe-area-block-start), 12px) is the documented form. Keep a non-nested padding for engines that will drop the nested declaration. Do not wait for a Baseline badge that has not been published, and do not invent one. Point teammates at the <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/161">MDN Firefox 161 notes</a> and the <a href="https://www.firefox.com/en-US/firefox/161.0/releasenotes/">consumer notes</a>. The payoff is a token name that can come from an attribute or another custom property, without a JavaScript lookup table — in the engine that just shipped it, with a fallback for everyone else.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d560a5afdd12" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Duplicating Every Theme Token — Use CSS light-dark()]]></title>
            <link>https://medium.com/@tangweikun123/stop-duplicating-every-theme-token-use-css-light-dark-7fe85c1c14e9?source=rss-e6d5652b0e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/7fe85c1c14e9</guid>
            <dc:creator><![CDATA[Neo Tang]]></dc:creator>
            <pubDate>Fri, 27 Nov 2026 13:28:57 GMT</pubDate>
            <atom:updated>2026-11-27T13:28:57.913Z</atom:updated>
            <content:encoded><![CDATA[<p>One color pair, one declaration: light-dark() follows color-scheme so you stop maintaining parallel --bg / --bg-dark blocks. As of 27 November 2026 this is Baseline Widely available: Safari 17.5 completed support on 13 May 2024, and the official high date is 13 November 2026.</p><p>I used to ship themes the hard way. Two custom-property trees — --surface and -​-surface-dark, -​-text and -​-text-dark — then a [data-theme=&quot;dark&quot;] block that reassigned every name. It worked. It also meant every new badge color got pasted twice, and someone always forgot the dark twin until QA opened the page at night.</p><p>This article was written with the assistance of AI.</p><p>CSS light-dark() is the small function that kills most of that duplication. You <em>still set color-scheme. You still own contrast. You stop maintaining two parallel token files for every pair that is really “same role, two values.”</em></p><p>This is nurture, not a product pitch — just the pattern I reach for when a theme toggle should not double the stylesheet.</p><p>As of 27 November 2026, light-dark() is Baseline Widely available. The <a href="https://web-platform-dx.github.io/web-features-explorer/features/light-dark/">web-features explorer</a> and the webstatus.dev API both record a low_date of 13 May 2024, the day Safari 17.5 shipped on desktop and iOS, and a high_date of 13 November 2026. Firefox 120 shipped on 21 November 2023, Chrome 123 on 19 March 2024, and Edge 123 on 22 March 2024. I do not invent a different Widely available date. MDN’s badge agrees; its “available across browsers since May 2024” line is the interoperable date, not the high date.</p><h4>What light-dark() actually does</h4><p>light-dark(A, B) resolves to A when the used color scheme is light, or when no preference is set, and to B when it is dark. The used scheme comes from the cascade of color-scheme on the element and its ancestors, not from a prefers-color-scheme media query you have to wrap around every pair.</p><pre>:root {<br><br>  color-scheme: light dark;<br>  --surface: light-dark(#f7f7f5, #141414);<br>  --text: light-dark(#1a1a1a, #f2f2f0);<br>  --border: light-dark(#d8d8d4, #2e2e2e);<br>}<br><br>body {<br>  background: var(--surface);<br>  color: var(--text);<br>}</pre><p>One variable. Two concrete colors. The browser picks. If the user prefers dark and your root allows both schemes, --surface is already #141414 without a second :root block.</p><p>MDN now also documents a second form that accepts two images, including gradients. That form is not what the Widely available badge is about. The explorer and the webstatus.dev API describe the color function, and MDN flags that some parts of the feature may have varying support. I keep token pairs on colors, and I feature-detect the image form if I need it:</p><pre>@supports (background-image: light-dark(url(https://medium.com/&quot;light.png&quot;), url(https://medium.com/&quot;dark.png&quot;))) {<br>  .hero {<br>    background-image: light-dark(<br>      linear-gradient(135deg, #f7f7f5, #e8e8e2),<br>      linear-gradient(45deg, #141414, #2a2a2a)<br>    );<br>  }<br>}</pre><h4>color-scheme is the switch, not a decoration</h4><p>light-dark() is useless if you never set color-scheme. Without it, many engines treat the page as light-only, and you always get the first argument. MDN is explicit: set color-scheme: light dark on :root` to enable the function for the document.</p><pre>:root {<br>  color-scheme: light dark;<br>}</pre><p>When the user flips a site toggle, flip the scheme on a root or a scoped shell — do not rewrite fifty variables:</p><pre>:root[data-theme=&quot;light&quot;] { color-scheme: light; }<br>:root[data-theme=&quot;dark&quot;]  { color-scheme: dark; }</pre><p>That</p><p>That is the whole toggle contract for token pairs expressed with light-dark() Form controls, scrollbars, and native UI chrome also follow color-scheme so you get fewer “white select on dark page” accidents for free.</p><p>The Light / Dark / System UI maps cleanly: <strong>System leaves </strong><strong>color-scheme: light dark and lets the OS decide; </strong>Light sets color-scheme: light ; <strong>Dark sets </strong><strong>color-scheme: dark Persist the choice. On boot, set the attribute before first paint if you can, so you do not flash the wrong arm. Components keep reading </strong><strong>var(--surface) they never branch on the toggle themselves.</strong></p><h4>Where a second block still earns its keep</h4><p>I do not put everything in light-dark(). Brand ramps that need five steps, charts with categorical palettes, and illustration fills often stay as separate tokens or images. The function shines for surfaces, text, borders, focus rings, and muted labels — the pairs that are truly dual-valued.</p><p>Also watch nesting. If a card forces color-scheme: light — say a print preview pane — descendants resolve light-dark() to the light arm even when the shell is dark. That is a feature when you mean it. It is a bug when a third-party widget sets scheme and your badges go pale.</p><pre>.preview-pane {<br>  color-scheme: light; /* intentional: WYSIWYG stays day-mode */<br>  background: #fff;<br>  color: #1a1a1a;<br>}</pre><p>This is also not a substitute for container style queries. Style queries answer “what custom property did the parent set?” light-dark() answers “which arm of this color pair should I use for the used scheme?” Keep them for those two jobs.</p><h4>Contrast still has a name: you</h4><p>light-dark() does not grade WCAG for you. Pair values the way you always should — check body text against surface, links against both schemes, and disabled states that often fail quietly in dark mode. I keep a tiny table in the design doc:</p><pre>Token         Light      Dark       Notes<br>--text        #1a1a1a    #f2f2f0    body<br>--text-muted  #5c5c58    #a3a39c    ≥4.5:1 on --surface<br>--accent      #0b57d0    #8ab4f8    links / focus</pre><p>If a pair cannot clear AA in both schemes, it does not belong in one light-dark() call — split it or redesign the dark arm.</p><p>When the dark arm is “same hue, different lightness,” relative color syntax can derive the mate, and I still expose the pair through light-dark() so consumers never see the formula:</p><pre>:root {<br>  color-scheme: light dark;<br>  --accent-base: oklch(0.55 0.14 250);<br>  --accent: light-dark(<br>    var(--accent-base),<br>    oklch(from var(--accent-base) 0.78 c h)<br>  );<br>}</pre><p>Tokens stay readable at the call site (`var( — accent)`). The derivation lives once next to the base.</p><h4>Fallback is now a long-tail concern</h4><p>Because the official status is Widely available, I no longer treat a light-only first declaration as required for evergreen browsers. I still use progressive enhancement if the support matrix includes Safari 17.4 and earlier, Chrome 122, or Firefox 119:</p><pre>:root {<br>  --surface: #f7f7f5;<br>}<br><br>@supports (color: light-dark(red, blue)) {<br>  :root {<br>    color-scheme: light dark;<br>    --surface: light-dark(#f7f7f5, #141414);<br>  }<br>}</pre><p>Old engines keep a sane light theme. Current engines get the pair. No [data-theme] forest is required for the common case.</p><h4>What I actually ship</h4><p>Rechecked on 27 November 2026, the webstatus.dev API reports baseline.status as widely, with low_date 13 May 2024 and high_date 13 November 2026. The explorer agrees. I leave those dates alone.</p><p>I set color-scheme: light dark on :root, I express surface, text, border, and focus as light-dark() pairs, and I flip the scheme for a site toggle instead of reassigning every token. I still check contrast in both arms. I still keep forced-scheme islands for previews. I still keep multi-stop ramps out of the function until they earn a second file. And I do not assume the Widely available badge covers light-dark() as an image.</p><p>The payoff is a theme system that grows by one declaration per role, not by a night-time mirror of the entire sheet. Your future self — the one who only meant to add a muted caption color — will not have to find two places to paste it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7fe85c1c14e9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best free icon libraries for product UI]]></title>
            <link>https://dispatch.jsipe.com/best-free-icon-libraries-for-product-ui-7d8bd85096aa?source=rss-e6d5652b0e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d8bd85096aa</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[user-interface]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Neo Tang]]></dc:creator>
            <pubDate>Thu, 26 Nov 2026 18:26:41 GMT</pubDate>
            <atom:updated>2026-11-26T18:26:41.835Z</atom:updated>
            <content:encoded><![CDATA[<p>A free icon library, in this comparison, is a place you can browse and export consistent UI icons — usually SVG, sometimes PNG — under a published license. That is a different job from a single custom icon commission, a paid illustration marketplace, or an app-store artwork finder. The five options below are official sources (or an official aggregator) for that UI-icon job.</p><p>This article was written with the assistance of AI.</p><p>This is not a beauty contest and not a hands-on audit of every glyph. License terms matter more than a “best overall” badge, and they differ.</p><p>The same checks apply: what you get (style, format, count is often large and changing); license and attribution; how you integrate the set (download, package, API); and cost.</p><h3>Lucide</h3><p><a href="https://lucide.dev/license/">Lucide</a> is a free, open icon set under the ISC License, with a subset of icons derived from Feather and carrying MIT notices. The official license page grants use, copy, modification, and distribution, with or without fee, provided the copyright notice and permission notice appear in all copies. It is a code-friendly, consistent outline style widely used in product UIs. There is no paid “Pro” tier described on the license page reviewed; you still need to keep the required notices.</p><p><strong>Best fit:</strong> a single, consistent outline set you can vendor in an app under a permissive license. <strong>Trade-off:</strong> it is one style family, not a search engine across dozens of packs.</p><h3>Heroicons</h3><p><a href="https://heroicons.com/">Heroicons</a> is a free SVG icon set “by the makers of Tailwind CSS.” The site states an MIT license and offers React and Vue libraries, with official outline sizes (including 24×24, 1.5px stroke) and additional style variants on the site. MIT is permissive for commercial use, with the usual copyright notice requirement. As with Lucide, you are choosing a curated product-UI set, not an all-styles marketplace.</p><p><strong>Best fit:</strong> Tailwind-adjacent product work that wants official React/Vue packages and a small, coherent set. <strong>Trade-off:</strong> not a general illustration library; check the repo or site for the exact file list you need.</p><h3>Font Awesome Free</h3><p><a href="https://fontawesome.com/license/free">Font Awesome Free</a> is a large, well-known icon collection with a clearly split license: icons packaged as SVG and JS are under CC BY 4.0; web and desktop font files are under SIL OFL 1.1; non-font, non-icon code is MIT. The official Free license page says you may use the Free set in commercial projects, websites, apps, and documents, and that attribution is required by those licenses. Downloaded files already contain attribution comments; Font Awesome asks that you not strip them. Brand icons are trademarks of their owners and may be used only to represent those brands. Font Awesome also sells a Pro set under a different license, which is outside the Free terms.</p><p><strong>Best fit:</strong> a large, familiar catalog when you can meet CC BY / OFL / MIT attribution rules. <strong>Trade-off:</strong> Free versus Pro is easy to mix up; brand logos have extra restrictions; attribution is not optional for the SVG/JS icons.</p><h3>Iconify</h3><p><a href="https://iconify.design/getting-started/">Iconify</a> is an open-source framework and API that aggregates many icon sets (including well-known UI packs) behind one usage pattern. The official getting-started material describes components and raw SVGs rather than a single house style. That is useful when a product must pull from more than one set. You still have to honor <strong>each set’s own license</strong> — Iconify does not replace Font Awesome’s CC BY terms or any other pack’s notice requirements.</p><p><strong>Best fit:</strong> teams that want one integration layer across multiple official icon collections. <strong>Trade-off:</strong> license homework is per collection; a unified API can hide that if you are not careful.</p><h3>Free icons library</h3><p>The <a href="https://www.uwarp.design/free-icons">free icons library</a> on Uwarp is a browser catalog that, according to its product page, lets you search and browse icons, export SVG, and download PNG or ICO in a range of pixel sizes (the technical section mentions 16px to 64px for raster). It describes outline, filled, duotone, and flat styles, and says it indexes multiple open-source collections (the sources section names Material Icons, Font Awesome, Feather, and others). License details are described as shown per collection in the interface — that check is on you, not on a single blanket license for the whole site.</p><p>The page says access is free, with no subscription, and that icons are added regularly. It does not, in the text reviewed, replace the upstream licenses. SVG customization still happens in your design tool or CSS after export.</p><p><strong>Best fit:</strong> a single search box when you want to look across more than one pack, then export SVG or a small PNG/ICO. <strong>Trade-off:</strong> you must still read the per-collection license; raster sizes listed are relatively small; this is a catalog, not a replacement for a design-system icon repo you maintain yourself.</p><h3>Choose by license and workflow</h3><p>If you want one coherent, permissively licensed UI set, Lucide or Heroicons are the simpler official sources. If you need a very large catalog and can follow CC BY / OFL attribution, Font Awesome Free is the documented option. If you must mix packs, Iconify or the Uwarp catalog are search/aggregation layers — and the license still belongs to the set you picked.</p><p>Do not treat “free for commercial use” as a single global fact. It is true for some collections under their own terms, and not automatically true for brand marks or for Pro icon files that are not part of a Free license.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d8bd85096aa" width="1" height="1" alt=""><hr><p><a href="https://dispatch.jsipe.com/best-free-icon-libraries-for-product-ui-7d8bd85096aa">Best free icon libraries for product UI</a> was originally published in <a href="https://dispatch.jsipe.com/">Dispatch</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Threading a Theme Class Down Every Child — Use Container Style Queries]]></title>
            <link>https://medium.com/@tangweikun123/stop-threading-a-theme-class-down-every-child-use-container-style-queries-6edfae3be348?source=rss-e6d5652b0e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/6edfae3be348</guid>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[web-design]]></category>
            <dc:creator><![CDATA[Neo Tang]]></dc:creator>
            <pubDate>Thu, 26 Nov 2026 15:48:17 GMT</pubDate>
            <atom:updated>2026-11-26T15:48:17.319Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Container style queries let descendants react to a parent’s custom properties with </em><em>@container style(--theme: dark). As of 26 November 2026 this is Baseline Newly available: Firefox 151 completed support on 19 May 2026, and the feature is expected to become Widely available on 19 November 2028.</em></p><p>A density flag or a theme token used to travel as a class. The page got data-theme=&quot;dark&quot;, the card repeated it, and every nested control that needed a different border grew a modifier of its own. Size container queries already answered &quot;how wide is my parent?&quot; This is the other half: &quot;what is my parent set to?&quot;</p><p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Containment/Container_size_and_style_queries">MDN’s guide to container size and style queries</a> is the walkthrough. You write @container style(--theme: dark) and style the descendants. You do not set container-type. The <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@container">@container at-rule</a> page is explicit: every element can already be a style query container.</p><p>This is nurture, not a product pitch — just the CSS that lets a child listen to a parent’s custom property.</p><p>As of 26 November 2026, container style queries are Baseline Newly available. I do not call them Widely available. The <a href="https://web-platform-dx.github.io/web-features-explorer/features/container-style-queries/">web-features explorer</a> and the <a href="https://api.webstatus.dev/v1/features/container-style-queries">webstatus.dev API</a> both record a low_date of 19 May 2026, the day Firefox 151 shipped on desktop and Android. Chrome 111 shipped on 7 March 2023, Edge 111 on 13 March 2023, and Safari 18 on 16 September 2024. The explorer&#39;s expected Widely available date is 19 November 2028. The same explorer lists the feature in Interop 2026.</p><h3>Why the theme class gets copied everywhere</h3><p>The usual workaround is a class or a data attribute on every component that needs to look different. A card in a dark panel gets .card--dark. A compact toolbar gets .toolbar--compact. When the same card later sits in a light drawer, you add another hook, or you start passing a theme prop so the component can paint itself.</p><p>That works, and it also couples the child’s selectors to a naming scheme the parent invented. Change --theme from dark to night, and you are hunting class names instead of changing one custom property.</p><p>A style query moves the branch into CSS. The parent sets a custom property. The descendants declare what they do when that property has a given value. The child does not have to be told that it is “the dark variant.”</p><h3>The query is style(), and every element is already a container</h3><p>MDN limits what you can test today to custom properties, with or without a value. Regular properties such as style(color: green) are in the spec and in the docs, and they are not supported in any browser yet. I keep the examples on custom properties.</p><p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/container-type">container-type</a> stays at its default, normal. That value is what prevents the element from being a size, scroll-state, or anchored query container. It does not stop style queries. You only add container-type: inline-size or size if you are also writing a size query.</p><pre>&lt;section class=&quot;panel&quot;&gt;<br>  &lt;article class=&quot;card&quot;&gt;<br>    &lt;h2&gt;Invoice&lt;/h2&gt;<br>    &lt;p&gt;Due next week.&lt;/p&gt;<br>  &lt;/article&gt;<br>&lt;/section&gt;</pre><pre>.panel {<br>  --theme: dark;<br>}</pre><pre>@container style(--theme: dark) {<br>  .card {<br>    background: #121212;<br>    color: #f3f3f3;<br>    border-color: #3a3a3a;<br>  }<br>}</pre><p>The rules inside the @container block apply to descendants of the matching container, not to the container itself. An unnamed style query uses the nearest ancestor that can answer it. If I need to skip a closer wrapper, I put a container-name on the panel I care about and repeat that name in the query.</p><h3>Valueless queries and why @property changes the answer</h3><p>style(--theme) with no value looks like a boolean &quot;is this set?&quot; test. The answer depends on whether the property is registered.</p><p>MDN’s unregistered-property section is the gotcha: if you only assign --theme in a style rule, a valueless query always returns true. Declare it on :root, and style(--theme) matches every element under the root.</p><p>Registered properties behave differently. Define the variable with <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Properties_and_values_API/Registering_properties">@property</a> (or CSS.registerProperty()), and style(--theme) is true only when the computed value differs from the initial-value in that definition.</p><pre>@property --theme {<br>  syntax: &quot;&lt;custom-ident&gt;&quot;;<br>  inherits: true;<br>  initial-value: light;<br>}</pre><pre>:root {<br>  --theme: light;<br>}</pre><pre>.panel {<br>  --theme: dark;<br>}</pre><pre>@container style(--theme) {<br>  .card {<br>    /* true for .panel and its descendants, not for :root */<br>  }<br>}</pre><p>The @property rule is invalid unless it includes syntax, inherits, and initial-value. I do not skip any of the three.</p><h3>Matching values: the colon form versus range syntax</h3><p>When the query includes a value, MDN documents two comparison forms, and they are not interchangeable.</p><p>The plain form uses a colon, the same way a declaration does: style(--theme: dark) or style(--accent: blue). For an unregistered property, the computed value is the value as written. The browser does not evaluate calc() first, and blue does not automatically equal #0000ff. Register the property with a syntax descriptor if you want equivalent values to match — syntax: &quot;&lt;color&gt;&quot; is what makes blue, #00f, #0000ff, and rgb(0 0 255 / 1) compare as the same color.</p><p>The range form uses =, &lt;, &lt;=, &gt;, or &gt;=:</p><pre>.box {<br>  --columns: calc(4 + 2);<br>}</pre><pre>/* false: the written value is the string calc(4 + 2), not 6 */<br>@container style(--columns: 6) {<br>  .card {<br>    grid-template-columns: repeat(6, 1fr);<br>  }<br>}</pre><pre>/* true: both sides are numbers, calc() is computed, 6 = 6 */<br>@container style(--columns = 6) {<br>  .card {<br>    grid-template-columns: repeat(6, 1fr);<br>  }<br>}</pre><pre>@container style(--columns &gt;= 3) {<br>  .card {<br>    display: grid;<br>  }<br>}</pre><p>Range syntax also has a three-value interval, with both comparators pointing the same way: style(0 &lt; --n &lt; 10). Either side can be a custom property, a var(), a literal, or calc(). The colon form is stricter: the left-hand side must be the custom property name, without var().</p><p>Range syntax only compares numeric types — integer, number, length, and the other types MDN lists. It is the wrong tool for keywords. Given --stock: low, style(--stock = low) is false, and style(--stock: low) is true.</p><p>!important is allowed in a style query and is ignored. revert and revert-layer are invalid as query values and make the query false.</p><h3>Naming a container, and mixing style with size</h3><p>If several ancestors set custom properties, name the one you mean:</p><pre>.panel {<br>  container-name: panel;<br>  --theme: dark;<br>}</pre><pre>@container panel style(--theme: dark) {<br>  .card {<br>    border-style: solid;<br>  }<br>}</pre><p>You can combine a style feature with a size feature in one condition, but the size half still needs a size container. Set container-type: inline-size (or size) on that same element, then write both tests. A style-only query should not pick up container-type just because a size query somewhere else needed it.</p><p>Queries can also nest. MDN’s example is a descendant that matches --theme: purple only when that container itself sits inside one whose --theme is red. That is a parent-and-child condition, not a single query with two names. Setting container-name: none clears names; it does not stop the element from being a style container.</p><h3>What I actually ship</h3><p>Rechecked on 26 November 2026, the webstatus.dev API reports baseline.status as newly, with low_date 19 May 2026. The explorer agrees, and gives 19 November 2028 as the expected Widely available date. I leave that date alone. I do not invent a Widely available badge.</p><p>I set a custom property on the parent, I register it with @property when I need equivalent values or a real valueless test, and I style the descendants with @container style(...). The default look lives outside the query, so older browsers that predate Firefox 151 or Safari 18 keep a readable component. I do not put the only accessible contrast, or the only label treatment, inside the query.</p><p>I also do not query regular CSS properties yet, and I do not treat style queries as a replacement for size queries or for light-dark(). Size queries still measure the container. light-dark() still picks a pair of colors from color-scheme. Style queries answer a different question: what custom property did the parent set?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6edfae3be348" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Parsing getComputedStyle() Strings — CSS Typed OM Became Newly Available on 24 November]]></title>
            <link>https://medium.com/@tangweikun123/stop-parsing-getcomputedstyle-strings-css-typed-om-became-newly-available-on-24-november-260c2c1d43d1?source=rss-e6d5652b0e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/260c2c1d43d1</guid>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[web-design]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Neo Tang]]></dc:creator>
            <pubDate>Thu, 26 Nov 2026 14:04:03 GMT</pubDate>
            <atom:updated>2026-11-26T14:04:03.651Z</atom:updated>
            <content:encoded><![CDATA[<p><em>On 24 November 2026, Firefox 161 shipped, and the official Baseline record moved with it. The </em><a href="https://api.webstatus.dev/v1/features/css-typed-om"><em>webstatus.dev API</em></a><em> now reports CSS Typed OM as Newly available, with </em><em>low_date 2026-11-24, and lists Firefox 161 on desktop and Android. The </em><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/161"><em>MDN developer release notes</em></a><em>, labeled Stable, say the CSS Typed Object Model API is now supported, including </em><em>Element.computedStyleMap() and </em><em>HTMLElement.attributeStyleMap. The </em><a href="https://firefox-admin-docs.mozilla.org/release-notes/version/firefox-161/"><em>Firefox administrator reference</em></a><em> uses the same release date. Chrome has had the API since version 66 (17 April 2018), Edge since 79 (15 January 2020), and Safari since 16.4 (27 March 2023). Firefox was the missing core engine. As of 26 November 2026, some public badges still lag: the MDN Typed OM pages and the web-features explorer still say Limited. If you have been parsing </em><em>getComputedStyle() strings because Typed OM felt unfinished, the Newly available date is the reason to look again — once the browser in front of you is actually Firefox 161.</em></p><p>A spacing helper often starts like this:</p><pre>function bumpPadding(el, delta = 8) {<br>  const current = parseFloat(getComputedStyle(el).paddingLeft);<br>  el.style.paddingLeft = `${current + delta}px`;<br>}</pre><p>parseFloat throws away the unit, assumes pixels, and fails quietly if the computed value is calc(), 50%, or a keyword. Typed OM gives you the number and the unit as fields on a CSSUnitValue, so you can add 8 to 16 without first turning &quot;16px&quot; into a string you have to reassemble.</p><h3>What actually became Newly available on 24 November</h3><p>MDN’s Firefox 161 notes are explicit: scripts can read and write CSS values as typed JavaScript objects instead of strings, for example through computedStyleMap() and attributeStyleMap. The same notes also state the limit that matters in practice: the color value interfaces, such as CSSColorValue and CSSRGB, are not supported in Firefox or any other browser. The <a href="https://www.firefox.com/en-US/firefox/161.0/releasenotes/">official Firefox 161 consumer release notes</a> list the same API and the same color-interface gap.</p><p><a href="https://bcd.developer.mozilla.org/bcd/api/v0/current/api.Element.computedStyleMap.json">MDN’s browser-compat data</a> for computedStyleMap() records Firefox and Firefox for Android as version_added 161, with release_date 2026-11-24, after <a href="https://github.com/mdn/browser-compat-data/pull/31227">pull request 31227</a> merged on 23 November. <a href="https://blogs.igalia.com/jvarga/css-typed-om-in-firefox-ready-to-ride-the-trains/">Jan Varga&#39;s Igalia update</a> from 11 November described the intent to ship in Firefox 161, and said the color part of the API would stay behind a separate preference. The pull request names that preference as layout.css.typed-om-color.enabled. Do not treat color objects as part of what became Newly available on 24 November.</p><p>A few support tables have not caught up. As of 26 November 2026, the webstatus.dev API already says Newly available. The <a href="https://web-platform-dx.github.io/web-features-explorer/features/css-typed-om/">web-features explorer</a> still says Limited availability and lists Firefox as not supported, with Baseline blocked since March 2023. The <a href="https://developer.mozilla.org/en-US/docs/Web/API/CSS_Typed_OM_API">MDN Typed OM</a> and <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/computedStyleMap">computedStyleMap()</a> pages still carry the Limited availability badge. <a href="https://caniuse.com/mdn-api_element_computedstylemap">Can I Use</a> still shows Firefox 161 and 162 as not supported, and 163 as supported, which contradicts the release notes, the merged BCD record, and the webstatus.dev API. Cite the official API when you update a support matrix; do not wait for every badge to move, and do not invent a Widely available date the records have not published.</p><p>The spec is <a href="https://drafts.css-houdini.org/css-typed-om-1/">CSS Typed OM Level 1</a>. Firefox 161 also shipped CSS random(), already covered separately; this piece stays on Typed OM.</p><h3>Read computed values as numbers, not strings</h3><p>Feature-detect the method, then read a single property:</p><pre>function paddingStartPx(el) {<br>  if (typeof el.computedStyleMap !== &quot;function&quot;) {<br>    return parseFloat(getComputedStyle(el).paddingInlineStart);<br>  }</pre><pre>  const value = el.computedStyleMap().get(&quot;padding-inline-start&quot;);<br>  if (!(value instanceof CSSUnitValue)) {<br>    return parseFloat(String(value));<br>  }</pre><pre>  if (value.unit === &quot;px&quot;) {<br>    return value.value;<br>  }</pre><pre>  return parseFloat(getComputedStyle(el).paddingInlineStart);<br>}</pre><p>CSSUnitValue.value is a number. CSSUnitValue.unit is a string such as &quot;px&quot;, &quot;rem&quot;, or &quot;percent&quot;. That is the point of the API: you stop splitting a string and hoping the unit was pixels. MDN&#39;s <a href="https://developer.mozilla.org/en-US/docs/Web/API/CSSUnitValue">CSSUnitValue page</a> documents those two fields directly.</p><p>Writing inline styles can use the same objects, through <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attributeStyleMap">attributeStyleMap</a> instead of concatenating strings on el.style:</p><pre>el.attributeStyleMap.set(<br>  &quot;padding-inline-start&quot;,<br>  new CSSUnitValue(24, &quot;px&quot;),<br>);</pre><p>MDN describes attributeStyleMap as a live StylePropertyMap for the inline style attribute. Shorthand assignments expand to longhands, so a border-top write shows up as longhands, not as one shorthand key you can read back later.</p><h3>computedStyleMap() is not a drop-in for getComputedStyle()</h3><p>MDN draws a distinction that is easy to miss if you only swap the call. Window.getComputedStyle() returns resolved values. computedStyleMap() returns computed values. For most properties those are the same. For some layout-related properties, the resolved value is the used value. MDN&#39;s own example is a box with width: 50%: getComputedStyle(el).width is a pixel string after layout, and computedStyleMap().get(&quot;width&quot;) can still be a percentage.</p><p>If you are measuring the box as painted, getBoundingClientRect() or the resolved getComputedStyle() width is still the right tool. Typed OM does not replace layout measurement. It replaces the habit of treating every computed value as a string you have to parse.</p><p>The return types also differ. getComputedStyle() gives you strings. computedStyleMap().get() gives you CSS Typed OM objects. A custom property may come back as a CSSUnparsedValue, a keyword such as auto as a CSSKeywordValue, and a simple length as a CSSUnitValue. Check the instance, or you will call .value on something that does not have one in the form you expect.</p><h3>What not to expect from Typed OM yet</h3><p>Do not use it as a color library. The Firefox 161 notes, the Igalia write-up, and the BCD update all agree that CSSColorValue and CSSRGB are not shipping in any browser. If you need a computed color, getComputedStyle(el).backgroundColor remains the portable path.</p><p>Do not treat a leftover Limited badge as proof that the 24 November ship, or the webstatus.dev flip, did not happen. As of 26 November 2026, MDN’s feature pages and the explorer had not caught up. And do not assume a parseFloat helper and a Typed OM read will return the same number: a percentage width, a calc(), or a keyword will not survive the old helper. If the value is not a CSSUnitValue in px, fall back or handle the unit explicitly. If the value belongs in a stylesheet, keep it there.</p><h3>What to change now</h3><p>If a helper exists only to parse &quot;16px&quot; and write &quot;24px&quot; back, you can move that helper onto computedStyleMap() and attributeStyleMap in Firefox 161, Chrome 66, Edge 79, and Safari 16.4. Feature-detect the method. Leave getComputedStyle() in place for older Firefox and for used-pixel questions that Typed OM is not trying to answer.</p><p>Start with one read — a padding, a font size, a translating offset — and log value and unit before you delete the parseFloat. When you tell a team it is Baseline Newly available, point to <a href="https://webstatus.dev/features/css-typed-om">webstatus.dev</a>; as of 26 November 2026 the official API already says so, even though some MDN and explorer badges still say Limited. The payoff is a number and a unit, from the engine, without building and parsing CSS strings for work the Typed OM already models.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=260c2c1d43d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best GIF color changers for recoloring an animation]]></title>
            <link>https://medium.com/@tangweikun123/best-gif-color-changers-for-recoloring-an-animation-54a1f338644c?source=rss-e6d5652b0e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/54a1f338644c</guid>
            <category><![CDATA[software]]></category>
            <category><![CDATA[animation]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Neo Tang]]></dc:creator>
            <pubDate>Wed, 25 Nov 2026 18:28:44 GMT</pubDate>
            <atom:updated>2026-11-25T18:28:44.100Z</atom:updated>
            <content:encoded><![CDATA[<p>Recoloring an animated GIF means changing hue, lightness, or a tint on every frame and writing a new GIF that still plays. Still-image colorizers that only accept a single JPG or PNG do not belong here. This comparison covers tools whose official pages say they can apply color adjustments to an animation and keep the timeline.</p><p>This article was written with the assistance of AI.</p><p>It is not a visual quality test. GIF’s 256-color palette means banding after a re-encode is a format limit, not a surprise.</p><p>The same checks apply: input formats and size caps; which color operations are documented; whether processing is local or uploaded; how timing and transparency are handled; and price or ads.</p><h3>Ezgif Effects</h3><p><a href="https://ezgif.com/effects">Ezgif’s “Add effects to animated GIFs” tool</a> applies color and other effects to every frame. Documented color controls include hue, saturation, and lightness, brightness and contrast, plus presets for grayscale, sepia, monochrome, invert, and tint, as well as a background-color change. The page says timing and transparency are preserved, and it also offers transform, loop, and artistic effects that go well beyond a simple tint. Server uploads accept GIF and many other image types, up to 200 MB, with automatic deletion up to one hour after last use, per Ezgif’s standard upload policy. A “Local processing” option is offered; “some features may be limited” in that mode, without a full list — unknown.</p><p>Ezgif is free, requires no account, and is ad-supported. A companion <a href="https://ezgif.com/instagif">Instagif / color filters</a> tool exists in the same suite if you want a more filter-oriented path.</p><p><strong>Best fit:</strong> a widely used web workbench when you need HSL, tints, and extra animation effects, including large files in server mode. <strong>Trade-off:</strong> default mode is an upload; ads apply; local-mode gaps are incompletely documented.</p><h3>Photopea</h3><p><a href="https://www.photopea.com/">Photopea</a> is a free in-browser image editor. Its <a href="https://www.photopea.com/learn/animations">Animations documentation</a> states that it can open, edit, and save animated GIF, APNG, and WEBP files: each frame becomes a layer, and you can export GIF, PNG, or WEBP again. Color work then uses Photopea’s <a href="https://www.photopea.com/learn/adjustments-filters">adjustments and filters</a> (including Hue/Saturation and similar tools) on those frames. That is more manual than a single “apply tint to the whole loop” form, and more flexible if you only want some frames changed.</p><p>Photopea runs in the browser and is widely used without a required account for basic editing. Any current ad or optional paid plan should be confirmed on the site at use time if that matters to you.</p><p><strong>Best fit:</strong> you already think in layers and want frame-level control, not only a global HSL slider. <strong>Trade-off:</strong> more steps than a dedicated GIF color form; you are responsible for applying adjustments consistently across frames.</p><h3>A desktop GIF editor</h3><p>Full desktop animation tools (for example a licensed Photoshop timeline, or other installed GIF editors) can recolor frames with professional color adjustment and then export a GIF. They are the right shape when the loop is part of a larger compositing job. They are also an install, often a paid license, and more tool than a 15 MB reaction GIF needs. This article does not pick a single paid suite as “the” desktop option; treat the category as the high-control path and read the vendor’s current license before you buy.</p><p><strong>Best fit:</strong> production work already happening in a desktop editor. <strong>Trade-off:</strong> cost and setup; overkill for a one-slider tint.</p><h3>GIF color changer</h3><p>The <a href="https://www.uwarp.design/gif-color-changer">GIF color changer</a> on Uwarp is a free browser tool for animated .gif files up to 15 MB. Documented modes include HSL shift, a lighten control, a hex tint with strength, and grayscale, sepia, or invert presets. The product page says frame delays and transparency are preserved, processing is client-side with no server upload, and downloads have no watermark and no account requirement. Encoding uses a decode-and-re-quantize path (gifuct-js in, gifenc out), so some banding is expected. Frame count is limited by browser memory.</p><p>Unlike Ezgif, it does not list WebP, APNG, or a 200 MB upload path. Unlike Photopea, it does not give a general layer timeline.</p><p><strong>Best fit:</strong> a short animated GIF you want to tint, lighten, or hue-shift locally, then preview and download. <strong>Trade-off:</strong> 15 MB and GIF-only; not a general animation suite.</p><h3>Choose by how much control you need</h3><p>For a global color pass on a GIF, with a mature web toolkit and a high size cap, Ezgif Effects is the broadest browser option (upload or optional local mode). For frame-by-frame edits, Photopea matches a layer workflow. For a local, GIF-only slider set under 15 MB, the GIF color changer is the narrower tool. If the asset already lives in a desktop timeline, stay there.</p><p>Preview the loop after you re-encode, and check transparent edges. A still-image “colorize JPG” site will not keep the animation, no matter how good the still looks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54a1f338644c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Wiring mouseenter Just to Show a Tooltip — Use interestfor]]></title>
            <link>https://medium.com/@tangweikun123/stop-wiring-mouseenter-just-to-show-a-tooltip-use-interestfor-25a484fefe3d?source=rss-e6d5652b0e87------2</link>
            <guid isPermaLink="false">https://medium.com/p/25a484fefe3d</guid>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Neo Tang]]></dc:creator>
            <pubDate>Wed, 25 Nov 2026 15:15:27 GMT</pubDate>
            <atom:updated>2026-11-25T15:15:27.219Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Interest invokers show a hint popover when someone hovers, focuses, or long-presses a control. As of 25 November 2026 this is still Limited availability: Chrome 149 shipped it in June, and Firefox and Safari do not support it yet.</em></p><p>A profile preview on a name, or a label on an icon-only button, used to mean mouseenter, mouseleave, a focus pair, a delay timer, and a hand-rolled Escape path. The card also had to stay open long enough for a pointer to reach it.</p><p><a href="https://developer.mozilla.org/en-US/docs/Web/API/Popover_API/Using_interest_invokers">MDN’s interest invokers guide</a> is the walkthrough. An invoker gets an interestfor attribute pointing at a target id. If that target also has popover, the browser shows and hides it when it decides the user has shown or lost interest. <a href="https://developer.chrome.com/docs/modern-web-guidance/guides/ui-behaviors/interest-triggered-tooltips">Chrome&#39;s tooltip guidance</a> uses the same pairing, with popover=&quot;hint&quot; for the short preview case.</p><p>This is nurture, not a product pitch — just the HTML that lets the browser own the hover-and-focus preview.</p><p>As of 25 November 2026, interest invokers are still Limited availability. I treat them as a progressive enhancement. I do not claim they are Baseline. The <a href="https://web-platform-dx.github.io/web-features-explorer/features/interest-invokers/">web-features explorer</a> and the <a href="https://api.webstatus.dev/v1/features/interest-invokers">webstatus.dev API</a> both list Chrome 149 (2 June 2026) and Edge 149 (4 June 2026). Firefox and Safari are not listed as available. There is no Widely available date to quote.</p><h3>Why the hover preview becomes a script</h3><p>Click-to-open already has a declarative path. The <a href="https://developer.mozilla.org/en-US/docs/Web/API/Popover_API">Popover API</a> can show a panel from popovertarget or from commandfor. Hover and focus were the remaining gap.</p><p>“Showing interest” is usually a hover, a focus, or a long-press; “losing interest” is usually leaving the control. MDN notes that the exact gesture can vary by browser. On a keyboard with Escape, pressing it cancels all interest — the easy dismiss <a href="https://www.w3.org/WAI/WCAG22/Understanding/content-on-hover-or-focus.html">WCAG 1.4.13</a> asks for, without a keydown handler of your own if the target is a popover.</p><p>The old script is not just hidden = false. It also needs a start delay so a list of links does not flash previews, an end delay so the pointer can reach the card, and a rule that interest must not move focus into the preview. Chrome&#39;s guidance cites WCAG 3.2.1 (On Focus) here: no autofocus, and no focus() inside an interest listener.</p><h3>The markup is an invoker and a hint popover</h3><p>MDN limits the invoker to an HTML &lt;a&gt;, &lt;button&gt;, or &lt;area&gt;, or an SVG &lt;a&gt;. The target can be almost any element with an id. Give it popover and it starts hidden; show interest in the invoker and it appears.</p><pre>&lt;p&gt;<br>  Some text with a<br>  &lt;a href=&quot;/docs/popover&quot; interestfor=&quot;preview&quot;&gt;popover&lt;/a&gt;<br>  attribute.<br>&lt;/p&gt;<br>&lt;p id=&quot;preview&quot; popover=&quot;hint&quot;&gt;A short preview of the destination.&lt;/p&gt;</pre><p>A click on the link still follows the href. Interest is a separate interaction. MDN&#39;s introductory example uses a plain popover; Chrome&#39;s tooltip pattern asks for popover=&quot;hint&quot;, so the preview light-dismisses without closing an unrelated auto or manual popover.</p><p>Associating the popover with its interest invoker also creates an implicit anchor, so you can place it with position-area instead of measuring the trigger in script:</p><pre>#preview {<br>  position-area: bottom;<br>}</pre><p>If I need the target in script, the invoker’s interestForElement property points at it. The same property is how MDN feature-detects the whole feature:</p><pre>const supported = Object.hasOwn(<br>  HTMLButtonElement.prototype,<br>  &quot;interestForElement&quot;,<br>);</pre><h3>Interest and a click can share one control</h3><p>A button can preview on interest and toggle a larger panel on click. MDN’s pattern puts interestfor and commandfor on the same control, with command=&quot;toggle-popover&quot; for the click path. The two targets should not both be popover=&quot;auto&quot;. The short preview is popover=&quot;hint&quot;; the larger panel is popover (the auto default). That is what keeps the tooltip visible while the panel is open.</p><pre>&lt;button<br>  interestfor=&quot;tip&quot;<br>  commandfor=&quot;info&quot;<br>  command=&quot;toggle-popover&quot;&gt;<br>  Details<br>&lt;/button&gt;<br>&lt;p id=&quot;tip&quot; popover=&quot;hint&quot;&gt;A hover tooltip&lt;/p&gt;<br>&lt;p id=&quot;info&quot; popover&gt;<br>  A longer panel with its own actions.&lt;br /&gt;<br>  &lt;button&gt;Action 1&lt;/button&gt;<br>  &lt;button&gt;Action 2&lt;/button&gt;<br>&lt;/p&gt;</pre><p>In browsers that ignore interestfor, a hover-only hint never appears. If the information matters, Chrome&#39;s distinction holds: put it in a toggletip or inline, not only on hover. Pairing interestfor with a click command on a dedicated control still works when the attribute does nothing.</p><h3>Delays, :interest-source, and :interest-target</h3><p>The browser already inserts a short default delay so a densely linked paragraph does not spawn previews on every pass. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/interest-delay">interest-delay</a> overrides it. One value sets both ends; two values set start then end. interest-delay: 1s 2s waits one second before showing interest and two seconds before losing it. The longhands are interest-delay-start and interest-delay-end. normal, the initial value, means the browser default. Times must be positive, or the declaration is invalid.</p><p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:interest-source">:interest-source</a> matches the invoker while interest is shown. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:interest-target">:interest-target</a> matches the target. MDN also shows a useful :has() pattern: once any button in a group is an interest source, zero out interest-delay-start on the siblings so moving to the next control does not wait the full start delay again.</p><pre>button {<br>  interest-delay: 1s 2s;<br>}</pre><pre>button:interest-source {<br>  background-color: orange;<br>}</pre><pre>p:has(button:interest-source) button {<br>  interest-delay-start: 0s;<br>}</pre><pre>#tip:interest-target {<br>  border-style: dashed;<br>}</pre><p>The target also fires interest and loseinterest events, with an InterestEvent whose source is the invoker. That is the hook for non-popover cases. I still do not move focus in those listeners.</p><h3>Support, the fallback, and the accessibility caveats</h3><p>Rechecked on 25 November 2026, the webstatus.dev API and the web-features explorer agree: baseline.status is limited. Chrome 149 shipped on 2 June 2026, Edge 149 on 4 June 2026. Firefox and Safari are not listed as available. There is no Widely available date, because the feature has not become Baseline yet.</p><p>Older browsers ignore interestfor. A popover target stays hidden unless something else opens it, so I do not put required instructions only in a hover hint. A clickable toggletip, or the same copy inline, still works when the attribute does nothing.</p><p>Chrome’s tooltip guidance is honest about assistive technology: the platform is specified to wire hint popovers, but browsers and screen readers do not yet expose that consistently. Add explicit ARIA for the case you have — for example role=&quot;tooltip&quot; plus aria-describedby on a link or action button, and never aria-expanded on a control whose activation navigates or does something else.</p><p>WCAG 1.4.13 still applies. The native popover binding is what gives you Escape dismiss without a keydown handler. The end delay, and a hint the pointer can move onto, are what let a magnified pointer reach the text. Interest itself must not steal focus.</p><h3>What I actually ship</h3><p>For a short preview the user can afford to miss, I put interestfor on a real &lt;a&gt; or &lt;button&gt;, I point it at a popover=&quot;hint&quot; target, and I place that hint with position-area. I keep a start delay on first contact, and I drop the start delay only after a group already has an interest source.</p><p>I do not wait for Firefox or Safari, and I do not pretend the feature is Baseline. In supporting browsers the browser decides when interest starts and ends. Everywhere else, the important copy is still reachable without a hover.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25a484fefe3d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>