-
Notifications
You must be signed in to change notification settings - Fork 36
feat(Chatbot): applied glass and felt tokens #849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c1eacd5
273a1f2
d7143fe
eccd4a6
23b19a5
d404246
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,10 +9,7 @@ | |
| flex-direction: column; | ||
| width: 30rem; | ||
| height: 70vh; | ||
| background-color: var( | ||
| --pf-t--global--background--color--floating--secondary--default, | ||
| --pf-t--global--background--color--secondary--default | ||
| ); | ||
| background-color: var(--pf-t--global--background--color--floating--secondary--default); | ||
| border-radius: var(--pf-t--global--border--radius--medium); | ||
| box-shadow: var(--pf-t--global--box-shadow--lg); | ||
| font-size: var(--pf-t--global--font--size--md); | ||
|
|
@@ -31,9 +28,8 @@ | |
| opacity: 1; | ||
| transform: translateY(0); | ||
| } | ||
| // for high contrast support | ||
| border: var(--pf-t--global--border--width--high-contrast--regular) solid | ||
| var(--pf-t--global--border--color--high-contrast); | ||
|
|
||
| border: var(--pf-t--global--border--width--regular) solid var(--pf-t--global--border--color--subtle); | ||
|
|
||
| // 32 rem is the width of the overlay chatbot plus the insets | ||
| // if the screen is smaller, we want to be 100% | ||
|
|
@@ -46,24 +42,41 @@ | |
| @media screen and (max-height: 518px) { | ||
| overflow: auto; | ||
| } | ||
|
|
||
| &:not(&--default) { | ||
| background-color: var( | ||
| --pf-t--global--background--color--glass--primary--default, | ||
| var(--pf-t--global--background--color--secondary--default) | ||
| ); | ||
| } | ||
| } | ||
|
|
||
| :root:where(.pf-v6-theme-felt):not(.pf-v6-theme-glass) { | ||
| .pf-chatbot.pf-chatbot--default { | ||
| box-shadow: var(--pf-t--global--box-shadow--md); | ||
| } | ||
| } | ||
|
|
||
| // ============================================================================ | ||
| // Chatbot Display Mode - Docked | ||
| // ============================================================================ | ||
| .pf-chatbot--docked { | ||
| // for high contrast support | ||
| border: unset; | ||
| border-left: var(--pf-t--global--border--width--high-contrast--regular) solid | ||
| var(--pf-t--global--border--color--high-contrast); | ||
| border-left: var(--pf-t--global--border--width--regular) solid var(--pf-t--global--border--color--subtle); | ||
| inset-block-end: 0; | ||
| inset-inline-end: 0; | ||
| padding: 0; | ||
| height: 100%; | ||
| border-radius: 0; | ||
| box-shadow: var(--pf-t--global--box-shadow--lg--left); | ||
| overflow: inherit; | ||
|
|
||
| @at-root :where(.pf-v6-theme-glass) & { | ||
| border-left: var(--pf-t--global--border--width--glass--default) solid | ||
| var(--pf-t--global--border--color--glass--default); | ||
| box-shadow: var(--pf-t--global--box-shadow--md--left); | ||
| backdrop-filter: var(--pf-t--global--background--filter--glass--blur--primary); | ||
| } | ||
|
|
||
| // 30rem is the width of the docked chatbot | ||
| // if the screen is smaller, we want to be 100% | ||
| @media screen and (max-width: 30rem) { | ||
|
|
@@ -75,9 +88,6 @@ | |
| // Chatbot Display Mode - Fullscreen | ||
| // ============================================================================ | ||
| .pf-chatbot--fullscreen { | ||
| background-color: var(--pf-t--global--background--color--secondary--default); | ||
|
|
||
| // for high contrast support | ||
| border: unset; | ||
| inset-block-end: 0; | ||
| inset-inline-end: 0; | ||
|
|
@@ -86,21 +96,27 @@ | |
| height: 100%; | ||
| border-radius: 0; | ||
| box-shadow: none; | ||
|
|
||
| @at-root :where(.pf-v6-theme-glass) & { | ||
| backdrop-filter: var(--pf-t--global--background--filter--glass--blur--primary); | ||
| } | ||
| } | ||
|
|
||
| // ============================================================================ | ||
| // Chatbot Display Mode - Embedded | ||
| // ============================================================================ | ||
| .pf-chatbot--embedded { | ||
| background-color: var(--pf-t--global--background--color--secondary--default); | ||
|
|
||
| // for high contrast support | ||
| border: unset; | ||
| position: static; | ||
| width: 100%; | ||
| min-height: 100%; | ||
| border-radius: 0; | ||
| box-shadow: none; | ||
| box-shadow: var(--pf-t--global--box-shadow--lg); | ||
|
|
||
| @at-root :where(.pf-v6-theme-glass) & { | ||
| border: var(--pf-t--global--border--width--glass--default) solid var(--pf-t--global--border--color--glass--default); | ||
| box-shadow: var(--pf-t--global--box-shadow--md); | ||
| backdrop-filter: var(--pf-t--global--background--filter--glass--blur--primary); | ||
| } | ||
| } | ||
|
|
||
| .pf-chatbot-container { | ||
|
|
@@ -143,19 +159,19 @@ | |
| height: 100%; | ||
| border-radius: 0; | ||
| box-shadow: none; | ||
| border-color: var(--pf-t--global--border--color--default); | ||
| border-color: var(--pf-t--global--border--color--subtle); | ||
|
|
||
| .pf-chatbot-container { | ||
| border-radius: var(--pf-t--global--border--radius--sharp); | ||
| @at-root :where(.pf-v6-theme-glass) & { | ||
| border: var(--pf-t--global--border--width--glass--default) solid var(--pf-t--global--border--color--glass--default); | ||
| box-shadow: var(--pf-t--global--box-shadow--md); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comment here about the glass box shadow token |
||
| backdrop-filter: var(--pf-t--global--background--filter--glass--blur--primary); | ||
| } | ||
|
|
||
| @media screen and (min-width: 768px) { | ||
| // only want if drawer open - drawer closes/stops being inline on mobile | ||
| border-left: var(--pf-t--global--border--width--divider--default) solid; | ||
| .pf-chatbot-container { | ||
| border-radius: var(--pf-t--global--border--radius--sharp); | ||
| } | ||
| } | ||
|
|
||
| // for high contrast support | ||
| :root:where(.pf-v6-theme-high-contrast) { | ||
| .pf-chatbot--drawer { | ||
| border: unset; | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -3,10 +3,7 @@ | |||||||||||||||||||||||||||||||
| // ============================================================================ | ||||||||||||||||||||||||||||||||
| .pf-chatbot__content { | ||||||||||||||||||||||||||||||||
| position: relative; | ||||||||||||||||||||||||||||||||
| background-color: var( | ||||||||||||||||||||||||||||||||
| --pf-t--global--background--color--floating--secondary--default, | ||||||||||||||||||||||||||||||||
| --pf-t--global--background--color--secondary--default | ||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||
| background-color: var(--pf-t--global--background--color--floating--secondary--default); | ||||||||||||||||||||||||||||||||
| overflow-y: auto; | ||||||||||||||||||||||||||||||||
| overflow: hidden; // needed in Red Hat Developer Hub workspace | ||||||||||||||||||||||||||||||||
| flex: 1; // needed in Composer AI | ||||||||||||||||||||||||||||||||
|
|
@@ -21,6 +18,15 @@ | |||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| .pf-chatbot:not(.pf-chatbot--default) { | ||||||||||||||||||||||||||||||||
| .pf-chatbot__content { | ||||||||||||||||||||||||||||||||
| background-color: var( | ||||||||||||||||||||||||||||||||
| --pf-t--global--background--color--glass--primary--default, | ||||||||||||||||||||||||||||||||
| var(--pf-t--global--background--color--secondary--default) | ||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
|
Comment on lines
+21
to
+29
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||
| // ============================================================================ | ||||||||||||||||||||||||||||||||
| // Chatbot Display Mode - Fullscreen and Embedded | ||||||||||||||||||||||||||||||||
| // ============================================================================ | ||||||||||||||||||||||||||||||||
|
|
@@ -29,7 +35,6 @@ | |||||||||||||||||||||||||||||||
| .pf-chatbot--fullscreen, | ||||||||||||||||||||||||||||||||
| .pf-chatbot--embedded { | ||||||||||||||||||||||||||||||||
| .pf-chatbot__content { | ||||||||||||||||||||||||||||||||
| background-color: var(--pf-t--global--background--color--secondary--default); | ||||||||||||||||||||||||||||||||
| display: flex; | ||||||||||||||||||||||||||||||||
| justify-content: center; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do have a glass box-shadow token (
--pf-t--global--box-shadow--glass--default) if that's the intent here. It resolves to--md, but if design ever decided to update the default glass container box-shadow, using the glass token would get that update where using--mdwouldn't. Though up to design if that's the intent of this shadow, or if it should be fixed at--md