Answer the question
In order to leave comments, you need to log in
Postcss-modules as the best bem alternative?
In search of interesting postcss packages, I came across postcss-modules
In general, the same topic as css modules in reactjs (but only in reactjs), and this one can be used everywhere, for example, when making a landing page on WordPress.
I just usually use bem to simulate code locality, but bem is just a set of rules to follow, and here is a direct bullet-proof solution. In reactjs, if you have enabled support for css modules (in webpack), then there is no need to follow bem. It turns out with this package, if you pull it into the project, then you don’t have to worry about bem. Or am I missing something?
ps Do you use this dependency in WordPress development as an alternative to the bem methodology?
Answer the question
In order to leave comments, you need to log in
First, what does WordPress have to do with it?
Secondly, if we are talking about WordPress, then in some places it adds its own classes. This must be taken into account.
Thirdly, I would open my hands for such classes that this package generates.
Fourthly, what is the profit, especially for a landing page where by default all classes will be used on the same page?
Fifth, you don’t have to worry about bem at all, this is just one of the methodologies / naming conventions.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question