Skip to content

fix(css): improve light-mode comment and callout contrast - #91

Merged
hakula139 merged 6 commits into
mainfrom
fix/light-mode-comments
Oct 1, 2026
Merged

hakula139 merged 6 commits into
mainfrom
fix/light-mode-comments

Conversation

@hakula139

@hakula139 hakula139 commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Use the shared theme tokens for Twikoo placeholders, metadata, footer, sorting, actions, buttons, and input focus. Validation messages and invalid-input borders use the existing danger palette. Reaction icons inherit their parent action color, including hover states, so their SVG fills follow the same tokens. Twikoo inherits the main text color, but its injected Element UI styles keep pale placeholders and fixed blue actions in light mode. The overrides exceed upstream specificity so they work when Twikoo injects its styles after the theme stylesheet.
  • Darken light-mode callout foregrounds that were difficult to read on pale panels. Keep the matching print reset values. The print stylesheet deliberately repeats light literals with !important so printing while dark mode is active still resolves the light palette, following the existing token contract.
  • Use the existing semantic palette for Twikoo's blue, green, red, and yellow badges. A shared badge color drives the foreground, border, and opaque theme-tinted background, keeping small labels legible against image-backed panels.
  • Group comment styles by responsibility, keep base rules before state overrides, and remove redundant comments across the theme stylesheets and simplify print selectors. Rebuild the committed stylesheet.

Verification

  • pnpm build, pnpm format, pnpm lint, pnpm spellcheck, nix flake check, and git diff --check passed.
  • Chrome DevTools inspected live Twikoo DOM and injected CSS on the LR2 tools article. A compiled CSS overlay verified light → dark → light changes, input focus, and enabled / disabled send colors. Checks loaded the patch before the injected styles to verify cascade precedence. Reaction icon spans, SVGs, and paths matched parent colors in light and dark modes, including actual hover states for outline and solid icons.
  • Audited shared theme colors, including image-backed home cards, the pinned indicator, search tokens, and embeds. Confirmed the additional callout foreground issue and preserved intentional image-backed white text.
  • The consuming site built and indexed 75 pages. Headless Chromium at 1440px and 390px verified light → dark → light, visible reaction icons and hover, placeholders, input focus, enabled / disabled send, local preview, emotes, and search. All four supported badge colors exceed 5:1 contrast against their surfaces in both themes. Focused invalid email inputs retain the danger border, and error messages resolve the same semantic color. Printing from either theme resolves the light palette.
  • The comment-only follow-up rebuilt theme and site stylesheets byte-for-byte identically. Local theme formatting, lint, spelling, and Nix checks passed. Theme CI and all three dispatched site CI jobs passed on the final heads. After integrating the existing theme/site main changes to resolve the submodule conflict, automatic site CI and preview deployment passed. Direct hosted-preview desktop/mobile checks also passed, including the badge on the LR2 article. Other browser engines and incompatible Nix systems were not tested locally. No production deployment or merge is included.

@hakula139 hakula139 added the bug Something isn't working label Sep 30, 2026
@hakula139 hakula139 self-assigned this Sep 30, 2026
@hakula139
hakula139 merged commit 24d7624 into main Oct 1, 2026
1 check passed
@hakula139
hakula139 deleted the fix/light-mode-comments branch October 1, 2026 09:54
hakula139 added a commit to hakula139/hakula.xyz-kiln that referenced this pull request Oct 1, 2026
)

## Summary

- Pin IgnIt `24d7624` from [IgnIt
#91](hakula139/IgnIt#91) and regenerate the
committed stylesheet. Twikoo placeholders, comment metadata, footer,
sorting, and action controls use the existing theme tokens. Callout
titles use darker light-mode colors, and author / custom badges use
readable semantic colors on opaque theme-tinted surfaces. Validation
messages and invalid-input borders use the danger palette. Comment CSS
is grouped by responsibility and redundant comments across the theme
stylesheets and print selectors are removed.
- Use the adaptive secondary-text token for muted age ratings,
approximate external scores, and the matching AVG rating legend. Their
previous light gray had about 2.54:1 contrast on the white score table.
- IgnIt #91 is merged. This site pins its merged commit, whose tree
matches the browser-verified theme version.

## Verification

- `pnpm build`, `pnpm format`, `pnpm lint`, `pnpm spellcheck`, `nix
flake check`, commit / push hooks, and `git diff --check` passed. The
comment-only cleanup rebuilt both stylesheets byte-for-byte identically.
Current theme and site main are integrated so the submodule pin
preserves already-merged heading / mobile TOC changes. [Automatic
CI](https://github.com/hakula139/hakula.xyz-kiln/actions/runs/36844759795)
and [preview
deployment](https://github.com/hakula139/hakula.xyz-kiln/actions/runs/36844759510)
passed on final commit `fb1069b`. The minified kiln build rendered and
indexed 75 pages.
- Headless Chromium audited 56 generated-page / theme / viewport
combinations at 1440px and 390px, covering navigation, home cards,
archives, taxonomies, profile, links, guestbook, representative
articles, code, math, tables, callouts, and 404. No horizontal overflow
was observed.
- Desktop and mobile interaction checks covered light → dark → light,
placeholders, metadata, input focus, enabled / disabled send states,
local preview, emote popup, and search results. The final icon
correction is checked on visible reaction SVGs and their hover states.
Theme CSS loads before Twikoo's injected styles.
- Muted score-table text measures 5.34:1 contrast in light mode and
4.84:1 in dark mode. These measurements apply to that table. The
existing global link palette is unchanged.
- All four supported badge colors exceed 5:1 contrast in both themes.
Printing from light or dark mode resolves the light palette. The [hosted
preview](https://pr-87-hakula-xyz-kiln.hakula.workers.dev/posts/tutorial/lr2/)
serves `fb1069b`. Direct preview checks repeated the desktop/mobile
light → dark → light interactions, all badge variants, validation
states, search, and printing. The exact LR2 article also shows the
corrected badge in light and dark mode. No browser asset replacement or
submissions were used. Other browser engines, incompatible Nix systems,
and a production deployment were not tested.
- Production browsing was read-only. No comments, reactions, uploads,
production deployments, or merges were performed.

## Related PR

- [Theme implementation](hakula139/IgnIt#91)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant