Writing SCSS with BEM - Joe Forshaw
The Ideal Example
So below is how, in an ideal world, I would write SCSS:
.block {
&__element {
&:hover {
...
}
@media screen and (min-width: 768px) {
...
}
&--modifier {
&:hover {
...
}
@media screen and (min-width: 768px) {
...
}
}
}
&__element-sibling {
...
}
}
Related posts by tag
- 07 Nov 2024 daisyUI — Tailwind CSS Components
- 04 Mar 2024 Using personal gems with Bundle without bothering your colleagues.
- 12 Jul 2023 Protomaps - A serverless system for planet-scale maps