Skip to content

提高 toast z-index、新增暗色主題支援、重寫文件站 - #27

Merged
porksteak merged 5 commits into
masterfrom
fix/toast-z-index
Aug 17, 2026
Merged

porksteak merged 5 commits into
masterfrom
fix/toast-z-index

Conversation

@porksteak

Copy link
Copy Markdown
Collaborator

No description provided.

porksteak and others added 5 commits August 14, 2026 12:13
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Every colour is now read through a --dialogify-* custom property whose
fallback is the existing light value, so the default look is unchanged
and a page can retheme without overriding rules.

Dark mode is opt-in: the palette only applies under [data-theme="dark"],
with "auto" following prefers-color-scheme. Following the OS by default
would restyle every existing site the moment its visitor switches theme.

The dark rules declare custom properties only, never a real property, so
stylesheets that already override .dialogify keep winning by source order.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The old page was a single Material Design Lite file that had drifted well
behind the library: whole features shipped without ever being written down,
and MDL itself has been unmaintained for years.

This replaces it with a three column reference — section nav, content, per
page table of contents — that walks through every option, method, event,
declarative attribute and theme property, each with a runnable demo next to
the snippet that produces it.

Two things are new. The site carries a light/dark switch bound to the same
data-theme attribute the dialog reads, so flipping it themes the page and the
dialogs together and doubles as a live demo of the 2.3.0 palette. And the
whole page is bilingual: Traditional Chinese lives in the markup and English
in a separate dictionary keyed by data-i18n, which keeps the default language
readable with JavaScript off and leaves nothing duplicated.

eslint and prettier now cover the hand written files under docs/, which is
why the ajax fixture is reformatted.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- keep site-only work out of the changelog
- drop the favicon: the close glyph does not represent the package
- render the star button through a re-run of buttons.js so it picks up the
  colour scheme, and switch it to the large size
- drive the theme icons from CSS: `hidden` is an HTMLElement property and
  the UA rule is namespaced to HTML, so it never applied to the SVGs and
  all three showed at once; toggling now also raises a toast
- leave drawer, toast and popover untranslated
- call preventDefault() in the demos that must stay open, since a primary
  button submits the dialog form, and document that behaviour
- follow the reading position in the sidebar and stop the filter focus
  ring being clipped by the scroll container
- hide the menu button when the sidebar is already open; the .icon-button
  rule was overriding it on order

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
applyLang() re-highlighted every translated code block on boot, before
decorateCode() had run, so the second pass logged "Element previously
highlighted." for each of them. It now only redoes blocks that were
already highlighted, and decorateCode() skips those.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@porksteak
porksteak merged commit 848e658 into master Aug 17, 2026
2 checks passed
@porksteak
porksteak deleted the fix/toast-z-index branch August 17, 2026 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant