Hello,
I am reading about BEM: Class naming 101: BEM | Webflow Blog
And, while experimenting, I noticed that there are discrepancies in style organization.
For example, if I had a section and that specific section has its own “.section” selector, and two new combo classes called “.section–size-full” and “.section–color-light” it appears that before I can use “.section–color-light” I have to use “.section–size-full” and I cannot do the reverse. What if I want to add the color first and then adjust the size later?
Basically, my style manager looks like this after I add the combo classes:
.section
|.section–size-full
|.section–color-dark
|.section–color-light
|.section–color-dark
|.section–size-full
|.section–color-light
|__.section–size-full
Instead, I want:
.section (parent)
|.section–size-full (child)
|.section–color-dark (child)
|.section–color-light (child)
And be able to use any of them in any order I want without having to create combo classes and re-adjust the properties.
Basically, if I have two sections, I want to be able to assign the classes no matter which order they’re assigned. So, the selector might look like this:
section1: .section .section–color-light
section2: .section .section–size-full .section–color-dark
What am I doing wrong?
Here is my site Read-Only: LINK
(how to share your site Read-Only link)