Need advice about which tool to choose?Ask the StackShare community!

BEM

121
98
+ 1
0
SUIT CSS

12
25
+ 1
0
Add tool

BEM vs SUIT CSS: What are the differences?

  1. Naming Convention: The key difference between BEM and SUIT CSS lies in their naming conventions. BEM (Block Element Modifier) uses a unique naming approach where each component is named based on its functionality or purpose. It follows a hierarchical structure by appending prefixes or suffixes to the class names to indicate the relationship between elements. SUIT CSS, on the other hand, follows a more modular approach by using a flat naming convention. It avoids any hierarchical structure and focuses on using single class selectors with concatenated names that describe the component's purpose.
  2. Selectors: In terms of selectors, BEM uses complex selectors to target specific elements within a component. It relies on descendant selectors, child selectors, or modifier classes to style different parts of the component. SUIT CSS, however, promotes a more direct approach by using only class selectors without combinators or descendant selectors. It aims to keep the styles encapsulated and maintainable by avoiding nested or complex selectors.
  3. Component Scope: BEM emphasizes the scope of a component by encapsulating all the styles within the component's class. This allows the styles to be self-contained and reusable across different projects. SUIT CSS takes a different approach by focusing on composability rather than strict encapsulation. It encourages the use of utility classes that can be composed together to create different component variations. This promotes code reuse and reduces the need for rewriting similar styles for different components.
  4. Customization: BEM provides a higher level of customization as it allows for easy modification of individual elements within a component. By using modifiers, developers can easily change the appearance or behavior of specific elements without affecting other parts of the component. SUIT CSS, on the other hand, promotes a more holistic approach to customization. It encourages the use of theme variables and utility classes that can be applied globally to achieve consistent styling across components.
  5. Browser Support: BEM is widely supported by all modern browsers since it relies on standard CSS selectors and class names. SUIT CSS, being a more recent approach, may encounter some challenges with older browsers that do not support the latest CSS features such as flexbox or custom properties. However, with the help of tools like PostCSS and CSS preprocessors, these compatibility issues can be addressed.
  6. Learning Curve: BEM has a steeper learning curve due to its complex naming conventions and hierarchical structure. It requires understanding the various naming conventions, the relationship between elements, and the appropriate usage of modifiers. SUIT CSS, on the other hand, has a more straightforward learning curve as it follows a flat naming convention and promotes a modular approach. It focuses on creating reusable utility classes that can be easily composed together.

In summary, BEM and SUIT CSS differ in their naming conventions, selectors, component scope, customization approach, browser support, and learning curve. BEM uses a hierarchical structure and complex selectors, emphasizing scope and customization, while SUIT CSS follows a flat naming convention, promotes composability, and focuses on utility classes.

Manage your open source components, licenses, and vulnerabilities
Learn More
- No public GitHub repository available -

What is BEM?

This methodology was developed at Yandex with the goals in mind that Fast development and long-lasting results for standard projects,A project involves many people,Scalable teams,Code reuse.

What is SUIT CSS?

SUIT CSS provides a reliable and testable styling solution for component-based web application development.

Need advice about which tool to choose?Ask the StackShare community!

What companies use BEM?
What companies use SUIT CSS?
Manage your open source components, licenses, and vulnerabilities
Learn More

Sign up to get full access to all the companiesMake informed product decisions

What are some alternatives to BEM and SUIT CSS?
CSS Modules
It is a CSS file in which all class names and animation names are scoped locally by default. The key words here are scoped locally. With this, your CSS class names become similar to local variables in JavaScript. It goes into the compiler, and CSS comes out the other side.
Bootstrap
Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.
JavaScript
JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.
Python
Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
Node.js
Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
See all alternatives