fix(css,preview): scope utilities under the view root, preview with real boards and foreign css

This commit is contained in:
hh committed 2026-08-29 19:39:19 +02:00
1 parent 0a7742eb5e
commit 8c971e431a
10 files changed
+458 -14

No files matched your search

+16
View File
@@ -18,3 +18,19 @@ make zip # distributable
```
After `make install` turn on plugin in settings.
`styles.css` is Tailwind output run through `scripts/scope-css.mjs`: every
selector is prefixed with `:is(.bcal-root, .bcal-root *)`. Other plugins built
with Tailwind put their utilities into the same `utilities` cascade layer, and
without the extra specificity whichever plugin loaded last would win (their
`.hidden` over our `@container` variants, for one).
Preview knobs, all optional:
```bash
VAULT=/path/to/vault npm run preview # the vault's theme
BOARDS=/path/to/vault/Boards npm run preview # real boards, not fixtures
EXTRA_CSS=/path/to/other-plugin/styles.css … # another plugin's css, loaded after ours
open 'http://localhost:4173/?groupBy=due&railCollapsed=1#edit-date' # prefs + scene
node preview/shot.mjs out.png 'http://localhost:4173/#date' # screenshot + console
```