sebastian-software / edge

The Lerna Repository for Edge Platform
Apache License 2.0
33 stars 7 forks source link

Revamp CSS Modules implementation to use .module.css filename convention #4

Open swernerx opened 6 years ago

swernerx commented 6 years ago

To improve interoperability with 3rd party JS and CSS libraries it seems to be a good idea to follow the .module.css filename convention for enabling CSS modules. For all "normal" CSS files we won't use CSS modules anymore. This improves compatibility with React components which follow a strict CSS naming convention and aligns with tools like Create React App and Razzle.

See also: https://github.com/facebookincubator/create-react-app/pull/2285/files

swernerx commented 6 years ago

We have to keep in mind that our very own prepublish tool is not generating .module.css filenames right now but instead just use hashes. We have to add an option there to keep to toggle whether CSS files are module files... maybe there could be also some auto-detection e.g. when original file name contains .module.css then we use the same "extension" on the output file.

swernerx commented 6 years ago

Razzle uses this feature description: "Comes with the same CSS setup as create-react-app" - maybe good to copy it for our readme.