feat: stop using CSS filters for dark mode (static canvas) (#10578)

* feat: stop using CSS filters for dark mode (static canvas)

* fix comment

* remove conditional dark mode export

* make shape cache theme-aware

* refactor

* refactor

* fixes and notes
This commit is contained in:
David Luzar
2026-01-04 15:16:35 +01:00
committed by GitHub
parent b5fc873323
commit 63e1148280
30 changed files with 1070 additions and 389 deletions
+3 -10
View File
@@ -106,6 +106,9 @@ body.excalidraw-cursor-resize * {
&.interactive {
z-index: var(--zIndex-interactiveCanvas);
// Apply theme filter only to interactive canvas for UI elements
// (resize handles, selection boxes, etc.)
filter: var(--theme-filter);
}
// Remove the main canvas from document flow to avoid resizeObserver
@@ -134,16 +137,6 @@ body.excalidraw-cursor-resize * {
pointer-events: none;
}
&.theme--dark {
// The percentage is inspired by
// https://material.io/design/color/dark-theme.html#properties, which
// recommends surface color of #121212, 93% yields #111111 for #FFF
canvas {
filter: var(--theme-filter);
}
}
.FixedSideContainer {
padding-top: var(--sat, 0);
padding-right: var(--sar, 0);