Skip to content

Add color-background-weaker-elevation #4334

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

Merged
merged 9 commits into from
May 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changeset/flat-rice-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@twilio-paste/chat-composer": patch
"@twilio-paste/combobox": patch
"@twilio-paste/menu": patch
"@twilio-paste/topbar": patch
"@twilio-paste/design-tokens": patch
"@twilio-paste/core": patch
---

Visible changes in dark themes only. Redarkened color-background-weak and added color-background-weaker-elevation
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const ChatComposerAttachmentCard = React.forwardRef<HTMLDivElement, ChatComposer
ref={ref}
padding="space40"
borderRadius="borderRadius30"
backgroundColor="colorBackgroundBodyElevation"
backgroundColor="colorBackgroundWeakerElevation"
position="relative"
display="inline-flex"
columnGap="space30"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const getVirtualStyles = (startHeight: number): Record<string, unknown> => ({

function getBackgroundColor(highlightedProp?: boolean, selectedProp?: boolean): BackgroundColor {
if (highlightedProp && selectedProp) {
return "colorBackgroundWeak";
return "colorBackgroundWeakerElevation";
}
if (highlightedProp || selectedProp) {
return "colorBackgroundBodyElevationPrimary";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const StyledMenuItem = React.forwardRef<HTMLDivElement | HTMLAnchorElemen
{...variantStyles[variant]}
_checked_hover={
{
backgroundColor: "colorBackgroundWeak",
backgroundColor: "colorBackgroundWeakerElevation",
color: variant === MenuItemVariants.DESTRUCTIVE ? "colorTextDestructive" : "colorTextPrimary",
"& [data-paste-element='ICON']": {
color: "colorTextIcon",
Expand Down
2 changes: 1 addition & 1 deletion packages/paste-core/components/topbar/src/Topbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const Topbar = React.forwardRef<HTMLDivElement, TopbarProps>(
element={element}
width="100%"
minHeight="sizeTopbar"
backgroundColor="colorBackgroundWeakElevation"
backgroundColor="colorBackgroundWeak"
boxShadow="shadowElevationBottom05"
paddingX="space70"
position="sticky"
Expand Down
2 changes: 1 addition & 1 deletion packages/paste-core/primitives/box/type-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@
"description": "Responsive prop for the CSS `background-attachment` property"
},
"backgroundColor": {
"type": "\"none\" | \"inherit\" | \"colorBackground\" | \"colorBackgroundAvailable\" | \"colorBackgroundBody\" | \"colorBackgroundBodyElevation\" | \"colorBackgroundBodyElevationPrimary\" | \"colorBackgroundBodyInverse\" | ... 67 more ... | { ...; }",
"type": "\"none\" | \"inherit\" | \"colorBackground\" | \"colorBackgroundAvailable\" | \"colorBackgroundBody\" | \"colorBackgroundBodyElevation\" | \"colorBackgroundBodyElevationPrimary\" | \"colorBackgroundBodyInverse\" | ... 68 more ... | { ...; }",
"defaultValue": null,
"required": false,
"externalProp": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/paste-core/primitives/sibling-box/type-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@
"description": "Responsive prop for the CSS `background-attachment` property"
},
"backgroundColor": {
"type": "\"none\" | \"inherit\" | \"colorBackground\" | \"colorBackgroundAvailable\" | \"colorBackgroundBody\" | \"colorBackgroundBodyElevation\" | \"colorBackgroundBodyElevationPrimary\" | \"colorBackgroundBodyInverse\" | ... 67 more ... | { ...; }",
"type": "\"none\" | \"inherit\" | \"colorBackground\" | \"colorBackgroundAvailable\" | \"colorBackgroundBody\" | \"colorBackgroundBodyElevation\" | \"colorBackgroundBodyElevationPrimary\" | \"colorBackgroundBodyInverse\" | ... 68 more ... | { ...; }",
"defaultValue": null,
"required": false,
"externalProp": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ exports[`Design Tokens matches the Dark theme 1`] = `
\\"color-background-elevation\\": \\"rgb(31, 48, 76)\\",
\\"color-background-warning-weakest\\": \\"rgb(64, 19, 15)\\",
\\"color-background-inverse-strong\\": \\"rgb(57, 71, 98)\\",
\\"color-background-weaker-elevation\\": \\"rgb(24, 37, 60)\\",
\\"color-background-new\\": \\"rgb(56, 14, 120)\\",
\\"color-background-inverse-elevation\\": \\"rgb(37, 57, 91)\\",
\\"color-background-strong\\": \\"rgb(31, 48, 76)\\",
\\"color-background-new-weakest\\": \\"rgb(18, 28, 45)\\",
\\"color-background-destructive\\": \\"rgb(219, 19, 42)\\",
\\"color-background-weak\\": \\"rgb(24, 37, 60)\\",
\\"color-background-weak\\": \\"rgb(18, 28, 45)\\",
\\"color-background-primary\\": \\"rgb(2, 99, 224)\\",
\\"color-background-primary-weakest\\": \\"rgb(18, 28, 45)\\",
\\"color-background-busy\\": \\"rgb(244, 124, 34)\\",
Expand Down Expand Up @@ -502,6 +503,7 @@ exports[`Design Tokens matches the Global theme 1`] = `
\\"color-background-elevation\\": \\"rgb(237, 238, 242)\\",
\\"color-background-warning-weakest\\": \\"rgb(254, 245, 238)\\",
\\"color-background-inverse-strong\\": \\"rgb(57, 71, 98)\\",
\\"color-background-weaker-elevation\\": \\"rgb(249, 249, 250)\\",
\\"color-background-new\\": \\"rgb(245, 240, 252)\\",
\\"color-background-inverse-elevation\\": \\"rgb(37, 57, 91)\\",
\\"color-background-strong\\": \\"rgb(225, 227, 234)\\",
Expand Down Expand Up @@ -988,6 +990,7 @@ exports[`Design Tokens matches the Sendgrid theme 1`] = `
\\"color-background-elevation\\": \\"rgb(237, 238, 242)\\",
\\"color-background-warning-weakest\\": \\"rgb(254, 245, 238)\\",
\\"color-background-inverse-strong\\": \\"rgb(57, 71, 98)\\",
\\"color-background-weaker-elevation\\": \\"rgb(249, 249, 250)\\",
\\"color-background-new\\": \\"rgb(245, 240, 252)\\",
\\"color-background-inverse-elevation\\": \\"rgb(37, 57, 91)\\",
\\"color-background-strong\\": \\"rgb(225, 227, 234)\\",
Expand Down Expand Up @@ -1474,12 +1477,13 @@ exports[`Design Tokens matches the Twilio Dark theme 1`] = `
\\"color-background-elevation\\": \\"rgb(31, 48, 76)\\",
\\"color-background-warning-weakest\\": \\"rgb(18, 28, 45)\\",
\\"color-background-inverse-strong\\": \\"rgb(31, 48, 76)\\",
\\"color-background-weaker-elevation\\": \\"rgb(24, 37, 60)\\",
\\"color-background-new\\": \\"rgb(56, 14, 120)\\",
\\"color-background-inverse-elevation\\": \\"rgb(24, 37, 60)\\",
\\"color-background-strong\\": \\"rgb(31, 48, 76)\\",
\\"color-background-new-weakest\\": \\"rgb(18, 28, 45)\\",
\\"color-background-destructive\\": \\"rgb(219, 19, 42)\\",
\\"color-background-weak\\": \\"rgb(24, 37, 60)\\",
\\"color-background-weak\\": \\"rgb(18, 28, 45)\\",
\\"color-background-primary\\": \\"rgb(0, 109, 250)\\",
\\"color-background-primary-weakest\\": \\"rgb(18, 28, 45)\\",
\\"color-background-busy\\": \\"rgb(244, 124, 34)\\",
Expand Down Expand Up @@ -1960,6 +1964,7 @@ exports[`Design Tokens matches the Twilio theme 1`] = `
\\"color-background-elevation\\": \\"rgb(237, 238, 242)\\",
\\"color-background-warning-weakest\\": \\"rgb(253, 247, 244)\\",
\\"color-background-inverse-strong\\": \\"rgb(31, 48, 76)\\",
\\"color-background-weaker-elevation\\": \\"rgb(249, 249, 250)\\",
\\"color-background-new\\": \\"rgb(245, 240, 252)\\",
\\"color-background-inverse-elevation\\": \\"rgb(24, 37, 60)\\",
\\"color-background-strong\\": \\"rgb(225, 227, 234)\\",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ props:
color-background-weak-elevation:
value: "{!palette-gray-05}"
comment: Elevation token for color-background-weak elements.
color-background-weaker-elevation:
value: "{!palette-gray-05}"
comment: Elevation token for color-background-weak elements.
color-background-elevation:
value: "{!palette-gray-15}"
comment: Elevation token for color-background elements.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ props:
value: "{!palette-gray-80}"
comment: Stronger inverse background color for any container. Must be used on color-background-body-inverse.
color-background-weak:
value: "{!palette-gray-95}"
value: "{!palette-gray-100}"
comment: Weak default background color.
color-background-weaker:
value: "{!palette-gray-100}"
Expand Down Expand Up @@ -207,6 +207,9 @@ props:
color-background-weak-elevation:
value: "{!palette-gray-90}"
comment: Elevation token for color-background-weak elements.
color-background-weaker-elevation:
value: "{!palette-gray-95}"
comment: Elevation token for color-background-weak elements.
color-background-elevation:
value: "{!palette-gray-90}"
comment: Elevation token for color-background elements.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading