Why I use the BEM naming convention for my CSS

Поділитися
Вставка
  • Опубліковано 3 жов 2024
  • If you've watched any of my recent videos, you'll know that I use the BEM naming convention for my CSS classes. In this video, I explore why I use it, and why I think you should, at the very least, use some sort of naming convention.
    BEM stands for Block, Element, Modifier, and it presents us with a way to make more organized and readable CSS.
    I like BEM (mostly, I'm not super strict with my use of it) and think it's a great methodology for naming my CSS classes, but there are many others such as OOCSS, SMACSS, Atomic, and many others. BEM isn't the right answer, it's simply one possible answer. I strongly suggest you read up on the others as well and try to adopt one that you think makes the most sense.
    BEM: getbem.com/intr...
    OOCSS: oocss.org/
    SMACSS: smacss.com/
    Atomic CSS: github.com/nem...
    #fiveminutefriday
    ---
    I have a newsletter! www.kevinpowel...
    New to Sass, or want to step up your game with it? I've got a course just for you: www.kevinpowel...
    ---
    My Code Editor: VS Code - code.visualstu...
    How my browser refreshes when I save: • How to automatically r...
    ---
    Support me on Patreon: / kevinpowell
    I'm on some other places on the internet too!
    If you'd like a behind the scenes and previews of what's coming up on my UA-cam channel, make sure to follow me on Instagram and Twitter.
    Instagram: / kevinpowell.co
    Twitter: / kevinjpowell
    Codepen: codepen.io/kev...
    Github: github.com/kev...

КОМЕНТАРІ • 450