💄✨:let the tab mark answer to the theme - #1869
Conversation
The mark went out black and white and stayed that way, so a dark tab bar got a bright white disc: legible, but louder than anything else on the site and in colors the site does not use. It reads `prefers-color-scheme` now and is drawn in the ink and the parchment, which is the browser's own theme rather than the page's -- a mark sits in the chrome, and the chrome is what it has to be legible against. `inlineStyles` had to come off the optimizer. It folds a stylesheet into the attributes it applies to and drops what is left, which for a mark that answers to a media query means keeping one theme and losing the other, silently. It costs 26 bytes across thirty files. The link that asks for it was three things at once: an icon, a preload, and a subresource integrity check. The hash was of the file as written rather than the file as served, so it described bytes nobody receives, and the browser said as much on every page load -- integrity is ignored for a destination that does not support it. It is an icon now. Signed-off-by: Derek Lewis <DerekNonGeneric@inf.is> Assisted-by: Claude-Code:claude-opus-5 Fixes: #1544
✅ Deploy Preview for gh-pages-openinf ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe change simplifies the favicon declaration and adds shared SVGO settings that preserve inline styles and inline SVG element IDs during optimization. ChangesFavicon declaration
SVG optimization configuration
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change makes the favicon follow the browser’s light or dark theme and removes an ineffective integrity attribute; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation The PR addresses issue Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
The mark in the tab was fixed black and white. It reads
prefers-color-schemenow and is drawn in the ink and the parchment.That is the browser's own theme rather than the page's, which is the
right one to follow: a favicon sits in the chrome, and the chrome is
what it has to be legible against.
On a dark tab bar the disc now recedes into the chrome and the ring and
glyph carry the shape, instead of a white blob that was louder than
anything else on the site and in colors the site does not use.
Two bugs found on the way, both fixed here
The optimizer would have flattened it.
inlineStylesfolds astylesheet into the attributes it applies to and drops what is left,
which for a mark answering to a media query means keeping one theme and
losing the other — with nothing to say so:
It is off now. Three existing marks carry a
<style>, so this is notfree: 26 bytes across thirty files, 0.06%.
The integrity hash described bytes nobody receives. The link was an
icon, a preload and a subresource integrity check at once. The hash
matched the file as written, but what is served is optimized, so they
have not agreed since SVG optimization landed:
It never broke because the browser ignores it — and said so on every
page load:
Subresource integrity on a same-origin icon buys nothing, so the link
is an icon and nothing else:
Verified
prefers-color-schemeis in thepublished file
nps testpassesNot done here
No raster fallback. Safari does not use SVG favicons, so it falls back
to whatever
/favicon.icoit can find, and adding one means committinga binary and deciding on sizes — worth its own issue rather than a
guess at the end of this one.
Fixes #1544
Summary by CodeRabbit
Bug Fixes
Style