Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

glass bar: keep the chat header at 90% opacity so its controls stay readable

wayneafde1112229f
diff --git a/src/components/GlassScrollFrame.test.ts b/src/components/GlassScrollFrame.test.ts
index 681e74b042..e3f32e27e5 100644
--- a/src/components/GlassScrollFrame.test.ts
+++ b/src/components/GlassScrollFrame.test.ts
@@ -144,7 +144,7 @@ describe("a fading bar", () => {
it("fades into the canvas with no tint or blur: hidden at the edge, full strength over its last 60px", () => {
const fade = rule('.glass-bar[data-glass-fade]::before');
- expect(fade).toContain("linear-gradient(to bottom, var(--color-app), var(--color-app) calc(100% - var(--glass-fade)), transparent)");
+ expect(fade).toContain("linear-gradient(to bottom, var(--color-app), var(--color-app) calc(100% - var(--glass-fade)), color-mix(in srgb, var(--color-app) 90%, transparent))");
expect(fade).toMatch(/[^-]backdrop-filter: none/);
expect(fade).toContain("mask-image: none");
expect(rule('.glass-bar[data-glass-fade]')).toContain("--glass-fade: 60px");
diff --git a/src/styles.css b/src/styles.css
index def24f1a68..dd47845435 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -1927,14 +1927,15 @@ body {
top: calc(-1 * var(--glass-reach, 0px));
mask-image: linear-gradient(to top, black calc(100% - var(--glass-reach, 0px)), transparent);
}
-/* A fading bar has no tint and no blur. What scrolls under it fades straight into the canvas: hidden
- at the window edge, back to full strength over the last --glass-fade of the bar, which is the whole
- of Simple mode's 60px header. A taller bar (find, a notice) stays plain canvas above that stretch. */
+/* A fading bar has no tint and no blur. What scrolls under it stays hidden at the window edge and is
+ at most a tenth visible at the bar's inner edge, across the last --glass-fade of the bar, which is
+ the whole of Simple mode's 60px header: its controls stay readable over any content. A taller bar
+ (find, a notice) stays plain canvas above that stretch. */
.glass-bar[data-glass-fade] {
--glass-fade: 60px;
}
.glass-bar[data-glass-fade]::before {
- background: linear-gradient(to bottom, var(--color-app), var(--color-app) calc(100% - var(--glass-fade)), transparent);
+ background: linear-gradient(to bottom, var(--color-app), var(--color-app) calc(100% - var(--glass-fade)), color-mix(in srgb, var(--color-app) 90%, transparent));
-webkit-backdrop-filter: none;
backdrop-filter: none;
mask-image: none;