fix: 🐛 remove css duplication

This commit is contained in:
Istvan Matejcsok 2026-06-23 12:59:43 +02:00
commit 6493f8fe00
10 changed files with 1 additions and 229 deletions

View file

@ -53,47 +53,3 @@
}
}
/*
* wxWidgets WASM child-window styling.
*
* The wx.js runtime glue (createWindow/setWindowRect) creates a `.window`
* <div> (+ `.window-canvas`) per top-level window every KiCad dialog
* (text properties, symbol chooser, power chooser, ) is one of these,
* appended to #window-container. setWindowRect positions it via inline
* left/top, which only take effect when the element is `position: absolute`.
*
* The standalone test harness HTML ships these rules; the React shell
* (WasmTool.tsx) did not so dialogs computed `position: static`, ignored
* their left/top, and rendered jammed in the top-left corner with the OK
* button clipped off-screen. These rules (mirrored from the test harness)
* restore correct centered positioning. Input is routed through the main
* #canvas, so the window layers are pointer-events: none.
*/
.window {
position: absolute;
pointer-events: none;
z-index: 10;
background-color: black;
overflow: hidden;
width: 0;
height: 0;
}
/*
* Give modal dialogs (top-level windows, not popup menus) a border + drop
* shadow so they read as raised surfaces instead of flat blocks. The
* `toplevel` class is emitted by wxTopLevelWindow::GetCSSClassList; popup menus
* (`.window.popup`) style themselves in wx-dom.js and the main frame is the
* page #canvas, so neither is affected. pcbjam #22.
*/
.window.toplevel {
border: 1px solid #808080;
box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.35);
}
.window-canvas {
position: absolute;
top: 0;
left: 0;
pointer-events: none;
}