CMMS embedding: follow the CMMS light/dark theme
window.CMMS_SCAD_CONFIG.dark (set by edit.php from theme_is_dark()) now
drives: the primereact theme (runtime <link> to a bundled
primereact-theme-{light,dark}.css instead of a static light import), the
Monaco editor theme (vs-dark / light), and a body.cmms-dark class that
overrides the light-hardcoded bits in public/index.html. Standalone use
is unchanged (light).
This commit is contained in:
parent
1c7f05f404
commit
0e80cde156
5 changed files with 14174 additions and 1 deletions
|
|
@ -118,6 +118,15 @@
|
|||
}
|
||||
|
||||
.github-fork-ribbon:before { background-color: #333; }
|
||||
|
||||
/* CMMS embedding hook (patch): when loaded dark inside the CMMS, the
|
||||
body gets .cmms-dark (src/index.tsx). Override the light-hardcoded
|
||||
bits above; the primereact theme and Monaco theme are switched
|
||||
separately. */
|
||||
body.cmms-dark { background-color: #1e1e1e; color: #e6e6e6; }
|
||||
body.cmms-dark .p-fieldset-legend { background-color: rgba(0,0,0,0.4) !important; }
|
||||
body.cmms-dark .monaco-editor,
|
||||
body.cmms-dark .openscad-editor { background-color: rgba(30,30,30,0.5) !important; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
Loading…
Reference in a new issue