[theme]: Replace :host-context with @container style() queries#1299
[theme]: Replace :host-context with @container style() queries#1299fallaciousreasoning wants to merge 4 commits into
:host-context with @container style() queries#1299Conversation
|
👋 Thanks for Submitting! This PR is available for preview at the link below. ✅ PR tip preview: https://1299.pr.nala.bravesoftware.com/ - ./tokens/css/variables-android.old.css: 7390 bytes
+ ./tokens/css/variables-android.css: 7688 bytes
---
- ./tokens/css/variables-browser.old.css: 6644 bytes
+ ./tokens/css/variables-browser.css: 6780 bytes
---
- ./tokens/css/variables-ios.old.css: 8180 bytes
+ ./tokens/css/variables-ios.css: 8478 bytes
---
- ./tokens/css/variables-marketing.old.css: 13501 bytes
+ ./tokens/css/variables-marketing.css: 13637 bytes
---
- ./tokens/css/variables-news.old.css: 526 bytes
+ ./tokens/css/variables-news.css: 824 bytes
---
- ./tokens/css/variables-newtab.old.css: 1933 bytes
+ ./tokens/css/variables-newtab.css: 2231 bytes
---
- ./tokens/css/variables-search.old.css: 28568 bytes
+ ./tokens/css/variables-search.css: 28704 bytes
---
- ./tokens/css/variables-web3.old.css: 893 bytes
+ ./tokens/css/variables-web3.css: 1029 bytes
---
- ./tokens/css/variables.old.css: 132719 bytes
+ ./tokens/css/variables.css: 132855 bytes
Variables Diff: variables-android.diff--- ./tokens/css/variables-android.old.css 2026-02-02 02:18:59.800911711 +0000
+++ ./tokens/css/variables-android.css 2026-02-02 02:18:26.238693567 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Wed Jan 28 2026 19:19:02 GMT+0000 (Coordinated Universal Time)
+ * Generated on Mon Feb 02 2026 02:18:26 GMT+0000 (Coordinated Universal Time)
*/
:root {
@@ -124,3 +124,27 @@
--leo-typography-android-x-small-semibold-paragraph-indent: 0;
--leo-typography-android-x-small-semibold-paragraph-spacing: 0;
}
+
+@media (prefers-color-scheme: light) {
+ :root {
+ --leo-theme: light;
+
+ }
+}
+
+@media (prefers-color-scheme: dark) {
+ :root {
+ --leo-theme: dark;
+
+ }
+}
+
+[data-theme="light"] { container-type: normal;
+ --leo-theme: light;
+
+}
+
+[data-theme="dark"] { container-type: normal;
+ --leo-theme: dark;
+
+}
Variables Diff: variables-browser.diff--- ./tokens/css/variables-browser.old.css 2026-02-02 02:19:00.031913200 +0000
+++ ./tokens/css/variables-browser.css 2026-02-02 02:18:26.224693475 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Wed Jan 28 2026 19:19:02 GMT+0000 (Coordinated Universal Time)
+ * Generated on Mon Feb 02 2026 02:18:26 GMT+0000 (Coordinated Universal Time)
*/
:root {
@@ -99,6 +99,7 @@
@media (prefers-color-scheme: light) {
:root {
+ --leo-theme: light;
--leo-effect-active-tab-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
--leo-effect-browser-frame-shadow-0: 0px 0px 0px 0.75px rgba(6, 6, 5, 0.2);
--leo-effect-browser-frame-shadow-1: inset 0px 1px 0.5px 0px rgba(255, 255, 255, 0.32);
@@ -108,6 +109,7 @@
@media (prefers-color-scheme: dark) {
:root {
+ --leo-theme: dark;
--leo-effect-active-tab-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
--leo-effect-browser-frame-shadow-0: 0px 0px 0px 0.75px rgba(6, 6, 5, 0.2);
--leo-effect-browser-frame-shadow-1: inset 0px 1px 0.5px 0px rgba(255, 255, 255, 0.32);
@@ -115,14 +117,16 @@
}
}
-[data-theme="light"] {
+[data-theme="light"] { container-type: normal;
+ --leo-theme: light;
--leo-effect-active-tab-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
--leo-effect-browser-frame-shadow-0: 0px 0px 0px 0.75px rgba(6, 6, 5, 0.2);
--leo-effect-browser-frame-shadow-1: inset 0px 1px 0.5px 0px rgba(255, 255, 255, 0.32);
--leo-effect-url-bar-shadow: 0px 1px 2px -1px rgba(0, 0, 0, 0.1), 0px 4px 8px -2px rgba(0, 0, 0, 0.1);
}
-[data-theme="dark"] {
+[data-theme="dark"] { container-type: normal;
+ --leo-theme: dark;
--leo-effect-active-tab-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
--leo-effect-browser-frame-shadow-0: 0px 0px 0px 0.75px rgba(6, 6, 5, 0.2);
--leo-effect-browser-frame-shadow-1: inset 0px 1px 0.5px 0px rgba(255, 255, 255, 0.32);
Variables Diff: variables-ios.diff--- ./tokens/css/variables-ios.old.css 2026-02-02 02:19:00.252914625 +0000
+++ ./tokens/css/variables-ios.css 2026-02-02 02:18:26.255693677 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Wed Jan 28 2026 19:19:02 GMT+0000 (Coordinated Universal Time)
+ * Generated on Mon Feb 02 2026 02:18:26 GMT+0000 (Coordinated Universal Time)
*/
:root {
@@ -124,3 +124,27 @@
--leo-typography-ios-x-small-semibold-paragraph-indent: 0;
--leo-typography-ios-x-small-semibold-paragraph-spacing: 0;
}
+
+@media (prefers-color-scheme: light) {
+ :root {
+ --leo-theme: light;
+
+ }
+}
+
+@media (prefers-color-scheme: dark) {
+ :root {
+ --leo-theme: dark;
+
+ }
+}
+
+[data-theme="light"] { container-type: normal;
+ --leo-theme: light;
+
+}
+
+[data-theme="dark"] { container-type: normal;
+ --leo-theme: dark;
+
+}
Variables Diff: variables-marketing.diff--- ./tokens/css/variables-marketing.old.css 2026-02-02 02:19:00.496916197 +0000
+++ ./tokens/css/variables-marketing.css 2026-02-02 02:18:26.277693821 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Wed Jan 28 2026 19:19:02 GMT+0000 (Coordinated Universal Time)
+ * Generated on Mon Feb 02 2026 02:18:26 GMT+0000 (Coordinated Universal Time)
*/
:root {
@@ -218,6 +218,7 @@
@media (prefers-color-scheme: light) {
:root {
+ --leo-theme: light;
--leo-effect-stroke: 0px 0px 0px 3px rgb(0, 0, 0);
--leo-effect-stroke-shadow: 8px 8px 0px 0px rgb(0, 0, 0), 0px 0px 0px 3px rgb(0, 0, 0);
}
@@ -225,17 +226,20 @@
@media (prefers-color-scheme: dark) {
:root {
+ --leo-theme: dark;
--leo-effect-stroke: 0px 0px 0px 3px rgb(0, 0, 0);
--leo-effect-stroke-shadow: 8px 8px 0px 0px rgb(0, 0, 0), 0px 0px 0px 3px rgb(0, 0, 0);
}
}
-[data-theme="light"] {
+[data-theme="light"] { container-type: normal;
+ --leo-theme: light;
--leo-effect-stroke: 0px 0px 0px 3px rgb(0, 0, 0);
--leo-effect-stroke-shadow: 8px 8px 0px 0px rgb(0, 0, 0), 0px 0px 0px 3px rgb(0, 0, 0);
}
-[data-theme="dark"] {
+[data-theme="dark"] { container-type: normal;
+ --leo-theme: dark;
--leo-effect-stroke: 0px 0px 0px 3px rgb(0, 0, 0);
--leo-effect-stroke-shadow: 8px 8px 0px 0px rgb(0, 0, 0), 0px 0px 0px 3px rgb(0, 0, 0);
}
Variables Diff: variables-news.diff--- ./tokens/css/variables-news.old.css 2026-02-02 02:19:00.749917828 +0000
+++ ./tokens/css/variables-news.css 2026-02-02 02:18:26.326694141 +0000
@@ -1,9 +1,33 @@
/**
* Do not edit directly
- * Generated on Wed Jan 28 2026 19:19:02 GMT+0000 (Coordinated Universal Time)
+ * Generated on Mon Feb 02 2026 02:18:26 GMT+0000 (Coordinated Universal Time)
*/
:root {
--leo-gradient-stroke-gradient-dark: linear-gradient(155.40180080220492deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.15) 41%, rgba(255, 255, 255, 0) 56.99999999999999%, rgba(255, 255, 255, 0.05) 100%);
--leo-gradient-stroke-gradient-light: linear-gradient(155.40180080220492deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0) 41%, rgba(0, 0, 0, 0) 56.99999999999999%, rgba(0, 0, 0, 0.15) 100%);
}
+
+@media (prefers-color-scheme: light) {
+ :root {
+ --leo-theme: light;
+
+ }
+}
+
+@media (prefers-color-scheme: dark) {
+ :root {
+ --leo-theme: dark;
+
+ }
+}
+
+[data-theme="light"] { container-type: normal;
+ --leo-theme: light;
+
+}
+
+[data-theme="dark"] { container-type: normal;
+ --leo-theme: dark;
+
+}
Variables Diff: variables-newtab.diff--- ./tokens/css/variables-newtab.old.css 2026-02-02 02:19:00.986919353 +0000
+++ ./tokens/css/variables-newtab.css 2026-02-02 02:18:26.336694207 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Wed Jan 28 2026 19:19:02 GMT+0000 (Coordinated Universal Time)
+ * Generated on Mon Feb 02 2026 02:18:26 GMT+0000 (Coordinated Universal Time)
*/
:root {
@@ -34,3 +34,27 @@
--leo-typography-stats-h3-paragraph-indent: 0;
--leo-typography-stats-h3-paragraph-spacing: 0;
}
+
+@media (prefers-color-scheme: light) {
+ :root {
+ --leo-theme: light;
+
+ }
+}
+
+@media (prefers-color-scheme: dark) {
+ :root {
+ --leo-theme: dark;
+
+ }
+}
+
+[data-theme="light"] { container-type: normal;
+ --leo-theme: light;
+
+}
+
+[data-theme="dark"] { container-type: normal;
+ --leo-theme: dark;
+
+}
Variables Diff: variables-search.diff--- ./tokens/css/variables-search.old.css 2026-02-02 02:19:01.248921045 +0000
+++ ./tokens/css/variables-search.css 2026-02-02 02:18:26.303693991 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Wed Jan 28 2026 19:19:02 GMT+0000 (Coordinated Universal Time)
+ * Generated on Mon Feb 02 2026 02:18:26 GMT+0000 (Coordinated Universal Time)
*/
:root {
@@ -53,6 +53,7 @@
@media (prefers-color-scheme: light) {
:root {
+ --leo-theme: light;
--leo-color-search-background-ask-input-field: var(--leo-color-schemes-surface-container-lowest);
--leo-color-search-background-container: var(--leo-color-schemes-surface-container-lowest);
--leo-color-search-background-container-interactive: var(--leo-color-primary-10);
@@ -167,6 +168,7 @@
@media (prefers-color-scheme: dark) {
:root {
+ --leo-theme: dark;
--leo-color-search-background-ask-input-field: var(--leo-color-schemes-surface-container-highest);
--leo-color-search-background-container: var(--leo-color-schemes-surface-container);
--leo-color-search-background-container-interactive: var(--leo-color-search-primary-10);
@@ -279,7 +281,8 @@
}
}
-[data-theme="light"] {
+[data-theme="light"] { container-type: normal;
+ --leo-theme: light;
--leo-color-search-background-ask-input-field: var(--leo-color-schemes-surface-container-lowest);
--leo-color-search-background-container: var(--leo-color-schemes-surface-container-lowest);
--leo-color-search-background-container-interactive: var(--leo-color-primary-10);
@@ -391,7 +394,8 @@
--leo-color-search-yellow-70: var(--leo-color-yellow-70);
}
-[data-theme="dark"] {
+[data-theme="dark"] { container-type: normal;
+ --leo-theme: dark;
--leo-color-search-background-ask-input-field: var(--leo-color-schemes-surface-container-highest);
--leo-color-search-background-container: var(--leo-color-schemes-surface-container);
--leo-color-search-background-container-interactive: var(--leo-color-search-primary-10);
Variables Diff: variables-web3.diff--- ./tokens/css/variables-web3.old.css 2026-02-02 02:19:01.375921862 +0000
+++ ./tokens/css/variables-web3.css 2026-02-02 02:18:26.340694233 +0000
@@ -1,10 +1,11 @@
/**
* Do not edit directly
- * Generated on Wed Jan 28 2026 19:19:02 GMT+0000 (Coordinated Universal Time)
+ * Generated on Mon Feb 02 2026 02:18:26 GMT+0000 (Coordinated Universal Time)
*/
@media (prefers-color-scheme: light) {
:root {
+ --leo-theme: light;
--leo-effect-actions-shadow: 0px -1px 8px 0px rgba(0, 0, 0, 0.1);
--leo-effect-navigation-shadow: 0px -8px 16px 0px var(--leo-color-elevation-primary);
}
@@ -12,17 +13,20 @@
@media (prefers-color-scheme: dark) {
:root {
+ --leo-theme: dark;
--leo-effect-actions-shadow: 0px -1px 8px 0px rgba(0, 0, 0, 0.1);
--leo-effect-navigation-shadow: 0px -8px 16px 0px var(--leo-color-elevation-primary);
}
}
-[data-theme="light"] {
+[data-theme="light"] { container-type: normal;
+ --leo-theme: light;
--leo-effect-actions-shadow: 0px -1px 8px 0px rgba(0, 0, 0, 0.1);
--leo-effect-navigation-shadow: 0px -8px 16px 0px var(--leo-color-elevation-primary);
}
-[data-theme="dark"] {
+[data-theme="dark"] { container-type: normal;
+ --leo-theme: dark;
--leo-effect-actions-shadow: 0px -1px 8px 0px rgba(0, 0, 0, 0.1);
--leo-effect-navigation-shadow: 0px -8px 16px 0px var(--leo-color-elevation-primary);
}
Variables Diff: variables.diff--- ./tokens/css/variables.old.css 2026-02-02 02:19:01.748924267 +0000
+++ ./tokens/css/variables.css 2026-02-02 02:18:26.103692685 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Wed Jan 28 2026 19:19:02 GMT+0000 (Coordinated Universal Time)
+ * Generated on Mon Feb 02 2026 02:18:26 GMT+0000 (Coordinated Universal Time)
*/
:root {
@@ -793,6 +793,7 @@
@media (prefers-color-scheme: light) {
:root {
+ --leo-theme: light;
--leo-color-legacy-background1: #fff;
--leo-color-legacy-background2: #f8f9fa;
--leo-color-legacy-disabled: #dadce8;
@@ -1113,6 +1114,7 @@
@media (prefers-color-scheme: dark) {
:root {
+ --leo-theme: dark;
--leo-color-blue-10: var(--leo-color-primitive-blue-15);
--leo-color-blue-20: var(--leo-color-primitive-blue-25);
--leo-color-blue-30: var(--leo-color-primitive-blue-40);
@@ -1431,7 +1433,8 @@
}
}
-[data-theme="light"] {
+[data-theme="light"] { container-type: normal;
+ --leo-theme: light;
--leo-color-legacy-background1: #fff;
--leo-color-legacy-background2: #f8f9fa;
--leo-color-legacy-disabled: #dadce8;
@@ -1749,7 +1752,8 @@
--leo-effect-notificationbackdrop: inset 0px 0px 1px 0px rgba(255, 255, 255, 0.1), 0px 1px 1px 0px var(--leo-color-elevation-primary), 0px 4px 8px 0px var(--leo-color-elevation-secondary);
}
-[data-theme="dark"] {
+[data-theme="dark"] { container-type: normal;
+ --leo-theme: dark;
--leo-color-blue-10: var(--leo-color-primitive-blue-15);
--leo-color-blue-20: var(--leo-color-primitive-blue-25);
--leo-color-blue-30: var(--leo-color-primitive-blue-40);
|
60c6f67 to
82d08e4
Compare
DescriptionThis PR refactors the PostCSS theme plugin to replace the previous The new theme resolution cascade is:
Possible Issues
Security HotspotsNone identified. ChangesChanges
sequenceDiagram
participant CSS as CSS Source
participant Plugin as PostCSS Theme Plugin
participant Output as Generated CSS
CSS->>Plugin: Parse @theme(dark/light) at-rules
Plugin->>Plugin: Collect themed declarations per selector
Plugin->>Plugin: findMatchingBaseRules()
Plugin->>Plugin: extractThemedProperties() per selector
Plugin->>Output: 1. :global(:root) { light vars }
Plugin->>Output: 2. @media (prefers-color-scheme: dark) { :global(selector) { dark vars } }
Plugin->>Output: 3. :global([data-theme="light"]) { light vars }
Plugin->>Output: 4. :global([data-theme="dark"]) { dark vars }
Plugin->>Output: 5. @container style(--leo-theme: light) { :global(selector) { light vars } }
Plugin->>Output: 6. @container style(--leo-theme: dark) { :global(selector) { dark vars } }
Plugin->>Output: 7. .selector { prop: var(--scoped-var) }
|
82d08e4 to
c8bc77f
Compare
fallaciousreasoning
left a comment
There was a problem hiding this comment.
@AlanBreck do you mind testing this on one of your sites where we use data-theme?
|
👋 Thanks for Submitting! This PR is available for preview at the link below. ✅ PR tip preview: https://1299.pr.nala.bravesoftware.com/ - ./tokens/css/variables-android.old.css: 7390 bytes
+ ./tokens/css/variables-android.css: 7640 bytes
---
- ./tokens/css/variables-browser.old.css: 6644 bytes
+ ./tokens/css/variables-browser.css: 6732 bytes
---
- ./tokens/css/variables-ios.old.css: 8180 bytes
+ ./tokens/css/variables-ios.css: 8430 bytes
---
- ./tokens/css/variables-marketing.old.css: 13501 bytes
+ ./tokens/css/variables-marketing.css: 13589 bytes
---
- ./tokens/css/variables-news.old.css: 526 bytes
+ ./tokens/css/variables-news.css: 776 bytes
---
- ./tokens/css/variables-newtab.old.css: 1933 bytes
+ ./tokens/css/variables-newtab.css: 2183 bytes
---
- ./tokens/css/variables-search.old.css: 28568 bytes
+ ./tokens/css/variables-search.css: 28656 bytes
---
- ./tokens/css/variables-web3.old.css: 893 bytes
+ ./tokens/css/variables-web3.css: 981 bytes
---
- ./tokens/css/variables.old.css: 132719 bytes
+ ./tokens/css/variables.css: 132807 bytes
Variables Diff: variables-android.diff--- ./tokens/css/variables-android.old.css 2026-02-11 02:12:32.519290042 +0000
+++ ./tokens/css/variables-android.css 2026-02-11 02:11:59.630310526 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Sun Feb 08 2026 20:57:54 GMT+0000 (Coordinated Universal Time)
+ * Generated on Wed Feb 11 2026 02:11:59 GMT+0000 (Coordinated Universal Time)
*/
:root {
@@ -124,3 +124,27 @@
--leo-typography-android-x-small-semibold-paragraph-indent: 0;
--leo-typography-android-x-small-semibold-paragraph-spacing: 0;
}
+
+@media (prefers-color-scheme: light) {
+ :root {
+ --leo-theme: light;
+
+ }
+}
+
+@media (prefers-color-scheme: dark) {
+ :root {
+ --leo-theme: dark;
+
+ }
+}
+
+[data-theme="light"] {
+ --leo-theme: light;
+
+}
+
+[data-theme="dark"] {
+ --leo-theme: dark;
+
+}
Variables Diff: variables-browser.diff--- ./tokens/css/variables-browser.old.css 2026-02-11 02:12:32.686289964 +0000
+++ ./tokens/css/variables-browser.css 2026-02-11 02:11:59.614310527 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Sun Feb 08 2026 20:57:54 GMT+0000 (Coordinated Universal Time)
+ * Generated on Wed Feb 11 2026 02:11:59 GMT+0000 (Coordinated Universal Time)
*/
:root {
@@ -99,6 +99,7 @@
@media (prefers-color-scheme: light) {
:root {
+ --leo-theme: light;
--leo-effect-active-tab-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
--leo-effect-browser-frame-shadow-0: 0px 0px 0px 0.75px rgba(6, 6, 5, 0.2);
--leo-effect-browser-frame-shadow-1: inset 0px 1px 0.5px 0px rgba(255, 255, 255, 0.32);
@@ -108,6 +109,7 @@
@media (prefers-color-scheme: dark) {
:root {
+ --leo-theme: dark;
--leo-effect-active-tab-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
--leo-effect-browser-frame-shadow-0: 0px 0px 0px 0.75px rgba(6, 6, 5, 0.2);
--leo-effect-browser-frame-shadow-1: inset 0px 1px 0.5px 0px rgba(255, 255, 255, 0.32);
@@ -115,14 +117,16 @@
}
}
-[data-theme="light"] {
+[data-theme="light"] {
+ --leo-theme: light;
--leo-effect-active-tab-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
--leo-effect-browser-frame-shadow-0: 0px 0px 0px 0.75px rgba(6, 6, 5, 0.2);
--leo-effect-browser-frame-shadow-1: inset 0px 1px 0.5px 0px rgba(255, 255, 255, 0.32);
--leo-effect-url-bar-shadow: 0px 1px 2px -1px rgba(0, 0, 0, 0.1), 0px 4px 8px -2px rgba(0, 0, 0, 0.1);
}
-[data-theme="dark"] {
+[data-theme="dark"] {
+ --leo-theme: dark;
--leo-effect-active-tab-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
--leo-effect-browser-frame-shadow-0: 0px 0px 0px 0.75px rgba(6, 6, 5, 0.2);
--leo-effect-browser-frame-shadow-1: inset 0px 1px 0.5px 0px rgba(255, 255, 255, 0.32);
Variables Diff: variables-ios.diff--- ./tokens/css/variables-ios.old.css 2026-02-11 02:12:32.845289899 +0000
+++ ./tokens/css/variables-ios.css 2026-02-11 02:11:59.646310525 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Sun Feb 08 2026 20:57:54 GMT+0000 (Coordinated Universal Time)
+ * Generated on Wed Feb 11 2026 02:11:59 GMT+0000 (Coordinated Universal Time)
*/
:root {
@@ -124,3 +124,27 @@
--leo-typography-ios-x-small-semibold-paragraph-indent: 0;
--leo-typography-ios-x-small-semibold-paragraph-spacing: 0;
}
+
+@media (prefers-color-scheme: light) {
+ :root {
+ --leo-theme: light;
+
+ }
+}
+
+@media (prefers-color-scheme: dark) {
+ :root {
+ --leo-theme: dark;
+
+ }
+}
+
+[data-theme="light"] {
+ --leo-theme: light;
+
+}
+
+[data-theme="dark"] {
+ --leo-theme: dark;
+
+}
Variables Diff: variables-marketing.diff--- ./tokens/css/variables-marketing.old.css 2026-02-11 02:12:33.060289844 +0000
+++ ./tokens/css/variables-marketing.css 2026-02-11 02:11:59.667310523 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Sun Feb 08 2026 20:57:54 GMT+0000 (Coordinated Universal Time)
+ * Generated on Wed Feb 11 2026 02:11:59 GMT+0000 (Coordinated Universal Time)
*/
:root {
@@ -218,6 +218,7 @@
@media (prefers-color-scheme: light) {
:root {
+ --leo-theme: light;
--leo-effect-stroke: 0px 0px 0px 3px rgb(0, 0, 0);
--leo-effect-stroke-shadow: 8px 8px 0px 0px rgb(0, 0, 0), 0px 0px 0px 3px rgb(0, 0, 0);
}
@@ -225,17 +226,20 @@
@media (prefers-color-scheme: dark) {
:root {
+ --leo-theme: dark;
--leo-effect-stroke: 0px 0px 0px 3px rgb(0, 0, 0);
--leo-effect-stroke-shadow: 8px 8px 0px 0px rgb(0, 0, 0), 0px 0px 0px 3px rgb(0, 0, 0);
}
}
-[data-theme="light"] {
+[data-theme="light"] {
+ --leo-theme: light;
--leo-effect-stroke: 0px 0px 0px 3px rgb(0, 0, 0);
--leo-effect-stroke-shadow: 8px 8px 0px 0px rgb(0, 0, 0), 0px 0px 0px 3px rgb(0, 0, 0);
}
-[data-theme="dark"] {
+[data-theme="dark"] {
+ --leo-theme: dark;
--leo-effect-stroke: 0px 0px 0px 3px rgb(0, 0, 0);
--leo-effect-stroke-shadow: 8px 8px 0px 0px rgb(0, 0, 0), 0px 0px 0px 3px rgb(0, 0, 0);
}
Variables Diff: variables-news.diff--- ./tokens/css/variables-news.old.css 2026-02-11 02:12:33.242289797 +0000
+++ ./tokens/css/variables-news.css 2026-02-11 02:11:59.719310520 +0000
@@ -1,9 +1,33 @@
/**
* Do not edit directly
- * Generated on Sun Feb 08 2026 20:57:54 GMT+0000 (Coordinated Universal Time)
+ * Generated on Wed Feb 11 2026 02:11:59 GMT+0000 (Coordinated Universal Time)
*/
:root {
--leo-gradient-stroke-gradient-dark: linear-gradient(155.40180080220492deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.15) 41%, rgba(255, 255, 255, 0) 56.99999999999999%, rgba(255, 255, 255, 0.05) 100%);
--leo-gradient-stroke-gradient-light: linear-gradient(155.40180080220492deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0) 41%, rgba(0, 0, 0, 0) 56.99999999999999%, rgba(0, 0, 0, 0.15) 100%);
}
+
+@media (prefers-color-scheme: light) {
+ :root {
+ --leo-theme: light;
+
+ }
+}
+
+@media (prefers-color-scheme: dark) {
+ :root {
+ --leo-theme: dark;
+
+ }
+}
+
+[data-theme="light"] {
+ --leo-theme: light;
+
+}
+
+[data-theme="dark"] {
+ --leo-theme: dark;
+
+}
Variables Diff: variables-newtab.diff--- ./tokens/css/variables-newtab.old.css 2026-02-11 02:12:33.412289755 +0000
+++ ./tokens/css/variables-newtab.css 2026-02-11 02:11:59.728310519 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Sun Feb 08 2026 20:57:54 GMT+0000 (Coordinated Universal Time)
+ * Generated on Wed Feb 11 2026 02:11:59 GMT+0000 (Coordinated Universal Time)
*/
:root {
@@ -34,3 +34,27 @@
--leo-typography-stats-h3-paragraph-indent: 0;
--leo-typography-stats-h3-paragraph-spacing: 0;
}
+
+@media (prefers-color-scheme: light) {
+ :root {
+ --leo-theme: light;
+
+ }
+}
+
+@media (prefers-color-scheme: dark) {
+ :root {
+ --leo-theme: dark;
+
+ }
+}
+
+[data-theme="light"] {
+ --leo-theme: light;
+
+}
+
+[data-theme="dark"] {
+ --leo-theme: dark;
+
+}
Variables Diff: variables-search.diff--- ./tokens/css/variables-search.old.css 2026-02-11 02:12:33.607289703 +0000
+++ ./tokens/css/variables-search.css 2026-02-11 02:11:59.695310521 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Sun Feb 08 2026 20:57:54 GMT+0000 (Coordinated Universal Time)
+ * Generated on Wed Feb 11 2026 02:11:59 GMT+0000 (Coordinated Universal Time)
*/
:root {
@@ -53,6 +53,7 @@
@media (prefers-color-scheme: light) {
:root {
+ --leo-theme: light;
--leo-color-search-background-ask-input-field: var(--leo-color-schemes-surface-container-lowest);
--leo-color-search-background-container: var(--leo-color-schemes-surface-container-lowest);
--leo-color-search-background-container-interactive: var(--leo-color-primary-10);
@@ -167,6 +168,7 @@
@media (prefers-color-scheme: dark) {
:root {
+ --leo-theme: dark;
--leo-color-search-background-ask-input-field: var(--leo-color-schemes-surface-container-highest);
--leo-color-search-background-container: var(--leo-color-schemes-surface-container);
--leo-color-search-background-container-interactive: var(--leo-color-search-primary-10);
@@ -279,7 +281,8 @@
}
}
-[data-theme="light"] {
+[data-theme="light"] {
+ --leo-theme: light;
--leo-color-search-background-ask-input-field: var(--leo-color-schemes-surface-container-lowest);
--leo-color-search-background-container: var(--leo-color-schemes-surface-container-lowest);
--leo-color-search-background-container-interactive: var(--leo-color-primary-10);
@@ -391,7 +394,8 @@
--leo-color-search-yellow-70: var(--leo-color-yellow-70);
}
-[data-theme="dark"] {
+[data-theme="dark"] {
+ --leo-theme: dark;
--leo-color-search-background-ask-input-field: var(--leo-color-schemes-surface-container-highest);
--leo-color-search-background-container: var(--leo-color-schemes-surface-container);
--leo-color-search-background-container-interactive: var(--leo-color-search-primary-10);
Variables Diff: variables-web3.diff--- ./tokens/css/variables-web3.old.css 2026-02-11 02:12:33.756289664 +0000
+++ ./tokens/css/variables-web3.css 2026-02-11 02:11:59.732310519 +0000
@@ -1,10 +1,11 @@
/**
* Do not edit directly
- * Generated on Sun Feb 08 2026 20:57:54 GMT+0000 (Coordinated Universal Time)
+ * Generated on Wed Feb 11 2026 02:11:59 GMT+0000 (Coordinated Universal Time)
*/
@media (prefers-color-scheme: light) {
:root {
+ --leo-theme: light;
--leo-effect-actions-shadow: 0px -1px 8px 0px rgba(0, 0, 0, 0.1);
--leo-effect-navigation-shadow: 0px -8px 16px 0px var(--leo-color-elevation-primary);
}
@@ -12,17 +13,20 @@
@media (prefers-color-scheme: dark) {
:root {
+ --leo-theme: dark;
--leo-effect-actions-shadow: 0px -1px 8px 0px rgba(0, 0, 0, 0.1);
--leo-effect-navigation-shadow: 0px -8px 16px 0px var(--leo-color-elevation-primary);
}
}
-[data-theme="light"] {
+[data-theme="light"] {
+ --leo-theme: light;
--leo-effect-actions-shadow: 0px -1px 8px 0px rgba(0, 0, 0, 0.1);
--leo-effect-navigation-shadow: 0px -8px 16px 0px var(--leo-color-elevation-primary);
}
-[data-theme="dark"] {
+[data-theme="dark"] {
+ --leo-theme: dark;
--leo-effect-actions-shadow: 0px -1px 8px 0px rgba(0, 0, 0, 0.1);
--leo-effect-navigation-shadow: 0px -8px 16px 0px var(--leo-color-elevation-primary);
}
Variables Diff: variables.diff--- ./tokens/css/variables.old.css 2026-02-11 02:12:34.050289588 +0000
+++ ./tokens/css/variables.css 2026-02-11 02:11:59.485310535 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Sun Feb 08 2026 20:57:54 GMT+0000 (Coordinated Universal Time)
+ * Generated on Wed Feb 11 2026 02:11:59 GMT+0000 (Coordinated Universal Time)
*/
:root {
@@ -793,6 +793,7 @@
@media (prefers-color-scheme: light) {
:root {
+ --leo-theme: light;
--leo-color-legacy-background1: #fff;
--leo-color-legacy-background2: #f8f9fa;
--leo-color-legacy-disabled: #dadce8;
@@ -1113,6 +1114,7 @@
@media (prefers-color-scheme: dark) {
:root {
+ --leo-theme: dark;
--leo-color-blue-10: var(--leo-color-primitive-blue-15);
--leo-color-blue-20: var(--leo-color-primitive-blue-25);
--leo-color-blue-30: var(--leo-color-primitive-blue-40);
@@ -1431,7 +1433,8 @@
}
}
-[data-theme="light"] {
+[data-theme="light"] {
+ --leo-theme: light;
--leo-color-legacy-background1: #fff;
--leo-color-legacy-background2: #f8f9fa;
--leo-color-legacy-disabled: #dadce8;
@@ -1749,7 +1752,8 @@
--leo-effect-notificationbackdrop: inset 0px 0px 1px 0px rgba(255, 255, 255, 0.1), 0px 1px 1px 0px var(--leo-color-elevation-primary), 0px 4px 8px 0px var(--leo-color-elevation-secondary);
}
-[data-theme="dark"] {
+[data-theme="dark"] {
+ --leo-theme: dark;
--leo-color-blue-10: var(--leo-color-primitive-blue-15);
--leo-color-blue-20: var(--leo-color-primitive-blue-25);
--leo-color-blue-30: var(--leo-color-primitive-blue-40);
|
Resolves #1296
Need to remove the hack for iOS in the Toggle as a followup PR
So: This is a win-some lose-some approach. Now, we support Safari & Firefox with our @theme queries but at the cost of only supporting Chromium back to March 2023. Is that an acceptable tradeoff @AlanBreck?
Test updates made by Claude