litinskii / react-app

0 stars 0 forks source link

add to wiki page that describe style convention #2

Open litinskii opened 6 years ago

litinskii commented 6 years ago

add to wiki page that describe style convention BEM

Vasso commented 6 years ago

I think we can use Two Dashes style or React style https://en.bem.info/methodology/naming-convention/#two-dashes-style https://en.bem.info/methodology/naming-convention/#react-style

In my point of view, Two Dashes is a good choice. @w-site @ksalt what do you think?

litinskii commented 6 years ago

@Vasso What about is we use both of this convention ?

Vasso commented 6 years ago

@w-site We can mix them and implement our own convention. Like: .ComponentName {} .ComponentName-ElementName {} .ComponentName-ElementName--mod-name {}

litinskii commented 6 years ago

@Vasso @ksalt and what is the difference between modName and modVal in this case https://en.bem.info/methodology/naming-convention/#react-style ?

litinskii commented 6 years ago

@Vasso do you mean

.ComponentName-ElementName--modName {}
Vasso commented 6 years ago

@w-site your truth. Is it ok to you?

Vasso commented 6 years ago

what is the difference between modName and modVal in this case

@w-site In this example search-form__button_size_s size is modName s is modVal

we can use specific mod without separation to name and value

litinskii commented 6 years ago

@Vasso

we can use specific mod without separation to name and value

Yes, I thinks this will be the best. So to summarize:

Am I right ?

So, we need to write this rule as a page on wiki with some examples and change current style, are you going to be responsible for this @Vasso ?

Vasso commented 6 years ago

@w-site I'll do this.