Repository navigation
提高 toast z-index、新增暗色主題支援、重寫文件站 - #27
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.