Give the modal scrim a token, and drop the guard's exception

05066139ec73 · AtlantisPleb · · parent ed404daa1d30

Give the modal scrim a token, and drop the guard's exception

The Circle port added a rule that the Issues stylesheet paints only with
tokens, then whitelisted one literal in the same test. A rule written with its
own exception baked in protects less than it appears to.

The literal was real, though, and so was the reason: `#08090a` is `--ink-void`
in dark mode but `#f7f8f8` in light, and a scrim built from the page colour
would be a white veil over a white page, hiding nothing. That value could not
come from any existing token.

So it gets one. `--scrim` is fixed dark in both themes and says in its comment
why it does not reference `--ink-void`. The guard now permits no literals at
all, which is the rule it was trying to be.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0149rBWy7br1Z7bbz9NrQhEr
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>

Deploy story

What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.

Not deployed through the forge lane

No push, promotion, build, or deploy receipt references this commit (receipts are scanned over a bounded recent window). Changes shipped by full node replacement carry their proof in the release gate receipt instead.

Changed files

  • modified assets/css/app.css
  • modified assets/css/openagents.css
  • modified test/openagents_web/components/circle_test.exs

Diff

3 files changed, +11 -4

assets/css/app.css modified +7

@@ -132,6 +132,13 @@

132 132
  --wash-selected: color-mix(in oklab, var(--text-ink) 10%, transparent); /* 10% */
133 133
  --wash-strong: color-mix(in oklab, var(--text-ink) 14%, transparent); /* 14% */
134 134
135
  /* The scrim behind a modal. Deliberately NOT built from `--ink-void`, which
136
     is the page and flips to near-white in light mode: a scrim's job is to
137
     darken whatever is behind it, and a white one over a white page hides
138
     nothing. Fixed dark in both themes, which is why it is a token of its own
139
     rather than a reference to another. */
140
  --scrim: color-mix(in oklab, #08090a 55%, transparent);
141
135 142
  /* The hover surface is the wash resolved opaquely over the raised rung. */
136 143
  --ink-hover: color-mix(in oklab, var(--text-ink) 4%, var(--ink-raised)); /* 4% over raised */
137 144
assets/css/openagents.css modified +1 -1

@@ -5860,7 +5860,7 @@

5860 5860
  }
5861 5861
5862 5862
  .command-palette::backdrop {
5863
    background: color-mix(in oklab, #08090a 55%, transparent);
5863
    background: var(--scrim);
5864 5864
  }
5865 5865
5866 5866
  .command-palette__panel {
test/openagents_web/components/circle_test.exs modified +3 -3

@@ -226,14 +226,14 @@ defmodule OpenAgentsWeb.UI.CircleTest do

226 226
        ~r/(?<![-\w])#[0-9a-fA-F]{3,8}\b/
227 227
        |> Regex.scan(section)
228 228
        |> List.flatten()
229
        |> Enum.reject(&(&1 == "#08090a"))
230 229
231 230
      assert literals == [], """
232 231
      The Issues section names colours directly instead of resolving to a
233 232
      token: #{Enum.join(literals, ", ")}
234 233
235
      The one permitted literal is the backdrop scrim, which mixes against the
236
      darkest ink on purpose.
234
      There are no permitted literals. The modal scrim, which is the one value
235
      that cannot come from `--ink-void` (that token flips to near-white in
236
      light mode and a white scrim hides nothing), has its own `--scrim` token.
237 237
      """
238 238
    end
239 239

This page updates live while a promote is in flight · changelog