S
S
swcalc2015-10-31 13:32:06
PHP
swcalc, 2015-10-31 13:32:06

How to choose a name for variables, classes and Id for layout elements?

Hello, I have a problem, how many years I have been writing and typesetting, all the time I am faced with the difficulty of correctly determining the name for a variable or id for html, in the case of the code there is nothing, everything can be divided into local functions and use a specific set, directly by meaning. But, if we talk about layout, naming css classes is just hell.
How to do it correctly (choose a name for the class and id css), so as not to get confused later?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2015-10-31
@swcalc

1) don't use ID
2) BEM
3) Css Modules

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question