{"id":173999,"date":"2018-11-09T17:00:05","date_gmt":"2018-11-09T17:00:05","guid":{"rendered":"https:\/\/www.wacoca.com\/anime\/173999\/"},"modified":"2018-11-09T17:00:05","modified_gmt":"2018-11-09T17:00:05","slug":"why-i-use-the-bem-naming-convention-for-my-css","status":"publish","type":"post","link":"https:\/\/www.wacoca.com\/anime\/173999\/","title":{"rendered":"Why I use the BEM naming convention for my CSS"},"content":{"rendered":"<p><iframe loading=\"lazy\"  width=\"580\" height=\"385\" src=\"https:\/\/www.youtube.com\/embed\/SLjHSVwXYq4\" frameborder=\"0\" allowfullscreen><\/iframe><br \/>\n<br \/>\nIf you&#8217;ve watched any of my recent videos, you&#8217;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. <\/p>\n<p>BEM stands for Block, Element, Modifier, and it presents us with a way to make more organized and readable CSS.<\/p>\n<p>I like BEM (mostly, I&#8217;m not super strict with my use of it) and think it&#8217;s a great methodology for naming my CSS classes, but there are many others such as OOCSS, SMACSS, Atomic, and many others. BEM isn&#8217;t the right answer, it&#8217;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. <\/p>\n<p>BEM: http:\/\/getbem.com\/introduction\/<br \/>\nOOCSS: http:\/\/oocss.org\/<br \/>\nSMACSS: https:\/\/smacss.com\/<br \/>\nAtomic CSS: https:\/\/github.com\/nemophrost\/atomic-css<\/p>\n<p>#fiveminutefriday<br \/>\n&#8212;<\/p>\n<p>I have a newsletter! https:\/\/www.kevinpowell.co\/newsletter<\/p>\n<p>New to Sass, or want to step up your game with it? I&#8217;ve got a course just for you: https:\/\/www.kevinpowell.co\/learn-sass<\/p>\n<p>&#8212;<\/p>\n<p>My Code Editor: VS Code &#8211; https:\/\/code.visualstudio.com\/<\/p>\n<p>How my browser refreshes when I save: https:\/\/youtu.be\/h24noHYsuGc<\/p>\n<p>&#8212;<\/p>\n<p>Support me on Patreon: https:\/\/www.patreon.com\/kevinpowell<\/p>\n<p>I&#8217;m on some other places on the internet too!<\/p>\n<p>If you&#8217;d like a behind the scenes and previews of what&#8217;s coming up on my YouTube channel, make sure to follow me on Instagram and Twitter.<\/p>\n<p>Instagram: https:\/\/www.instagram.com\/kevinpowell.co\/<br \/>\nTwitter: https:\/\/twitter.com\/KevinJPowell<br \/>\nCodepen: https:\/\/codepen.io\/kevinpowell\/<br \/>\nGithub: https:\/\/github.com\/kevin-powell<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;ve watched any of my recent videos, you&#8217;ll know that I use the BEM naming convention for my<\/p>\n","protected":false},"author":4,"featured_media":174000,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[37524,174861,174860,143620,174864,174865,174863,174862,174869,174867,174868,174859,174858,28052,174866],"class_list":{"0":"post-173999","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-japanese-anime","8":"tag-bem","9":"tag-bem-naming-convention","10":"tag-css","11":"tag-css-bem","12":"tag-css-bem-best-practice","13":"tag-css-bem-examples","14":"tag-css-bem-methodology","15":"tag-css-bem-naming","16":"tag-css-naming-classes","17":"tag-css-naming-conventions","18":"tag-css-naming-conventions-best-practices","19":"tag-html","20":"tag-kevin-powell","21":"tag-tutorial","22":"tag-why-i-use-bem"},"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"https:\/\/www.wacoca.com\/anime\/wp-json\/wp\/v2\/posts\/173999","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wacoca.com\/anime\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wacoca.com\/anime\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wacoca.com\/anime\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wacoca.com\/anime\/wp-json\/wp\/v2\/comments?post=173999"}],"version-history":[{"count":0,"href":"https:\/\/www.wacoca.com\/anime\/wp-json\/wp\/v2\/posts\/173999\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wacoca.com\/anime\/wp-json\/wp\/v2\/media\/174000"}],"wp:attachment":[{"href":"https:\/\/www.wacoca.com\/anime\/wp-json\/wp\/v2\/media?parent=173999"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wacoca.com\/anime\/wp-json\/wp\/v2\/categories?post=173999"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wacoca.com\/anime\/wp-json\/wp\/v2\/tags?post=173999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}