Skip to main content

Questions tagged [bem]

BEM is an abbreviation for Block-Element-Modifier. It's a convention for naming HTML DOM elements, CSS classes, JavaScript variables, and other web programming identifiers in a way that is easy to support and develop. It can be used for the individual development of a single website or for a large team working across multiple websites.

0 votes
1 answer
29 views

multiple modifiers in BEM

I have component button <button type="button" className="button button_size_large button_color_primary button_type_fill"> <Icon className="button__icon" type=...
Garo Gabrielyan's user avatar
0 votes
1 answer
16 views

BEM styling CSS - can I pass dynamic value in a BEM class

I am coding an animation in React and BEM and have a dynamic animationSpeed which is changed depend on container width: const Animation = () => { const setScrollingSpeed = (nodelist, timePixel, ...
tech27's user avatar
  • 97
0 votes
0 answers
149 views

How to set case of BEM in VSCode?

I've just started learning BEM methodology and typed the following code in VS Code: <html> <head> </head> <body> <form class="search-form search-...
Ella Ksenofontova's user avatar
0 votes
1 answer
67 views

Using BEM for large set design

I'm interested in how to solve the problem of names for classes. For example I have 30+ options for the first section (hero). They have different structure and different blocks inside. On the one hand ...
Mykyta Severyn's user avatar
0 votes
1 answer
50 views

How do I use BEM in a component structure?

I am currently trying to use BEM in a training project. To start with. I like having structure in my CSS. However, I am having a problem using BEM correctly. In the current case I don't know if I have ...
Maik Lowrey's user avatar
  • 17.2k
0 votes
0 answers
66 views

BEM configuration for react typescript

I used to work for a company that used BEM to build classNames for react elements, now I'm working on a solo project and would like to use it, and came across this package rebem-jsx but my project is ...
Mohhaliim's user avatar
0 votes
1 answer
55 views

How to categorize typography variants in BEM?

I have just recently been introduced to BEM and I'm excited to implement the methodology in my react component library. I have a Typography component with different variants. Notably, the variant is ...
sumowrestler's user avatar
0 votes
1 answer
62 views

Multiple classes on same parent element not working at the same time: BEM

I have two classes on the header: .header-container & a theme class, for example solid-green or solid-blue. The current markup works correctly in terms of applying the relevant theme styles, but I ...
cts's user avatar
  • 1,046
0 votes
1 answer
397 views

How to style buttons using BEM?

I'm new to html/css and I'm learning the BEM css methodology but I got stuck pretty early. What I wanted to do: have a button block have a color modifier (default/primaryColor) have different button ...
QwerJoe's user avatar
  • 84
0 votes
1 answer
55 views

I need help, my first time using BEM, is this correct?

This is my first time trying to use BEM and I'm not sure if I've done it correctly. Is there anything i need to change?? <body> <div class="wrapper"> <main class=&...
Steven Tran's user avatar
1 vote
1 answer
95 views

Multiple BEM elements and modifiers in Sass [duplicate]

I am using BEM with multiple elements and modifiers but different blocks. .header__column--6 width: 50% .footer__column--6 width: 50% Is there a way to address the elements and modifiers ...
Bitkit's user avatar
  • 13
1 vote
1 answer
99 views

Is there any way to style a <svg> fill property inside a <p> tag using just one modifier without violating the BEM CSS principles?

I wonder if I could style <svg> fill color with just paragraph--color modifier. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> ...
Rafael Reis Ramos's user avatar
3 votes
1 answer
124 views

what is service block in BEM naming methodology?

bem elements rules say. Create an element If a section of code can't be used separately without the parent entity (the block). The exception is elements that must be divided into smaller parts – ...
coding journey's user avatar
3 votes
1 answer
175 views

Should I create a block or an element BEM CSS?

** Bem official website says ** Create a block If a section of code might be reused and it doesn't depend on other page components being implemented. Create an element If a section of code can't be ...
coding journey's user avatar
1 vote
1 answer
778 views

Reactjs, Bem naming nested structure with SCSSModule

We are using SCSS, SCSSModule and BEM naming methodology. I have researched the best structure for nested elements. I've seen different syntaxes and still have question mark in my head. I saw the ...
lead.eg's user avatar
  • 86

15 30 50 per page
1
2 3 4 5
29