Single Responsibility Principle

Drew Barontini:

Hopefully that gives you a glimpse into how you can apply the Single Responsibility Principle to your CSS modules. Limit the scope of your modules, keep the styles small, and make sure your modules are properly encapsulated to ensure that your styles are both maintainable and predictable. Use submodules, modifiers, and context classes to make sure that your modules are nice and flex-y.

A super easy to follow article which introduces the fundamentals of writing better CSS.

Want to become a better web developer?

Join over 20,000 other developer & designers who get awesome links to the best news and articles each week delivered directly to their inbox.


This entry was posted in Link.

This post currently has no responses. What do you think?

You can use basic HTML when posting code, please turn all < characters into &lt; or > into &gt;
If the code is multi-line, use <pre><code></code></pre>

Leave a Reply

Your email address will not be published. Required fields are marked *