Skip to content

Native iCloud apps for Windows and Linux, built in Rust. Notes, Reminders, Calendar, Contacts, Drive and Photos, offline and in sync with your iPhone.

Glass on every floating surface: regular for menus, popovers and sheets, frost for chrome over a scroll

Yashwanth Kamireddi6ffeeeda1afb
diff --git a/src/styles/app.css b/src/styles/app.css
index a47743d..2077ac0 100644
--- a/src/styles/app.css
+++ b/src/styles/app.css
@@ -310,7 +310,7 @@
/* Frosted to opaque, without a live blur: folding animates its width, and a blurred layer
has its blur worked out again on every frame of that — a stutter in WebKitGTK, which
does not draw the blur on many machines in any case. Content still passes under it. */
- background: var(--glass-thick);
+ background: var(--glass-frost);
box-shadow: var(--glass-specular), 0 0 0 var(--hairline) var(--glass-edge);
border-radius: var(--r-plateau);
padding: 12px 9px;
@@ -1125,6 +1125,8 @@
list-style: none;
border-radius: var(--r-float);
background: var(--glass-thick);
+ -webkit-backdrop-filter: var(--glass-regular-filter);
+ backdrop-filter: var(--glass-regular-filter);
box-shadow: var(--glass-float);
color: var(--text);
/* No opening animation, as a macOS menu has none: it is simply there. Animating it in
@@ -1414,12 +1416,15 @@
padding: 5px;
border-radius: var(--r-float);
background: var(--glass-thick);
+ -webkit-backdrop-filter: var(--glass-regular-filter);
+ backdrop-filter: var(--glass-regular-filter);
box-shadow: var(--glass-float);
}
.upload-menu button {
padding: 6px 10px;
border: 0;
- border-radius: 6px;
+ /* A menu's line, rounded as every menu's is (.row-menu-item). */
+ border-radius: 8px;
background: none;
color: var(--text);
font: inherit;
@@ -1442,7 +1447,8 @@
flex-direction: column;
border: 1px solid var(--glass-edge);
border-radius: var(--r-float);
- background: var(--glass-thick);
+ /* Frosted, never blurred: it stays up over Drive's list as it scrolls (tokens.css). */
+ background: var(--glass-frost);
box-shadow: var(--shadow-sheet), var(--glass-specular);
overflow: hidden;
}
@@ -1462,7 +1468,8 @@
.upload-rows { margin: 0; padding: 0 6px 8px; list-style: none; overflow-y: auto; }
.upload-row {
padding: 6px 8px;
- border-radius: 8px;
+ /* Concentric with the tray: its 12px corner less the list's 6px inset. */
+ border-radius: calc(var(--r-float) - 6px);
}
/* A file, or a whole folder counted as one: glyph, name over its bar, how far, and its
controls — the folder's ▸ to see what in it did not upload, and ✕ while it can stop. */
@@ -1522,6 +1529,8 @@
display: flex; flex-direction: column; outline: none;
border-radius: var(--r-float);
background: var(--glass-thick);
+ -webkit-backdrop-filter: var(--glass-regular-filter);
+ backdrop-filter: var(--glass-regular-filter);
box-shadow: var(--glass-float);
/* Opens and closes at once, as a macOS menu does, and as the pop-up's menu and search's
results do — one rule for every menu. A 120ms fade-and-drop was tried here and flashed on
@@ -1771,7 +1780,8 @@
.gsearch-more:focus-visible { outline: var(--focus-ring); outline-offset: 1px; }
.gsearch-row {
display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; padding: 0 10px; border: 0;
- border-radius: 8px; background: none; color: inherit; font: inherit; text-align: start; cursor: default;
+ /* Concentric with the panel: its 12px corner less the results' 6px inset. */
+ border-radius: calc(var(--r-float) - 6px); background: none; color: inherit; font: inherit; text-align: start; cursor: default;
}
/* White on the deep accent, as a filled control is drawn (tokens.css): --on-accent is the text
for the bright fill, and on Notes' gold-deep its near-black read at 3.3:1. */
diff --git a/src/styles/calendar.css b/src/styles/calendar.css
index 8865aef..7acc79e 100644
--- a/src/styles/calendar.css
+++ b/src/styles/calendar.css
@@ -570,9 +570,9 @@
}
/* ---- the event popover --------------------------------------------------------------- */
-/* Frosted to opaque without a live blur, as the menus are: a blurred layer is one WebKitGTK
- composites on the frame it appears, and the popover appearing is what making an event
- is — the stutter. The sidebar and toolbars, which never appear or move, keep theirs. */
+/* Regular glass, as the menus are — and in WebKitGTK frosted to opaque without the live blur:
+ a blurred layer is one WebKitGTK composites on the frame it appears, and the popover
+ appearing is what making an event is — the stutter (tokens.css "The two tiers"). */
.cx-popover {
position: fixed;
@@ -589,6 +589,8 @@
padding: 14px 14px 12px;
border-radius: var(--r-float);
background: var(--glass-thick);
+ -webkit-backdrop-filter: var(--glass-regular-filter);
+ backdrop-filter: var(--glass-regular-filter);
box-shadow: var(--glass-float);
/* Opacity and a small lift only, on the compositor: scaling from the corner read as a
jump toward the click, and re-ran on every re-anchor. */
@@ -830,6 +832,9 @@
.cx-quick-anchor { position: relative; }
.cx-quick {
background: var(--sheet, var(--glass-thick));
+ /* Opaque: nothing for a blur to show. */
+ -webkit-backdrop-filter: none;
+ backdrop-filter: none;
position: absolute; top: calc(100% + 6px); right: -8px; z-index: 35;
display: flex; flex-direction: column; gap: 10px; width: min(340px, calc(100vw - 32px)); padding: 12px;
}
diff --git a/src/styles/kit.css b/src/styles/kit.css
index e7a97b0..5d3ed01 100644
--- a/src/styles/kit.css
+++ b/src/styles/kit.css
@@ -97,7 +97,9 @@
/* A group of a toolbar's controls, as macOS 27 floats them: one capsule, its controls round
inside it, concentric. Nearly solid rather than a live blur — these sit over scrolling
- photos and lists, and WebKitGTK blurs what is behind again on every frame of a scroll. */
+ photos and lists, and every engine blurs what is behind again on every frame of a scroll:
+ measured (.uiverify/glass-frames.mjs), Photos' six capsules blurred took a scroll from
+ 16.7 to 200ms at p95 in Chromium and froze frames for 280ms. */
.toolbar-group {
display: inline-flex;
align-items: center;
@@ -351,13 +353,24 @@ textarea.field { padding-block: 5px; resize: vertical; }
/* ---- floating surfaces -------------------------------------------------------------------- */
-/* Menus, pop-ups, popovers: thick glass, rim, edge and lift — the whole recipe, one radius. */
+/* Menus, pop-ups, popovers: regular glass, rim, edge and lift — the whole recipe, one radius. */
.popover {
border-radius: var(--r-float);
background: var(--glass-thick);
+ -webkit-backdrop-filter: var(--glass-regular-filter);
+ backdrop-filter: var(--glass-regular-filter);
box-shadow: var(--glass-float);
color: var(--text);
}
+/* Never glass on glass: a floating surface opened inside another (Go to Date under a
+ toolbar's capsule, a menu in a sheet) is already frosted by the one it sits in, and a
+ blur inside a blur sees only its parent — a second layer for nothing. */
+:is(.toolbar-group, .popover, .modal-sheet, .row-menu, .picker-menu, .cx-popover, .format-panel,
+ .px-info, .px-jump)
+ :is(.popover, .row-menu, .picker-menu, .cx-popover, .format-panel) {
+ -webkit-backdrop-filter: none;
+ backdrop-filter: none;
+}
/* ---- toasts (components/Toast) ------------------------------------------------------------ */
@@ -385,7 +398,8 @@ textarea.field { padding-block: 5px; resize: vertical; }
min-height: 38px;
padding: 5px 6px 5px 14px;
border-radius: var(--r-float);
- background: var(--glass-thick);
+ /* Frosted, never blurred: it stays up over lists that scroll (tokens.css "The two tiers"). */
+ background: var(--glass-frost);
box-shadow: var(--glass-float);
color: var(--text);
font-size: var(--t-13);
@@ -472,6 +486,8 @@ textarea.field { padding-block: 5px; resize: vertical; }
padding: 20px 22px;
border-radius: var(--r-window);
background: var(--glass-thick);
+ -webkit-backdrop-filter: var(--glass-regular-filter);
+ backdrop-filter: var(--glass-regular-filter);
box-shadow: var(--glass-float);
color: var(--text);
}
diff --git a/src/styles/notes.css b/src/styles/notes.css
index be14b86..5b6c7e6 100644
--- a/src/styles/notes.css
+++ b/src/styles/notes.css
@@ -336,6 +336,8 @@ textarea.note-title::placeholder { color: var(--text-3); }
padding: 10px 8px 8px;
border-radius: 12px;
background: var(--glass-thick);
+ -webkit-backdrop-filter: var(--glass-regular-filter);
+ backdrop-filter: var(--glass-regular-filter);
box-shadow: var(--glass-float);
color: var(--text);
}
@@ -450,7 +452,8 @@ textarea.note-title::placeholder { color: var(--text-3); }
.nf-picture img { max-width: 100%; max-height: calc(90vh - 52px); object-fit: contain; border-radius: 12px; align-self: center;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); background: color-mix(in srgb, var(--text) 6%, transparent); }
.nf-picture figcaption { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; border-radius: 12px;
- background: var(--glass-thick); box-shadow: var(--glass-float); color: var(--text); font-size: var(--t-13); align-self: center; max-width: 100%; }
+ background: var(--glass-thick); -webkit-backdrop-filter: var(--glass-regular-filter); backdrop-filter: var(--glass-regular-filter);
+ box-shadow: var(--glass-float); color: var(--text); font-size: var(--t-13); align-self: center; max-width: 100%; }
.nf-picture-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* A block quote, as Notes draws one: a grey bar down the left of every quoted line, one
diff --git a/src/styles/photos.css b/src/styles/photos.css
index cb91166..bacab59 100644
--- a/src/styles/photos.css
+++ b/src/styles/photos.css
@@ -295,7 +295,10 @@
border: 0;
/* A rounded square, as icloud.com's viewer has them. */
border-radius: 10px;
- background: color-mix(in srgb, var(--sheet) 90%, transparent);
+ /* Clear glass: a glyph alone over the photo, which shows through it. */
+ background: var(--glass-clear);
+ -webkit-backdrop-filter: var(--glass-clear-filter);
+ backdrop-filter: var(--glass-clear-filter);
box-shadow: var(--glass-float);
color: var(--text);
transition: none;
@@ -321,6 +324,8 @@
padding: 14px 16px 16px;
border-radius: var(--r-float);
background: var(--glass-thick);
+ -webkit-backdrop-filter: var(--glass-regular-filter);
+ backdrop-filter: var(--glass-regular-filter);
box-shadow: var(--glass-float);
font-size: var(--t-13);
overflow-y: auto;
@@ -867,6 +872,8 @@
max-height: min(460px, 70vh);
border-radius: var(--r-float);
background: var(--glass-thick);
+ -webkit-backdrop-filter: var(--glass-regular-filter);
+ backdrop-filter: var(--glass-regular-filter);
box-shadow: var(--glass-float);
overflow: hidden;
outline: none;