You Probably Need BEM CSS in Your Life (Tutorial)

You Probably Need BEM CSS in Your Life (Tutorial)

DesignCourse

4 года назад

163,467 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@DesignCourse
@DesignCourse - 30.01.2020 17:44

Enjoooy?? Subby subby!

Ответить
@IcedCupcakes
@IcedCupcakes - 01.12.2023 23:37

"specifity. I can never say it right. SPECIFITY! there we go!" DEAD xD great video though!!

Ответить
@Vittokm
@Vittokm - 03.10.2023 19:25

Very very good! was trying to understand this before but only now I understand :)

Ответить
@jennisonb37
@jennisonb37 - 25.09.2023 17:10

Thank you for explaining BEM so clearly and succinctly. You got a new sub and I'm looking forward to watching some of the other videos you have.

Ответить
@adheeshadeshan608
@adheeshadeshan608 - 05.08.2023 21:22

Great ✌

Ответить
@korkut31
@korkut31 - 28.06.2023 19:05

wrong naming. very wrong.

Ответить
@tonightisgoodnight-js3rm
@tonightisgoodnight-js3rm - 07.04.2023 07:22

thanks

Ответить
@coolworx
@coolworx - 22.03.2023 04:31

What's the point of doubling up on the underscores and the hyphens?
Wouldn't card_button-active tell you the same information (what it's for) as card__button--active?

Ответить
@BenRangel
@BenRangel - 27.01.2023 14:30

I've used BEM for many years.
Modifiers are great and truly provides a nice way of stating a clear intention that this element has a shared base style and a variant that overrides or adds a few things.

But the block__element concept is less useful. It's fine in tiny flat components that you don't change a lot.

But in larger things the double underscore often has to be moved deeper down and feels useless.

You begin with footer__menu but as that menu gets more and more children you rename it to footer-menu so can have children like footer-menu__user and footer-menu__faq

If this renaming happens multiple times, or the dom tree for the footer is quite deep then you end up just forgetting which nodes have the block__element thing and which just use dashes.

At which point I usually go "screw it, let's use single dashes all the way" and I never end up regretting it.

I still use BEM on small isolated components though.

Ответить
@maruchen4834
@maruchen4834 - 21.01.2023 09:25

thank you, really helpful!!

Ответить
@nikolozmacharashvili1212
@nikolozmacharashvili1212 - 09.01.2023 14:36

great job with the slides... best slides I have ever seen

Ответить
@claudiutamas79
@claudiutamas79 - 14.11.2022 01:09

GEnial! Thanks!

Ответить
@Sothatjusticecanbedo
@Sothatjusticecanbedo - 20.10.2022 13:25

Thanks

Ответить
@tenebrae1191
@tenebrae1191 - 18.10.2022 13:20

👏👏

Ответить
@kastus9188
@kastus9188 - 26.09.2022 20:08

great video

Ответить
@AlexMNet
@AlexMNet - 18.09.2022 21:03

I spy with my little eye a Kemper Toaster!

Ответить
@vito-mohagheghian
@vito-mohagheghian - 17.09.2022 14:34

the best BEM tutorial

Ответить
@stormybear4986
@stormybear4986 - 17.07.2022 06:04

"spess-uh-FISS-it-tee"

Ответить
@ishaankarnik6136
@ishaankarnik6136 - 28.06.2022 10:41

thanks!

Ответить
@jeannoelhonisch7037
@jeannoelhonisch7037 - 22.06.2022 17:17

i dont really understand, how the selector in css works, when you reference the name just with the the __name, just because its named differently in the html...

Ответить
@sanketmane5838
@sanketmane5838 - 22.05.2022 15:11

Thank you so much for this tutorial...

Ответить
@AdyB2008
@AdyB2008 - 16.05.2022 22:42

Great easy to understand video. Thank you!

Ответить
@AdyB2008
@AdyB2008 - 16.05.2022 22:39

Specificity! :P

Ответить
@Ahmad-lc1ln
@Ahmad-lc1ln - 03.05.2022 18:59

