WennDann / f1-3-c2p1-colmar-academy

0 stars 0 forks source link

Use camelCase or -/_ for multi-word names #4

Open griffinlacek opened 7 years ago

griffinlacek commented 7 years ago

Common practice is to keep classnames and ids in camelCase or -/_ format, which means all one word names are lowercase and if there are more than two words then we do camelCase, which keeps the first word lowercase and capitalizes the first letter of each following word. Alternatively, we can separate words with - or . Generally, you do a good job, but a few of your classes and ids are just one word with capital letters or have multiple words with no camelCase or -/.

Here's just a few spots:

https://github.com/WennDann/f1-3-c2p1-colmar-academy/blob/master/ColmarAcademy/index.html#L270-L271 https://github.com/WennDann/f1-3-c2p1-colmar-academy/blob/master/ColmarAcademy/index.html#L277-L278 https://github.com/WennDann/f1-3-c2p1-colmar-academy/blob/master/ColmarAcademy/index.html#L290-L291 https://github.com/WennDann/f1-3-c2p1-colmar-academy/blob/master/ColmarAcademy/index.html#L324 https://github.com/WennDann/f1-3-c2p1-colmar-academy/blob/master/ColmarAcademy/index.html#L358 https://github.com/WennDann/f1-3-c2p1-colmar-academy/blob/master/ColmarAcademy/index.html#L413-L414

(Mostly just flexrow and flexcolumn)

WennDann commented 7 years ago

@griffinlacek Oh, thank you for that one. I did not think about that. And I suppose this is a thing due to the German language. In German we often take two nouns and put them together. Take apple and tree for example. In German this is Apfel and Baum. Do you want to say apple tree this would be one word in German: Apfelbaum. And as we need "one word" names for classes, I didn't think about making this camelCase, as you call it. I suppose I might fall in that trap again in the future, but I'll try to do my best to avoid it :wink: Thanks