fix(appearance): smoother rounded corners under WebKitGTK

Remove the hard 1px outline that the "match system window chrome"
style was painting inside the radius: on WebKitGTK the outline
amplified anti-aliasing jaggies at the rounded corners because the
stroke has no blur. Replace with a softer two-layer drop shadow,
add clip-path: inset(... round ...) on top of border-radius (clip-path
gives noticeably cleaner AA than border-radius + overflow:hidden alone
in WebKitGTK), and promote the container to its own compositing layer
with translateZ(0) + backface-visibility:hidden so the GPU handles the
edge.

cc
This commit is contained in:
vicrodh committed 2026-04-15 11:51:03 -06:00
1 parent 57e63e3ef5
commit 823e1c313e
1 file changed
+13 -2
+13 -2
View File
@@ -6231,9 +6231,20 @@
}
.app.match-chrome.floating {
border-radius: var(--chrome-radius, 10px);
/* clip-path gives cleaner anti-aliasing on rounded corners in
WebKitGTK than border-radius + overflow:hidden alone. Keep
border-radius too so the box-shadow follows the rounded shape. */
clip-path: inset(0 round var(--chrome-radius, 10px));
/* GPU-accelerate the clipped container so WebKitGTK picks a smoother
anti-alias path on the rounded edge. */
transform: translateZ(0);
backface-visibility: hidden;
/* Drop shadow only — no hard 1px outline, which amplifies jaggies on
rounded corners in WebKitGTK. The shadow alone is enough to lift
the window off the desktop. */
box-shadow:
0 12px 28px rgba(0, 0, 0, 0.55),
0 0 0 1px rgba(0, 0, 0, 0.65);
0 16px 32px rgba(0, 0, 0, 0.55),
0 2px 8px rgba(0, 0, 0, 0.35);
}
.app.match-chrome:not(.floating) {
border-radius: 0;