patch fix theme overrides for adaptive colour

This commit is contained in:
2026-04-20 22:50:39 +09:30
parent 37be31859f
commit 44116edca5
2 changed files with 14 additions and 2 deletions
+3 -2
View File
@@ -1,3 +1,4 @@
@use "sass:meta";
@import url("https://fonts.googleapis.com/css?family=Rubik:300,400,500,600,700");
@@ -2609,7 +2610,7 @@ body {
[class*="MessageList__unread___"] {
position: relative;
background: rgb(228 225 225);
background: var(--background-secondary, rgb(228 225 225));
}
.dark [class*="MessageList__unread___"] {
@@ -2735,7 +2736,7 @@ body {
[class*="MessageList__MessageList___"]
> ol
> li[class*="MessageList__selected___"] {
background: rgb(228 225 225);
background: var(--background-secondary, rgb(228 225 225));
color: var(--text-primary);
box-shadow: none !important;
position: relative;
+11
View File
@@ -165,6 +165,17 @@ function applyColorsWith(selectedColor: string) {
}
}
// Let themes opt-in to overriding only adaptive accent output.
// A theme can define `--adaptive-better-main` from adaptive channel bindings.
if (settingsState.selectedTheme && settingsState.adaptiveThemeColour) {
const adaptiveOverride = getComputedStyle(document.documentElement)
.getPropertyValue("--adaptive-better-main")
.trim();
if (adaptiveOverride) {
setCSSVar("--better-main", adaptiveOverride);
}
}
let alliframes = document.getElementsByTagName("iframe");
for (let i = 0; i < alliframes.length; i++) {