V
V
Vasily Vasilyev2018-06-19 17:27:50
css
Vasily Vasilyev, 2018-06-19 17:27:50

Sass modules. How to avoid duplicate selectors?

Stack : gulp, scss, pug.
Let's say I've created a large scss+pug module with several hundred selectors inside. Some user-client wants to connect it to his no less large project, but then he runs into a problem - some selectors are the same (both in the module and in his project there are the same .btn-active selectors with different functionality) and will be redefined when connected, as a result - the spoiled imposition on an output. Fitting user selectors to a module is not an option.
Which exit? Maybe there is some plugin to unify selectors in pug and sass / html and css located in the same directory?
˜˜˜ src/
˜˜˜ |__mymodule/
˜˜˜˜˜˜ |__________myModule.scss
˜˜˜˜˜˜|__________myModule.pug

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question