2 ms·
This seems like too much abstraction (magic) of things. Plus those auto generated classes really look odd and would make debugging difficult.
by chinchang 11y ago
This seems like too much abstraction (magic) of things. Plus those auto generated classes really look odd and would make debugging difficult.
- mradmin 11y agoI assume soucemaps would solve this.
- sic1 11y agoIt's lovely to assume this, but I see no mention of sourcemaps anywhere. This was my immediate gripe, debugging. Yea, the class name should point you to the file you want to look at, but that is still manual legwork. And the whole atomic css-like pitch he has with the over-the-top `composes` functionality looks like its own nightmare. I'll watch from over here and see if this pans out for ya'll.
- mradmin 11y agoI can't speak from experience with regards to this particular approach, but I've worked with css-modules with webpack (css-loader), and debugging the class names is no problem at all, CSS source-maps point to the source, you can view the source code within your developer tools. It shouldn't really be any different than debugging Sass generated CSS, for example.
- patrikh 11y agoWebpack allows you to change the format through its loader configuration. Perhaps, this could get implemented to CSS Modules too, if it’s not already. loaders: [ ... { test: /\.css$/, loader: 'css?localIdentName=[name]__[local]___[hash:base64:5]' } ]