Open metasoarous opened 3 years ago
Note that this also relates to #5, since changing css could potentially require an update to live-view. This starts to get a bit tricky though.
Context: I've decided, hey CSS is a good DSL, I'm going to write straight CSS. But HTML is kind of verbose for me, so I'm writing my site in .edn files with hiccup, and coming up with ad hoc classes that I'll style later.
If I don't mind reloading the browser when I change my CSS, what's "The Toto Way" for working with styles? I started a style.css
file but I haven't quite figured out how to load it when I'm viewing my (rudimentary) Toto view.
Hey @mathpunk! Thanks for asking about this.
For now, you can simply use :header-extras [[:link {:rel "stylesheet" :href "mystyle.css"}]]
. You may also want to use :omit-styles? true
to leave out the default Oz/Toto styles.
This is necessary for complete live-reload type functionality.
However, this is a little bit complicated for css assets and the like specifically.
This also threads in a with a general issue about how different kinds of dependencies thread in, which could lead to a full scons style build system.