Skip to content

💄✨:let the tab mark answer to the theme - #1869

Merged
openinf-commit-queue[bot] merged 1 commit into
livefrom
feat/theme-aware-favicon
Aug 27, 2026
Merged

💄✨:let the tab mark answer to the theme#1869
openinf-commit-queue[bot] merged 1 commit into
livefrom
feat/theme-aware-favicon

Conversation

@DerekNonGeneric

@DerekNonGeneric DerekNonGeneric commented Aug 26, 2026

Copy link
Copy Markdown
Member

The mark in the tab was fixed black and white. It reads
prefers-color-scheme now 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.

light chrome dark chrome
before dark ring, white disc bright white disc
after ink ring, parchment disc parchment ring, ink disc

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. inlineStyles folds a
stylesheet 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:

default:            <circle style="fill:#e7e7d6;stroke:#1d1916"/>
                    media query kept: false
inlineStyles off:   media query kept: true

It is off now. Three existing marks carry a <style>, so this is not
free: 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:

source:    sha512-oCOiQlcNbSk49EgFYP+3Hr94accDzoufgSJ4EHPnqMF5Fthj…
published: sha512-VUiA6emvQuAZQ6EaoRjQgd+m8bta1F/7Pr7swddvG2fdgHGC…

It never broke because the browser ignores it — and said so on every
page load:

warning: The `integrity` attribute is currently ignored for preload
destinations that do not support subresource integrity.

Subresource integrity on a same-origin icon buys nothing, so the link
is an icon and nothing else:

<link rel='icon' type='image/svg+xml' href='/assets/img/logogram.svg'>

Verified

  • rendered at 16, 32 and 64 in both schemes; screenshots in the thread
  • the media query survives the build: prefers-color-scheme is in the
    published file
  • the console is silent where it used to warn
  • the icon still answers 200
  • vnu passes; nps test passes

Not done here

No raster fallback. Safari does not use SVG favicons, so it falls back
to whatever /favicon.ico it can find, and adding one means committing
a 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

    • Improved SVG optimization while preserving inline styling and required element identifiers.
    • Ensured standalone SVG files continue to receive optimized identifier cleanup.
  • Style

    • Simplified favicon loading to use a single SVG icon declaration.

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
@netlify

netlify Bot commented Aug 26, 2026

Copy link
Copy Markdown

Deploy Preview for gh-pages-openinf ready!

Name Link
🔨 Latest commit a5032fc
🔍 Latest deploy log https://app.netlify.com/projects/gh-pages-openinf/deploys/6a8f5ace0f0b010008d5d25f
😎 Deploy Preview https://deploy-preview-1869--gh-pages-openinf.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 63a886dc-8da3-4d3d-85d1-0ad7820c8fb1

📥 Commits

Reviewing files that changed from the base of the PR and between 87a5e80 and a5032fc.

⛔ Files ignored due to path filters (1)
  • _assets/img/logogram.svg is excluded by !**/*.svg
📒 Files selected for processing (2)
  • _includes/head.liquid
  • eleventy.config.mjs

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The change simplifies the favicon declaration and adds shared SVGO settings that preserve inline styles and inline SVG element IDs during optimization.

Changes

Favicon declaration

Layer / File(s) Summary
Direct SVG favicon link
_includes/head.liquid
The head template now declares the SVG favicon directly. Preload, integrity, and cross-origin attributes were removed.

SVG optimization configuration

Layer / File(s) Summary
Shared SVGO configuration
eleventy.config.mjs
SVGO preserves inline styles for standalone and inline SVGs. Inline SVGs also retain element IDs. shrinkSvg now uses the shared configuration by default.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to a5032

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)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The PR addresses issue #1544 through favicon markup changes and SVG optimization for theme variants. The central theme-transition implementation is in _assets/img/logogram.svg, which is excluded by … Include _assets/img/logogram.svg in the review or provide evidence that it contains the required light and dark theme styles and transitions.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title identifies the tab favicon and theme behavior, which matches the primary change. Its wording is informal but still meaningful.
Out of Scope Changes check ✅ Passed The reviewed changes are limited to favicon markup and SVG optimization needed to support theme variants. No unrelated changes are shown.
Docstring Coverage ✅ Passed 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…
Full details: Linked Issues check

Explanation

The PR addresses issue #1544 through favicon markup changes and SVG optimization for theme variants. The central theme-transition implementation is in _assets/img/logogram.svg, which is excluded by the !**/*.svg path filter. The required prefers-color-scheme behavior cannot be verified from the reviewable summary.

Full details: Docstring Coverage

Explanation

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.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/theme-aware-favicon

Comment @coderabbitai help to get the list of available commands.

@OpenINFbot OpenINFbot added the 🚀 Status: Commit Queue Land this pull request when its checks pass label Aug 27, 2026
@openinf-commit-queue
openinf-commit-queue Bot merged commit b6ff4db into live Aug 27, 2026
17 checks passed
@openinf-commit-queue openinf-commit-queue Bot removed the 🚀 Status: Commit Queue Land this pull request when its checks pass label Aug 27, 2026
@OpenINFbot
OpenINFbot deleted the feat/theme-aware-favicon branch August 27, 2026 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🎨✨ mature favicon stylesets

2 participants