Skip to content

feat(glass): added glass theme - #7973

Merged
mcoker merged 1 commit into
patternfly:mainfrom
mcoker:issue-7972
Nov 6, 2025
Merged

mcoker merged 1 commit into
patternfly:mainfrom
mcoker:issue-7972

Conversation

@mcoker

@mcoker mcoker commented Nov 5, 2025 •

Copy link
Copy Markdown
Contributor

fixes #7972. I listed some acceptance criteria in the description of #7972 if you want to reference.

Compass with drawer demo to test - https://pf-pr-7973.surge.sh/components/compass/html-demos/with-drawer/

This adds

  • .pf-v6-theme-glass - added to <html>, turns on the glass theme
  • .pf-v6-c-drawer__panel.pf-m-no-glass - added to a pill drawer variant, disables glass styling when glass theme is enabled.

This PR creates these 4 tokens that can be used for theming

  • --pf-t--global--[light/dark]--glass--background--color--glass--color
    • glass background color base. Takes any kind of color (uses color-mix())
  • --pf-t--global--[light/dark]--glass--background--color--glass--opacity
    • glass background color opacity
  • --pf-t--global--[light/dark]--glass--background--color--glass--filter
    • glass background (backdrop) filter(s)
  • --pf-t--global--[light/dark]--glass--background--color--glass--default
    • this is used to set the combo of --color and --opacity above. If you theme it, it will override the --color and --opacity above. Maybe useful if you wanted to pass your own color function or something.

I used these values to test (you have to disable the --default vars for --color and --opacity to work)

--pf-t--global--light--glass--background--color--glass--color: red;
--pf-t--global--light--glass--background--color--glass--opacity: 50%;
--pf-t--global--light--glass--background--color--glass--filter: blur(5px) hue-rotate(180deg);
--pf-t--global--light--glass--background--color--glass--default: rgb(255, 255, 0, 0.5);
--pf-t--global--dark--glass--background--color--glass--color: green;
--pf-t--global--dark--glass--background--color--glass--opacity: 10%;
--pf-t--global--dark--glass--background--color--glass--filter: blur(2px) hue-rotate(90deg);
--pf-t--global--dark--glass--background--color--glass--default: purple;
Screenshot 2025-11-05 at 6 46 35 PM Screenshot 2025-11-05 at 6 46 43 PM

@patternfly-build

patternfly-build commented Nov 6, 2025 •

Copy link
Copy Markdown
Collaborator

@mcoker
mcoker requested a review from srambach November 6, 2025 00:36

@srambach srambach left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L 👓 TM

@mcoker
mcoker merged commit a69a552 into patternfly:main Nov 6, 2025
4 checks passed
@mcoker
mcoker deleted the issue-7972 branch November 6, 2025 16:28
@patternfly-build

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 6.5.0-prerelease.19 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add glass theme

3 participants