Closed bebraw closed 8 years ago
Great idea. This could be an differentiating factor for Antwar.
How about using CSS modules and having component folders instead of page "template" files. Then placing the CSS per component in the folders. Shared stuff would go in shared folder. Example: https://github.com/css-modules/webpack-demo/tree/master/src/components
CSS modules seem very fresh technology at the moment. I'm not sure if we want to tie into some specific solution yet. Now styling is up to theme authors. That said having some better conventions (ie. component folders + associated styling) might be a good idea.
@eldh Any thoughts on this?
Yes you are right about the freshness. It's more about the pattern and "The React Way" :)
Practically I think this is related to the "jsx-includes" proposed in #71. It would be great from separation of concerns point of view if site authors could extend or replace parts of Antwar with their own UI widgets without depending much on a template.
Really like css modules.
Would be nice if there was an easy way for themes to expose whichever functions they wanted.
As for antwar core, we should allow overrides of every component/template that we know about – the section indices, section items etc.
If you want to do changes now, you have to fork entire theme. It would be better to support something more gradual. Ie. you might want to write custom SectionItem types, override existing ones and so on.