24-02-20
2025-02-20
TIL:
- Bun + Astro seems to have some weird bug where it doesn’t hot-reload a page on change. Seems to be a Vite issue? Found a fix here: Case mismatched .astro components do not hot reload when running dev server · Issue #4419 · withastro/astro
- “Notice there is a line break before the text starts in the block above. That line break will render, which can be highly annoying. There is no great CSS way to handle that.” - CSS Tricks on styling
pretags - You can set custom properties, then redefine them in a different scope:
<style>
:root {
--some-var: red;
}
main {
background: var(--some-var);
}
main.dark {
--some-var: pink;
}
</style>