Skip to content

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

build(theme): make generated style outputs reproducible

Gabe Kangas44ad45586ad4
diff --git a/web/.prettierignore b/web/.prettierignore
index 1a0fbb0558..bb613d5993 100644
--- a/web/.prettierignore
+++ b/web/.prettierignore
@@ -1,4 +1,3 @@
# Ignore artifacts:
node_modules
out
-styles/variables.css
diff --git a/web/public/styles/plugin.css b/web/public/styles/plugin.css
index f7faee149d..77baacb226 100644
--- a/web/public/styles/plugin.css
+++ b/web/public/styles/plugin.css
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Wed, 03 Jun 2026 00:47:31 GMT
+ * This file is generated from the token sources under style-definitions/.
*
* How to edit these values:
* Edit the corresponding token file under the style-definitions directory
@@ -32,7 +32,7 @@
--primary-8: #da9eff; /* Fun color 2 */
--component-background: #e2e8f0; /* Light primary */
--body-background: #e2e8f0; /* Light primary */
- --theme-rounded-corners: 5px; /* How much corners are rounded in places in the UI. */
+ --theme-rounded-corners: 9px; /* How much corners are rounded in places in the UI. */
--theme-unknown-1: green; /* This should never be used and it means something is wrong. */
--theme-unknown-2: red; /* This should never be used and it means something is wrong. */
--theme-text-body-font-family: var(
@@ -41,7 +41,14 @@
--theme-text-display-font-family: var(
--font-owncast-display
); /* The font family used for the display/header text. */
- --theme-color-users: var(--color-owncast-user-6); /* Colors used to display chat users. */
+ --theme-color-users-0: var(--color-owncast-user-0);
+ --theme-color-users-1: var(--color-owncast-user-1);
+ --theme-color-users-2: var(--color-owncast-user-2);
+ --theme-color-users-3: var(--color-owncast-user-3);
+ --theme-color-users-4: var(--color-owncast-user-4);
+ --theme-color-users-5: var(--color-owncast-user-5);
+ --theme-color-users-6: var(--color-owncast-user-6);
+ --theme-color-users-7: var(--color-owncast-user-7);
--theme-color-palette-0: var(--color-owncast-palette-0); /* Dark primary */
--theme-color-palette-1: var(--color-owncast-palette-1); /* Dark secondary */
--theme-color-palette-2: var(--color-owncast-palette-2); /* Dark alternate */
@@ -120,8 +127,8 @@
--theme-color-components-menu-background: var(--theme-color-palette-3); /* Light primary */
--theme-color-components-menu-item-text: var(--theme-color-palette-0); /* Dark primary */
--theme-color-components-menu-item-bg: transparent;
- --theme-color-components-menu-item-hover-bg: rgb(0 0 0 / 5%);
- --theme-color-components-menu-item-focus-bg: rgb(0 0 0 / 10%);
+ --theme-color-components-menu-item-hover-bg: rgba(0, 0, 0, 0.05);
+ --theme-color-components-menu-item-focus-bg: rgba(0, 0, 0, 0.1);
--theme-color-components-form-field-background: var(
--theme-color-palette-4
); /* Light secondary */
@@ -152,9 +159,9 @@
--color-owncast-user-7: #ff53ff;
--color-owncast-palette-0: #12161d; /* Dark primary */
--color-owncast-palette-1: #2d3748; /* Dark secondary */
- --color-owncast-palette-2: #000; /* Dark alternate */
+ --color-owncast-palette-2: #000000; /* Dark alternate */
--color-owncast-palette-3: #e2e8f0; /* Light primary */
- --color-owncast-palette-4: #fff; /* Light secondary */
+ --color-owncast-palette-4: #ffffff; /* Light secondary */
--color-owncast-palette-5: #c3dafe; /* Light alternate */
--color-owncast-palette-6: #6544e9; /* Text link/secondary light text */
--color-owncast-palette-7: #7a5cf3; /* Text link hover */
@@ -169,15 +176,14 @@
--color-owncast-palette-error: #ff4b39; /* Error */
--color-owncast-palette-warning: #ffc655; /* Warning */
--font-owncast-body:
- 'Inter', system-ui, -apple-system, blinkmacsystemfont, 'Segoe UI', roboto, 'Helvetica Neue',
- arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
+ 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
+ Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji';
--font-owncast-display:
- 'Poppins', system-ui, -apple-system, blinkmacsystemfont, 'Segoe UI', roboto, 'Helvetica Neue',
- arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
+ 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
+ Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji';
}
-
/*
* plugin-elements.css — hand-authored element baseline for plugin content.
*
diff --git a/web/style-definitions/build.sh b/web/style-definitions/build.sh
index be09534417..ebf737b7c1 100755
--- a/web/style-definitions/build.sh
+++ b/web/style-definitions/build.sh
@@ -8,3 +8,13 @@ mv build/variables.less ../styles/theme.less
# placed under public/ so the Owncast server serves it at /styles/plugin.css.
cat templates/plugin-elements.css >> build/plugin.css
mv build/plugin.css ../public/styles/plugin.css
+
+# Normalize the generated outputs with Prettier so `npm run build-styles`
+# reproduces the committed files exactly. Style Dictionary emits one long line
+# per token; Prettier wraps them deterministically. Run from the web/ root so
+# Prettier picks up the project config (and so styles/variables.css must not be
+# listed in .prettierignore).
+(cd .. && npx --yes prettier --write \
+ styles/variables.css \
+ styles/theme.less \
+ public/styles/plugin.css)
diff --git a/web/style-definitions/config.js b/web/style-definitions/config.js
index de185d9788..c6b06ee24b 100644
--- a/web/style-definitions/config.js
+++ b/web/style-definitions/config.js
@@ -3,8 +3,12 @@ const StyleDictionary = require('style-dictionary');
StyleDictionary.registerFileHeader({
name: 'myCustomHeader',
- fileHeader: defaultMessage => [
- ...defaultMessage,
+ // Intentionally omit Style Dictionary's default "Generated on <timestamp>"
+ // line. The timestamp made every regeneration produce a diff, so the
+ // committed outputs could never be reproduced byte-for-byte from the source.
+ fileHeader: () => [
+ `Do not edit directly`,
+ `This file is generated from the token sources under style-definitions/.`,
``,
`How to edit these values:`,
`Edit the corresponding token file under the style-definitions directory`,
diff --git a/web/styles/theme.less b/web/styles/theme.less
index 3d040e6f8a..7219e851f2 100644
--- a/web/styles/theme.less
+++ b/web/styles/theme.less
@@ -1,7 +1,6 @@
-
// Do not edit directly
-// Generated on Sun, 23 Apr 2023 00:45:01 GMT
-//
+// This file is generated from the token sources under style-definitions/.
+//
// How to edit these values:
// Edit the corresponding token file under the style-definitions directory
// in the Owncast web project.
@@ -34,7 +33,9 @@
@theme-unknown-1: green; // This should never be used and it means something is wrong.
@theme-unknown-2: red; // This should never be used and it means something is wrong.
@theme-text-body-font-family: var(--font-owncast-body); // The font family used for the body text.
-@theme-text-display-font-family: var(--font-owncast-display); // The font family used for the display/header text.
+@theme-text-display-font-family: var(
+ --font-owncast-display
+); // The font family used for the display/header text.
@theme-color-users-0: var(--color-owncast-user-0);
@theme-color-users-1: var(--color-owncast-user-1);
@theme-color-users-2: var(--color-owncast-user-2);
@@ -71,38 +72,72 @@
@theme-color-warning: var(--theme-color-palette-warning); // Warning
@theme-color-components-text-on-light: var(--theme-color-palette-0); // Dark primary
@theme-color-components-text-on-dark: var(--theme-color-palette-3); // Light primary
-@theme-color-components-primary-button-background: var(--theme-color-action); // Text link/secondary light text
-@theme-color-components-primary-button-background-disabled: var(--theme-color-action-disabled); // Disabled background
+@theme-color-components-primary-button-background: var(
+ --theme-color-action
+); // Text link/secondary light text
+@theme-color-components-primary-button-background-disabled: var(
+ --theme-color-action-disabled
+); // Disabled background
@theme-color-components-primary-button-text: var(--theme-color-palette-4); // Light secondary
-@theme-color-components-primary-button-text-disabled: var(--theme-color-palette-10); // Neutral gray light
+@theme-color-components-primary-button-text-disabled: var(
+ --theme-color-palette-10
+); // Neutral gray light
@theme-color-components-primary-button-border: var(--theme-color-action); // Light secondary
-@theme-color-components-primary-button-border-disabled: var(--theme-color-action-disabled); // Disabled background
-@theme-color-components-secondary-button-background: var(--theme-color-palette-4); // Light secondary
+@theme-color-components-primary-button-border-disabled: var(
+ --theme-color-action-disabled
+); // Disabled background
+@theme-color-components-secondary-button-background: var(
+ --theme-color-palette-4
+); // Light secondary
@theme-color-components-secondary-button-background-disabled: transparent;
-@theme-color-components-secondary-button-text: var(--theme-color-action-disabled); // Disabled background
-@theme-color-components-secondary-button-text-disabled: var(--theme-color-action-disabled); // Disabled background
-@theme-color-components-secondary-button-border: var(--theme-color-action); // Text link/secondary light text
-@theme-color-components-secondary-button-border-disabled: var(--theme-color-action-disabled); // Disabled background
+@theme-color-components-secondary-button-text: var(
+ --theme-color-action-disabled
+); // Disabled background
+@theme-color-components-secondary-button-text-disabled: var(
+ --theme-color-action-disabled
+); // Disabled background
+@theme-color-components-secondary-button-border: var(
+ --theme-color-action
+); // Text link/secondary light text
+@theme-color-components-secondary-button-border-disabled: var(
+ --theme-color-action-disabled
+); // Disabled background
@theme-color-components-chat-background: var(--theme-color-palette-1); // Dark primary
@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-components-modal-header-text: var(--theme-color-components-text-on-dark); // Light primary
-@theme-color-components-modal-content-background: var(--theme-color-components-content-background); // Lighter background
-@theme-color-components-modal-content-text: var(--theme-color-components-text-on-light); // Dark primary
+@theme-color-components-modal-header-background: var(
+ --theme-color-background-header
+); // Dark primary
+@theme-color-components-modal-header-text: var(
+ --theme-color-components-text-on-dark
+); // Light primary
+@theme-color-components-modal-content-background: var(
+ --theme-color-components-content-background
+); // Lighter background
+@theme-color-components-modal-content-text: var(
+ --theme-color-components-text-on-light
+); // Dark primary
@theme-color-components-menu-background: var(--theme-color-palette-3); // Light primary
@theme-color-components-menu-item-text: var(--theme-color-palette-0); // Dark primary
@theme-color-components-menu-item-bg: transparent;
@theme-color-components-menu-item-hover-bg: rgba(0, 0, 0, 0.05);
@theme-color-components-menu-item-focus-bg: rgba(0, 0, 0, 0.1);
@theme-color-components-form-field-background: var(--theme-color-palette-4); // Light secondary
-@theme-color-components-form-field-placeholder: var(--theme-color-action-disabled); // Disabled background
+@theme-color-components-form-field-placeholder: var(
+ --theme-color-action-disabled
+); // Disabled background
@theme-color-components-form-field-text: var(--theme-color-palette-0); // Dark primary
@theme-color-components-form-field-border: var(--theme-color-palette-0); // Dark primary
@theme-color-components-video-background: var(--theme-color-palette-2); // Dark alternate
-@theme-color-components-video-live-indicator: var(--theme-color-action); // The Live dot indicator in the control bar of the video player
-@theme-color-components-video-status-bar-background: var(--theme-color-palette-2); // The background color of the video status bar
-@theme-color-components-video-status-bar-foreground: var(--theme-color-palette-4); // The foreground color of the video status bar
+@theme-color-components-video-live-indicator: var(
+ --theme-color-action
+); // The Live dot indicator in the control bar of the video player
+@theme-color-components-video-status-bar-background: var(
+ --theme-color-palette-2
+); // The background color of the video status bar
+@theme-color-components-video-status-bar-foreground: var(
+ --theme-color-palette-4
+); // The foreground color of the video status bar
@color-unknown: #7a5cf3;
@color-unknown-2: #fffffe;
@color-owncast-user-0: #ff717b;
@@ -131,5 +166,33 @@
@color-owncast-palette-15: #eff1f4; // Lighter background
@color-owncast-palette-error: #ff4b39; // Error
@color-owncast-palette-warning: #ffc655; // Warning
-@font-owncast-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
-@font-owncast-display: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
\ No newline at end of file
+@font-owncast-body:
+ 'Inter',
+ system-ui,
+ -apple-system,
+ BlinkMacSystemFont,
+ 'Segoe UI',
+ Roboto,
+ 'Helvetica Neue',
+ Arial,
+ 'Noto Sans',
+ sans-serif,
+ 'Apple Color Emoji',
+ 'Segoe UI Emoji',
+ 'Segoe UI Symbol',
+ 'Noto Color Emoji';
+@font-owncast-display:
+ 'Poppins',
+ system-ui,
+ -apple-system,
+ BlinkMacSystemFont,
+ 'Segoe UI',
+ Roboto,
+ 'Helvetica Neue',
+ Arial,
+ 'Noto Sans',
+ sans-serif,
+ 'Apple Color Emoji',
+ 'Segoe UI Emoji',
+ 'Segoe UI Symbol',
+ 'Noto Color Emoji';
diff --git a/web/styles/variables.css b/web/styles/variables.css
index 42200fc639..a8cbef6755 100644
--- a/web/styles/variables.css
+++ b/web/styles/variables.css
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Sun, 23 Apr 2023 00:45:01 GMT
+ * This file is generated from the token sources under style-definitions/.
*
* How to edit these values:
* Edit the corresponding token file under the style-definitions directory