6 posts
  • Bought between 10 and 49 items
  • Europe
  • Exclusive Author
  • Has been a member for 5-6 years
larswennerberg says

Which way is the right way to writte class or id: expanded_view or expanded-view. Some say that expanded-view is the correctly way. Or dose it matter at all.

444 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • United Kingdom
TahaH-Studio says

It doesn’t matter at all. You can even writ your IDs like so ExpandedView. Choose what ever suits you best. The only difference that i can see between expanded_view and expanded-view that in some editors, if you double click on ‘expanded_view’ it will select the whole word but if you double click on ‘expanded-view’ it will only select either ‘expanded’ or ‘view’ depending on where did you click.

6 posts
  • Bought between 10 and 49 items
  • Europe
  • Exclusive Author
  • Has been a member for 5-6 years
larswennerberg says

thanx

155 posts
  • Bought between 10 and 49 items
  • Canada
  • Exclusive Author
  • Has been a member for 4-5 years
Warll says
It doesn’t matter at all. You can even writ your IDs like so ExpandedView. Choose what ever suits you best. The only difference that i can see between expanded_view and expanded-view that in some editors, if you double click on ‘expanded_view’ it will select the whole word but if you double click on ‘expanded-view’ it will only select either ‘expanded’ or ‘view’ depending on where did you click.

Well thats odd, in English the dash is used to conjoin words like ‘at-least’, or atleast it is done that way un-till the usage becomes common.

Mean-while underscore is a replacement for a space, the behavior of these editors would appear to be backwards.

738 posts
  • Has been a member for 5-6 years
  • United States
  • Bought between 10 and 49 items
  • Exclusive Author
Jar says

In most cases the dash is optional. As for which is ‘the right way’, most people accept them as the same for IDs; a space.

by
by
by
by
by
by