Update:
i found a similar discussion:
and a nice tool: GitHub - salsify/ember-css-modules: CSS Modules for ambitious applications, it prefixes the class-names. But at the end i don’t want to have any automatism in class-naming.
the best would be if the IDE wold check for CSS-selectors. There is a issue on IntelliJ. You can vote for it, i think it would be a great help. https://youtrack.jetbrains.com/issue/WEB-74
for me it seems that the next-steps will be:
- Having Style-Sheets beside Template / Components (i am working with Module-Unification)
- Have a Prefix, by example “pe-” for the people-Template
- Name of the Stylesheet is then: “pe-styles.scss”
- All the Stylesheets are collected by “@import ‘…/pe-styles.scss’”
- All the classes which are defined in “pe-styles.scss” have the prefix “pe-”
=> with that i have a overview for all prefixes in the main-stylesheet, by the import-steps and a manually namespacing.
For the Future i hope that IntelliJ insert the above mentioned inspector.
What do you think?
Best Regards, Christian