Created by: haraldrudell
I though it would be pedagogical to use CSS Modules (locally scoped selectors), in a light version where the non-standard local:
directive from the webpack plugin css-loader is being used. If people start making components from Create React App, with this they can’t miss how to do locally scoped css.
The point is that one way or another, we will need this and it is not going to be standard
- Even if we do have .module.css files in 2.0, we will need a non-standard directive similar to
:local
and:global
- We will need some non-standard directives should we use webpack or not
- Otherwise local and global styles have to be in separate files
- It does not seem w3c is going to help with standardization at the moment. The path there seems to be :scope which requires style elements in the middle of markup, eg. at the top of a component, regions or :host. You would hope they took a look at ECMAScript Symbols and found a simpler approach
- besides the :scope aspect, it can also be foreseen that css is going to look even more like css in the future (ie. no scss cssinjs fancy-framework-dying-off-like-flies…)
- Styling React components is not going to be standard. Either some clever mapping of possibly standards-compliant css values over to ECMAScript like css-loader, or a custom react-css-loader.
This was obviously made to work from the extensive work from the last 7 months in #2278 (closed) #2285 by @ro-savage slated for version 2.0 at some undetermined future time
harsh words on this topic are in #90 (closed)
This here is best evidence at the moment