Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Give the modal header its own themeable secondary-surface color

Gabe Kangas5cf5bd8ee10f
diff --git a/web/public/styles/plugin.css b/web/public/styles/plugin.css
index 77baacb226..b53a3a7265 100644
--- a/web/public/styles/plugin.css
+++ b/web/public/styles/plugin.css
@@ -70,6 +70,7 @@
--theme-color-background-main: var(--theme-color-palette-3); /* Light primary */
--theme-color-background-light: var(--theme-color-palette-3); /* Light primary */
--theme-color-background-header: var(--theme-color-palette-0); /* Dark primary */
+ --theme-color-background-secondary: var(--theme-color-palette-1); /* Dark secondary */
--theme-color-action: var(--theme-color-palette-6); /* Text link/secondary light text */
--theme-color-action-hover: var(--theme-color-palette-7); /* Text link hover */
--theme-color-action-disabled: var(--theme-color-palette-8); /* Disabled background */
@@ -113,8 +114,8 @@
--theme-color-palette-15
); /* Lighter background */
--theme-color-components-modal-header-background: var(
- --theme-color-background-header
- ); /* Dark primary */
+ --theme-color-background-secondary
+ ); /* Dark secondary */
--theme-color-components-modal-header-text: var(
--theme-color-components-text-on-dark
); /* Light primary */
diff --git a/web/style-definitions/tokens/color/default-theme.yaml b/web/style-definitions/tokens/color/default-theme.yaml
index d4c00a24da..79f7d2e39c 100644
--- a/web/style-definitions/tokens/color/default-theme.yaml
+++ b/web/style-definitions/tokens/color/default-theme.yaml
@@ -107,6 +107,12 @@ theme:
header:
value: 'var(--theme-color-palette-0)'
comment: '{theme.color.palette.0.comment}'
+ # Secondary dark surface, a lighter dark blue than the near-black
+ # header/footer. Used by surfaces that sit on top of the page rather than
+ # framing it, such as the modal header.
+ secondary:
+ value: 'var(--theme-color-palette-1)'
+ comment: '{theme.color.palette.1.comment}'
action:
value: 'var(--theme-color-palette-6)'
@@ -186,14 +192,15 @@ theme:
comment: '{theme.color.palette.15.comment}'
# Modal colors follow the admin-configurable theme rather than fixed
- # palette entries so modals respect a custom appearance. The header
- # mirrors the page header/footer and the body mirrors the page content
- # area, including their respective text colors.
+ # palette entries so modals respect a custom appearance. The header is the
+ # secondary dark surface (a dark blue, distinct from the near-black page
+ # header/footer) and the body mirrors the page content area, including
+ # their respective text colors.
modal:
header:
background:
- value: 'var(--theme-color-background-header)'
- comment: '{theme.color.palette.0.comment}'
+ value: 'var(--theme-color-background-secondary)'
+ comment: '{theme.color.palette.1.comment}'
text:
value: 'var(--theme-color-components-text-on-dark)'
comment: '{theme.color.palette.3.comment}'
diff --git a/web/styles/theme.less b/web/styles/theme.less
index 7219e851f2..0d8db11013 100644
--- a/web/styles/theme.less
+++ b/web/styles/theme.less
@@ -65,6 +65,7 @@
@theme-color-background-main: var(--theme-color-palette-3); // Light primary
@theme-color-background-light: var(--theme-color-palette-3); // Light primary
@theme-color-background-header: var(--theme-color-palette-0); // Dark primary
+@theme-color-background-secondary: var(--theme-color-palette-1); // Dark secondary
@theme-color-action: var(--theme-color-palette-6); // Text link/secondary light text
@theme-color-action-hover: var(--theme-color-palette-7); // Text link hover
@theme-color-action-disabled: var(--theme-color-palette-8); // Disabled background
@@ -106,8 +107,8 @@
@theme-color-components-chat-text: var(--theme-color-palette-15); // Lighter background
@theme-color-components-content-background: var(--theme-color-palette-15); // Lighter background
@theme-color-components-modal-header-background: var(
- --theme-color-background-header
-); // Dark primary
+ --theme-color-background-secondary
+); // Dark secondary
@theme-color-components-modal-header-text: var(
--theme-color-components-text-on-dark
); // Light primary
diff --git a/web/styles/variables.css b/web/styles/variables.css
index a8cbef6755..f854789be0 100644
--- a/web/styles/variables.css
+++ b/web/styles/variables.css
@@ -70,6 +70,7 @@
--theme-color-background-main: var(--theme-color-palette-3); /* Light primary */
--theme-color-background-light: var(--theme-color-palette-3); /* Light primary */
--theme-color-background-header: var(--theme-color-palette-0); /* Dark primary */
+ --theme-color-background-secondary: var(--theme-color-palette-1); /* Dark secondary */
--theme-color-action: var(--theme-color-palette-6); /* Text link/secondary light text */
--theme-color-action-hover: var(--theme-color-palette-7); /* Text link hover */
--theme-color-action-disabled: var(--theme-color-palette-8); /* Disabled background */
@@ -113,8 +114,8 @@
--theme-color-palette-15
); /* Lighter background */
--theme-color-components-modal-header-background: var(
- --theme-color-background-header
- ); /* Dark primary */
+ --theme-color-background-secondary
+ ); /* Dark secondary */
--theme-color-components-modal-header-text: var(
--theme-color-components-text-on-dark
); /* Light primary */
diff --git a/web/tests/modalTheming.test.ts b/web/tests/modalTheming.test.ts
index 8e176dba28..c249bd566b 100644
--- a/web/tests/modalTheming.test.ts
+++ b/web/tests/modalTheming.test.ts
@@ -70,7 +70,7 @@ describe('modal theming', () => {
'--theme-color-components-content-background',
],
['--theme-color-components-modal-content-text', '--theme-color-components-text-on-light'],
- ['--theme-color-components-modal-header-background', '--theme-color-background-header'],
+ ['--theme-color-components-modal-header-background', '--theme-color-background-secondary'],
['--theme-color-components-modal-header-text', '--theme-color-components-text-on-dark'],
];