oficina / sheets Public

fix(contrast): the low-contrast flag disappeared on the cells it flags

The corner triangle marks a cell whose IMPORTED fill and ink fail WCAG
AA. The fill is an arbitrary colour out of somebody's file — including,
in the case this repo cites by name, Excel's #FFEB9C — and an amber
triangle on that is invisible in dark mode. A warning that disappears on
exactly the cells it is about is not a warning.

It now carries a halo in the page's own surface colour. drop-shadow
rather than a border or an outline: both of those follow the box, and
this triangle is drawn out of borders with no box to put an edge on, so
only a filter traces the rendered shape. No layout cost.

Found by importing a real workbook in Excel's own Neutral preset and
looking at it in both themes — which was only possible at all because
this branch is the first thing ever to SET data-contrast="low". The rule
has been in sheets.css since import landed and matched no element, so
the page warned in prose about cells it did not mark, and the defect in
the marker could not have been seen.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0182f7QfojuuqdS4Xd2fYFaL
Paul Campbell pushed by paul@keymail.dev d632f2717d981c2a3b5663f97ac47fa244b88140 parent 9e41130
1 file changed, +14 −0
  • internal/sheets/static/sheets.css +14 −0

CI cancelled — superseded by a newer push — run details

diff --git a/internal/sheets/static/sheets.css b/internal/sheets/static/sheets.css
index 8b0f593..540008d 100644
--- a/internal/sheets/static/sheets.css
+++ b/internal/sheets/static/sheets.css
@@ -643,6 +643,20 @@
inset-inline-end: 0;
border-block-start: 0.5rem solid var(--rst-tone-warning-fg);
border-inline-start: 0.5rem solid transparent;
+ /* A halo in the page's own surface colour, so the flag survives the
+ * fill it is flagging.
+ *
+ * The flag marks a cell whose IMPORTED fill and ink fail AA, and the
+ * fill is an arbitrary colour out of somebody's file — including, in
+ * the case this app cites by name, Excel's #FFEB9C, against which an
+ * amber triangle is invisible in dark mode. A warning that disappears
+ * on exactly the cells it is about is not a warning.
+ *
+ * drop-shadow rather than a border or an outline: those two follow
+ * the box, and this triangle is drawn out of borders, so there is no
+ * box to put an edge on. filter traces the rendered shape. */
+ filter: drop-shadow(0 0 1px var(--rst-surface))
+ drop-shadow(0 0 1px var(--rst-surface));
}
/* ── The scriptless table ────────────────────────────────────────────