feat(panel): default light background is white, not gray
Plain light mode no longer uses a gray-blue page background so the blue accent cannot blend in; the themed variant tints white instead.
This commit is contained in:
1 parent
01c7299c85
commit
7464a10040
3 files changed
+6
-6
No files matched your search
@@ -350,8 +350,8 @@ func TestOverviewThemeColor(t *testing.T) {
|
||||
if !strings.Contains(plain, "--accent:#2563eb") {
|
||||
t.Error("plain overview should keep the default accent")
|
||||
}
|
||||
if !strings.Contains(plain, "--bg:#e6ebf1") {
|
||||
t.Error("plain overview light background should be the darker shade")
|
||||
if !strings.Contains(plain, "--bg:#ffffff") {
|
||||
t.Error("plain overview light background should be white")
|
||||
}
|
||||
|
||||
themed := srv.renderToString(t, "overview.html", pageData{
|
||||
@@ -361,7 +361,7 @@ func TestOverviewThemeColor(t *testing.T) {
|
||||
})
|
||||
for _, want := range []string{
|
||||
"--accent:#16a34a", "--head:#16a34a",
|
||||
"color-mix(in srgb, #16a34a 13%, #e6ebf1)",
|
||||
"color-mix(in srgb, #16a34a 13%, #ffffff)",
|
||||
"color-mix(in srgb, #16a34a 16%, #14161a)",
|
||||
"color-mix(in srgb, #16a34a 5%, #ffffff)",
|
||||
"border-bottom:3px solid #16a34a",
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<title>{{.Title}}</title>
|
||||
<style>
|
||||
:root{
|
||||
--bg:#e6ebf1; --card:#ffffff; --border:#e2e8f0; --text:#0f172a; --muted:#64748b;
|
||||
--bg:#ffffff; --card:#ffffff; --border:#e2e8f0; --text:#0f172a; --muted:#64748b;
|
||||
--accent:#2563eb; --on-accent:#fff; --err-bg:#fef2f2; --err-fg:#dc2626;
|
||||
color-scheme:light;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<title>{{.Title}}</title>
|
||||
<style>
|
||||
:root{
|
||||
--bg:#e6ebf1; --card:#ffffff; --border:#e2e8f0; --text:#0f172a; --muted:#64748b;
|
||||
--bg:#ffffff; --card:#ffffff; --border:#e2e8f0; --text:#0f172a; --muted:#64748b;
|
||||
--head:#0284c7; --accent:#2563eb; --on-accent:#fff;
|
||||
--accent-soft:rgba(37,99,235,.12); --accent-glow:rgba(37,99,235,.30);
|
||||
--ok:#059669; --ok-bg:#ecfdf5; --ok-fg:#047857;
|
||||
@@ -178,7 +178,7 @@ footer a{color:var(--muted);text-decoration:underline}
|
||||
--on-accent:#fff;
|
||||
--accent-soft:color-mix(in srgb, {{.ThemeColor}} 18%, transparent);
|
||||
--accent-glow:color-mix(in srgb, {{.ThemeColor}} 45%, transparent);
|
||||
--bg:color-mix(in srgb, {{.ThemeColor}} 13%, #e6ebf1);
|
||||
--bg:color-mix(in srgb, {{.ThemeColor}} 13%, #ffffff);
|
||||
--card:color-mix(in srgb, {{.ThemeColor}} 5%, #ffffff);
|
||||
--border:color-mix(in srgb, {{.ThemeColor}} 24%, #e2e8f0);
|
||||
--code-bg:color-mix(in srgb, {{.ThemeColor}} 8%, #f8fafc);
|
||||
|
||||
Reference in new issue
Block a user