Hi,
Still not clear how to style a component in choo in development.
I, for example, am trying to migrate a project to choo.js and I'm not entirely sure what's the best option to use to add the css files in the new choo.js project in dev
Is there no way of importing style.css in development in a component.js ?
The sheetify seems extremely tedious when migrating.. :(
Nanocomponent and bel/nanohtml pure functions don't concern themselves with styling whatsoever. Whatever classes you assign to the class attribute of a dom node will determine how it gets styled. Any css file you load into to your app dom will work with choo components, via css selectors and DOM node class attributes.
Choo and bankai ship with support for https://github.com/stackcss/sheetify, one approach to css-in-js. Inline styles also work. A third party approach I've used is csjs https://github.com/hypermodules/hyperamp/blob/master/renderer/player/elements/header/index.js#L10 which is a similar aproach to sheetify but has a number of differences, like no transform requirements.
Most helpful comment
Nanocomponent and bel/nanohtml pure functions don't concern themselves with styling whatsoever. Whatever classes you assign to the class attribute of a dom node will determine how it gets styled. Any css file you load into to your app dom will work with choo components, via css selectors and DOM node class attributes.
Choo and bankai ship with support for https://github.com/stackcss/sheetify, one approach to css-in-js. Inline styles also work. A third party approach I've used is csjs https://github.com/hypermodules/hyperamp/blob/master/renderer/player/elements/header/index.js#L10 which is a similar aproach to sheetify but has a number of differences, like no transform requirements.