oficina / sheets Public

fix(css): swatch names sat at the far edge from their own colour

The menu's general item rule pushes trailing content to the far end so a
keyboard shortcut lines up in a column — right for "Bold … Ctrl B", and
wrong for a colour swatch, where it stranded each name against the
opposite edge from the square it names.

Written at full depth on purpose: that rule is
[data-menubar] [rst-dropdown-menu] button at (0,2,1), so the obvious
[data-swatches] button is (0,1,1) and loses. The first fix was that
obvious version, and it changed nothing — which a screenshot showed and
nothing else would have.
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 05b70b838c53b95321aee3757eeefbcb4d55b277 parent 624b548
1 file changed, +14 −0
  • internal/sheets/static/sheets.css +14 −0
diff --git a/internal/sheets/static/sheets.css b/internal/sheets/static/sheets.css
index 1b9a8b2..66571cb 100644
--- a/internal/sheets/static/sheets.css
+++ b/internal/sheets/static/sheets.css
@@ -292,6 +292,20 @@
min-inline-size: 11rem;
}
+/* A swatch button is its colour and then its name, reading left to
+ * right as one thing. The menu's general rule pushes an item's trailing
+ * content to the far end so a keyboard shortcut lines up in a column —
+ * right for "Bold … Ctrl B", wrong here, where it stranded each name
+ * against the opposite edge from its own colour.
+ *
+ * Written at the full depth on purpose: that general rule is
+ * [data-menubar] [rst-dropdown-menu] button, which is (0,2,1), and the
+ * obvious [data-swatches] button is (0,1,1) and loses. */
+[data-menubar] [rst-dropdown-menu] [data-swatches] button {
+ gap: 0;
+ justify-content: flex-start;
+}
+
[data-swatch]::before {
border: 1px solid var(--rst-line);
border-radius: 2px;