Basic knowledge of Html and CSS.

Basic knowledge of Html and CSS.

There are different CSS naming conventions available, such as SMACSS, AMCSS, BEM, etc. For this article, however, I would be talking about BEM.

Naming classes in CSS has always been difficult for međŸ˜„. Luckily a few months ago I came across the BEM naming convention. A naming convention is an agreed style for naming things(in this case CSS). There are different CSS naming conventions available, such as SMACSS, AMCSS, BEM, etc. For this article, however, I would be talking about BEM.

Prerequisites

  • Basic knowledge of Html and CSS.

What is BEM

BEM is short for Block Element Modifiers and is a CSS naming convention for classes in HTML and CSS.

The Block refers to a component such as a header, footer, nav, button, inputs, and the likes.

Element â€” they are found inside the block(components). they may be seen as children of the overall parent component.

Modifiers on the other hand are used to style a block or an element without affecting other unrelated components

Why use BEM

  • BEM helps us write CSS that is easy to read and maintain.
  • In large projects, BEM ensures that there are no conflicting styles.
  • It conveys the function and purpose of a CSS code.
  • It helps developers better understand the relationship between the HTML and CSS in a given project.

BEM helps us write CSS that is easy to read and maintain.

  • In large projects, BEM ensures that there are no conflicting styles.

  • It conveys the function and purpose of a CSS code.

  • It helps developers better understand the relationship between the HTML and CSS in a given project.

bem programming css

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Hire CSS Developer

Want to develop a website or re-design using CSS Development? We build a website and we implemented CSS successfully if you are planning to **[Hire CSS Developer](https://hourlydeveloper.io/hire-dedicated-css-developer/ "Hire CSS Developer")**...

Creating a CSS Visual Cheatsheet

The other day one of our students asked about possibility of having a CSS cheatsheet to help to decide on the best suited approach when doing this or that layout.

Programming In Acceleration: Levelling Up Programming Skills

Some require and some are not. But acceleration programs might require you to build one. I’ll tell you how I made a computer program for the competition.

Que rayos es la MetodologĂ­a BEM explicado con un ejemplo | CSS

Que rayos es la MetodologĂ­a BEM explicado con un ejemplo | CSS. Aprende que es la metodologĂ­a BEM, para que sirve y como se usa dentro de CSS para crear cĂłdigo mas organizado y limpio.

7 Best Vue CSS Component for Your App

Vue CSS frameworks are great for many reasons; code is more universally understood, web applications are easier to maintain, and prototyping becomes less of an extra step.