fix: reduce macOS popup compositing cost
This commit is contained in:
@@ -219,6 +219,48 @@
|
||||
backdrop-filter: blur(18px) saturate(135%);
|
||||
}
|
||||
|
||||
/* Chromium's backdrop sampling is disproportionately expensive for transient
|
||||
* layers in macOS Electron windows. Keep the optimization platform-scoped so
|
||||
* the shared materials remain unchanged elsewhere. */
|
||||
html[data-platform='darwin'] :is(
|
||||
[role='dialog'],
|
||||
[role='alertdialog'],
|
||||
[role='menu'],
|
||||
[role='listbox'],
|
||||
[role='tooltip'],
|
||||
.fixed.inset-0
|
||||
),
|
||||
html[data-platform='darwin'] :is(
|
||||
[role='dialog'],
|
||||
[role='alertdialog'],
|
||||
[role='menu'],
|
||||
[role='listbox'],
|
||||
[role='tooltip'],
|
||||
.fixed.inset-0
|
||||
) .glass-surface {
|
||||
-webkit-backdrop-filter: none !important;
|
||||
backdrop-filter: none !important;
|
||||
}
|
||||
|
||||
html[data-platform='darwin'] :is(
|
||||
[role='dialog'],
|
||||
[role='alertdialog'],
|
||||
[role='menu'],
|
||||
[role='listbox'],
|
||||
[role='tooltip'],
|
||||
.fixed.inset-0
|
||||
).glass-surface,
|
||||
html[data-platform='darwin'] :is(
|
||||
[role='dialog'],
|
||||
[role='alertdialog'],
|
||||
[role='menu'],
|
||||
[role='listbox'],
|
||||
[role='tooltip'],
|
||||
.fixed.inset-0
|
||||
) .glass-surface {
|
||||
background-color: hsl(var(--background));
|
||||
}
|
||||
|
||||
/* Sidebar material: keep the rail visibly white while allowing a restrained
|
||||
* amount of the canvas to show through. A low white alpha reads as gray over
|
||||
* the transparent native window material, so the light surface needs to stay
|
||||
|
||||
Reference in New Issue
Block a user