It's useless, using SASS is better.

Ответить
@alamesawikanningkaton5028
@alamesawikanningkaton5028 - 14.04.2022 16:42

That was clear... but a little bit confusing if we want to use isolated component or block to another block. We can not override style from unrelated block.

for example, we want to use .btn block inside .card block. Let say that the button inside .card block have different style. So how we deal with it?

Ответить
@kacperkepinski4990
@kacperkepinski4990 - 04.04.2022 13:19

There are only one elem of everything...

Ответить
@gazza363
@gazza363 - 28.02.2022 06:08

Fantastic video

Ответить
@SteveUrlz
@SteveUrlz - 10.02.2022 17:56

Isn't it SpeciFIcity

Ответить
@flowerofash4439
@flowerofash4439 - 05.02.2022 07:55

nice method on writing css, scss + bem probably the best way to go for large project

Ответить
@lufefe543
@lufefe543 - 03.02.2022 16:43

thanks a lot!

Ответить
@yasinkarimzadeh
@yasinkarimzadeh - 16.01.2022 18:00

perfect

Ответить
@zayarlynn9388
@zayarlynn9388 - 29.12.2021 10:37

gonna follow that convention

Ответить
@jasonleelawlight
@jasonleelawlight - 28.12.2021 09:00

I have used BEM in one previous company project, not a big fan of it. I like modular css/scss much better.

Ответить
@TineruHarlem
@TineruHarlem - 09.12.2021 16:30

Thank you for a good explanation! This video helped a lot!

Ответить
@EpicphoneGamer
@EpicphoneGamer - 05.12.2021 10:26

Important question. What is that green guitar in the background? Are these EMG pickups?

Ответить
@dilinirajapaksha
@dilinirajapaksha - 13.11.2021 02:46

Very helpful, great tutorial. Thank you!!!

Ответить
@PoetikSage
@PoetikSage - 12.11.2021 09:43

I don't care if I'm doing large project or small, I always use BEM. (that's different thing I don't get large projects)

Ответить
@JensAndersenGuitarist
@JensAndersenGuitarist - 01.11.2021 11:15

It is Spe-ci-fi-ci-ty ;-) And why arent you using semantic elements in HTML? Like a section or an article for the card? It is supposed to be an element that can stand alone and therefore it should be an article or a section for each card? I know that there is not a title/heading in this example, but anyways? And why is the picture/img not a part of the content element?

Ответить
@sunflair-wa
@sunflair-wa - 28.10.2021 12:32

Thank you so much. I feel like I have been given the secret handshake to the club :)

Ответить
@andreppg
@andreppg - 30.08.2021 15:27

Great tutorial ! Good speed, clean and straightforward to the point. Thanks.

Ответить
@user-gs3pt1uf1g
@user-gs3pt1uf1g - 30.08.2021 03:59

Coming from a big project, one important lesson learnt: don't abuse Sass/SCSS, keep it to bare minimum. Reason? Trying to resolve a high priority production defect with a huge SPA codebase, it doesn't help to have .block { ...; &__element{... &--modifier{...}} rulsets: it very hard to find the original rule definition in source code, since in the browser you'll see generated version. The lesson learned, in order to be able to quickly find a rule, write entire selector by hand, don't leave it up to SCSS preprocessor. One thing is to write confusing Sass code to impress junior female developers on your team, and another thing to debug prod issue under pressure and a lot of stress. KISS.

Ответить
@yogidad
@yogidad - 27.08.2021 08:51

By mistake you have added class on closing tag as well

Ответить
@sublimetrance
@sublimetrance - 17.08.2021 22:07

What happened to the red guitar in the background?

Ответить
@antons7210
@antons7210 - 26.07.2021 22:18

I started using this method after a tutorial without even knowing what it is lol

Ответить
@ilyasseisov7204
@ilyasseisov7204 - 18.07.2021 12:01

Thank you Gary!

Ответить
@diy-hobby
@diy-hobby - 01.07.2021 21:26

I still dont get the point of BEM

Ответить