Add glass (glassmorphic) theme and CSS-only demo toggle#58
Draft
Add glass (glassmorphic) theme and CSS-only demo toggle#58
Conversation
✅ Deploy Preview for pui-demo ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
Size Change: +377 B (+3.55%) Total Size: 11 kB
ℹ️ View Unchanged
|
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.
Motivation
Description
src/variables.cssincluding--p-glass-backdrop,--p-theme-bg, and a scoped theme block selectable via:root:has(#pui-theme-glass:checked),[data-theme="glass"], or.glass.--p-theme-bgand set--p-glass-backdrop: blur(18px) saturate(140%)to drive the glassmorphic look.src/components/card/style.css,src/components/popover/style.css, andsrc/components/hover-card/style.cssto usevar(--p-glass-backdrop).#pui-theme-glassindemo/index.html, adding a label toggle indemo/src/nav.tsx, and styling the toggle and demo background indemo/src/style.cssto use--p-theme-bgand the backdrop variable.Testing
pnpm -C demo exec vite --host 0.0.0.0 --port 4173and confirmed the server reported ready.http://127.0.0.1:4173/, clicked the "Glass" toggle, and produced a screenshot atartifacts/pui-glass-theme.png, which completed successfully.Codex Task