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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user