Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Webinar Recap: CSS Modules

Parent Feed: 

Amazee Labs webinars allow us to share our knowledge and experience with the community. Last week we discussed the challenges in choosing the right CSS-in-JS solution and the advantages of using CSS modules.

After a couple of years of building decoupled sites, the Amazee Labs team has tried several different CSS-in-JS solutions and found this one to be best suited to the needs of our development team.

CSS Modules is a mature project with a syntax that is a superset of CSS, similar to Sass. It makes it easy for you to “think in components” without having to worry about BEM class naming. It automatically generates locally-scoped CSS class names, so you can use “.wrapper” in multiple files without conflict.

It also allows integration of “global” class names from other code (like JS libraries or 3rd party CSS). With CSS Modules you get automatic dead-code elimination as only the CSS used on the page is ever sent to the browsers. Best of all CSS Modules can be used with any JavaScript framework, including React, Angular and Vue.js.

Watch the webinar recording online to learn about:

  • Components without BEM

  • Locally-scoped class names

  • Dead-code elimination

  • Multi-platform support

  • Nested rulesets

  • Cross-component composition

  • Sharing variables between your JavaScript and your CSS


Catch up on our previous webinars here:

Sharing knowledge and learnings is a key value at Amazee Labs. Keep an eye out for future webinars here!

Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web