+ 1

Class, Id names

Why do people give weird Class or Id give such odd names?

8th Feb 2017, 3:28 PM
Cltnbatchelor
Cltnbatchelor - avatar
6 Answers
+ 4
They may not be weird or odd in each people meaning ^^ And sometimes it's more useful to handle some abstruse numbered id ( eventually in base more than 10 ) to automatize some tasks like iterate over a bunch of elements trough their id to initialize them...
8th Feb 2017, 3:54 PM
visph
visph - avatar
+ 3
.col-xs-4 is a shorthand to say "column of 4 units for medium display" or something like that: 'col' is shortcut but keep understansable ( mostly if you use it frequently ), 'xs' is a size code about responsive behaviour, the number is count of unit for width size of the column ( relatively to a full width counting 12 units )... All that stuff is very logic, at end.
8th Feb 2017, 6:11 PM
visph
visph - avatar
+ 2
Would you provide some examples of what you call "such odd names"? I don't remember that class names are so much awful in Bootstrap ;) Anyway, class and id names need to be valid identifier, so you can neither use spaces, dots ( wich is a special char in css rules ), nor begin with a digit... :P
8th Feb 2017, 4:07 PM
visph
visph - avatar
+ 1
then why don't say nav 1.2 or 1.2 instead of what you would see coming from bootstrap or something
8th Feb 2017, 3:58 PM
Cltnbatchelor
Cltnbatchelor - avatar
+ 1
.col-xs-4 something like that. Maybe it wouldnt be so weird if i knew what it ment. or the method the use to come of with something like that.
8th Feb 2017, 5:36 PM
Cltnbatchelor
Cltnbatchelor - avatar
+ 1
Thank you. I have a better understanding and its gonna benefit me in a long run knowing that.
8th Feb 2017, 6:21 PM
Cltnbatchelor
Cltnbatchelor - avatar