+ 1
Class, Id names
Why do people give weird Class or Id give such odd names?
6 Respuestas
+ 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...
+ 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.
+ 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
+ 1
then why don't say nav 1.2 or 1.2 instead of what you would see coming from bootstrap or something
+ 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.
+ 1
Thank you. I have a better understanding and its gonna benefit me in a long run knowing that.