From a2d505c3c422c8f55dd6b85ea0f4388e5149f4ad Mon Sep 17 00:00:00 2001 From: Michael Grossklos Date: Sat, 7 Nov 2026 15:39:44 +0100 Subject: [PATCH 1/2] feat: Tippkraft theme Small and quiet theme in the colours of the tippkraft web app: square-ish items, plain digits, orange only for the cursor and matches. Passes the theme checks (contrast and axe, light and dark). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01YLt7HPD5U8u6BZCSr98Pzq --- CHANGELOG.md | 2 + themes/tippkraft.css | 153 +++++++++++++++++++++++++++++++++++++++ website/guide/styling.md | 1 + 3 files changed, 156 insertions(+) create mode 100644 themes/tippkraft.css diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cfa672..7741e53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ new major version. ### Added +- Theme `themes/tippkraft.css` (Tippkraft): small items, plain digits, warm + greys with orange for the cursor and matches, light and dark. - Touch screens: on phones (touch, at most 640 px wide) the panel opens as a full-screen sheet with the group's name and a close button, and ends above the on-screen keyboard. Tablets keep the normal panel with the close diff --git a/themes/tippkraft.css b/themes/tippkraft.css new file mode 100644 index 0000000..fda72af --- /dev/null +++ b/themes/tippkraft.css @@ -0,0 +1,153 @@ +/* + * @name Tippkraft + * @description Small and quiet, in the warm greys and orange of the tippkraft web app: square-ish items, plain digits, the orange only for the cursor and matches. + * @author emmgeede + * + * Load it after gridselect.css. Items are at least 24 px high (WCAG 2.5.8 target size). + */ +@layer gridselect-tippkraft { + :root, + [data-theme="light"] { + --gs-bg: #ffffff; + --gs-item-bg: #fafaf9; + --gs-fg: #1c1917; + --gs-muted: #6b6560; + --gs-border: #d6d3d1; + --gs-accent: #c03d0c; + --gs-accent-fg: #ffffff; + --gs-accent-text: #a8360b; + --gs-key-bg: transparent; + --gs-key-fg: #6b6560; + --gs-key-selected-bg: transparent; + --gs-cursor-bg: #fff4ed; + --gs-search-border: #8f8883; + --gs-shadow: 0 10px 25px -5px rgb(28 25 23 / 0.12), 0 4px 6px -4px rgb(28 25 23 / 0.08); + + --gs-radius: 0.375rem; + --gs-gap: 0.25rem; + --gs-item-min-height: 1.5rem; + --gs-item-padding: 0.2rem 0.5rem; + --gs-item-min-width: 6rem; + --gs-focus-width: 2px; + --gs-list-max-height: 16rem; + } + + @media (prefers-color-scheme: dark) { + :root:not([data-theme="light"]) { + --gs-bg: #292524; + --gs-item-bg: #312d2b; + --gs-fg: #f5f5f4; + --gs-muted: #a8a29e; + --gs-border: #57534e; + --gs-accent: #ff7a3d; + --gs-accent-fg: #1c1917; + --gs-accent-text: #ff9a66; + --gs-key-bg: transparent; + --gs-key-fg: #a8a29e; + --gs-key-selected-bg: transparent; + --gs-cursor-bg: #3d2a20; + --gs-search-border: #8a837e; + --gs-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.5); + } + } + + [data-theme="dark"] { + --gs-bg: #292524; + --gs-item-bg: #312d2b; + --gs-fg: #f5f5f4; + --gs-muted: #a8a29e; + --gs-border: #57534e; + --gs-accent: #ff7a3d; + --gs-accent-fg: #1c1917; + --gs-accent-text: #ff9a66; + --gs-key-bg: transparent; + --gs-key-fg: #a8a29e; + --gs-key-selected-bg: transparent; + --gs-cursor-bg: #3d2a20; + --gs-search-border: #8a837e; + --gs-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.5); + } + + [data-gridselect] { + font-size: 0.875rem; + line-height: 1.35; + } + + .gridselect__field { + min-width: min(12rem, 100%); + min-height: 2.25rem; + padding: 0.35rem 2rem 0.35rem 0.75rem; + border-radius: 0.375rem; + } + + .gridselect__field::after { + inset-inline-end: 0.8rem; + width: 0.35rem; + height: 0.35rem; + border-width: 0 1.5px 1.5px 0; + color: var(--gs-muted); + } + + .gridselect__panel { + padding: 0.5rem; + border-color: var(--gs-border); + border-radius: 0.5rem; + } + + .gridselect__search { + min-height: 2rem; + margin-bottom: 0.5rem; + padding: 0.25rem 0.6rem; + border-color: var(--gs-search-border); + border-radius: 0.375rem; + font-size: 0.875rem; + } + + .gridselect__items { + gap: 0.25rem; + } + + /* Abbreviation and description side by side, one line per item */ + .gridselect__item { + gap: 0.35rem; + align-items: baseline; + border-color: transparent; + } + + .gridselect__item:has([data-gridselect-description]) { + align-items: baseline; + } + + .gridselect__item:hover { + border-color: var(--gs-border); + } + + /* Cursor: thin orange line and a tint instead of the default outline with gap */ + .gridselect__item[data-cursor] { + outline-width: 1px; + outline-offset: -1px; + } + + .gridselect__item[data-cursor]:not([aria-selected="true"]) { + background: var(--gs-cursor-bg); + } + + [data-gridselect-description] { + font-size: 0.75rem; + } + + /* Digits as plain small text in front of the item */ + .gridselect__key { + min-width: 1rem; + min-height: 0; + margin-inline-start: 0; + padding: 0; + border-radius: 0; + font-size: 0.6875rem; + font-weight: 500; + } + + .gridselect__item[data-cursor]:not([aria-selected="true"]) > .gridselect__key { + color: var(--gs-accent-text); + } +} diff --git a/website/guide/styling.md b/website/guide/styling.md index 414c5c0..f080ef5 100644 --- a/website/guide/styling.md +++ b/website/guide/styling.md @@ -68,6 +68,7 @@ A theme is a second, small stylesheet that you load after `gridselect.css`. It c | Default | Strict WCAG 2.2 AA everywhere, with 3:1 borders on every control, in teal. | `gridselect.css` alone | | Showcase | A compact, contemporary look in sky blue, with flat rows, check marks and keycap-like badges. | `themes/showcase.css` | | High contrast | People with low vision: black and white, 2-pixel borders, 7:1 text contrast (WCAG AAA), underlined matches. | `themes/high-contrast.css` | +| Tippkraft | Small and quiet, in the warm greys and orange of the tippkraft web app: square-ish items, plain digits, orange only for the cursor and matches. | `themes/tippkraft.css` | | Compact | Data-heavy screens: smaller, denser items in the colours of the default stylesheet; items stay at least 24 pixels high. | `themes/compact.css` | ```js From 3ff2ecd0235033d5808724e0125e2f51a90d2835 Mon Sep 17 00:00:00 2001 From: Michael Grossklos Date: Sat, 7 Nov 2026 15:39:53 +0100 Subject: [PATCH 2/2] docs: five looks in the theme table Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01YLt7HPD5U8u6BZCSr98Pzq --- website/guide/styling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/guide/styling.md b/website/guide/styling.md index f080ef5..5ef1b02 100644 --- a/website/guide/styling.md +++ b/website/guide/styling.md @@ -61,7 +61,7 @@ If you write your own styles, use the attributes that GridSelect sets rather tha ## Themes -A theme is a second, small stylesheet that you load after `gridselect.css`. It changes colours, sizes and a few details, and it sits in its own cascade layer (`gridselect-`), so your own CSS still wins over it. Four looks are available: +A theme is a second, small stylesheet that you load after `gridselect.css`. It changes colours, sizes and a few details, and it sits in its own cascade layer (`gridselect-`), so your own CSS still wins over it. Five looks are available: | Theme | Meant for | How to load it | |---|---|---|