6 posts
  • Has been part of the Envato Community for over 5 years
  • Has collected 10+ items on Envato Market
  • Located in Europe
  • Sells items exclusively on Envato Market
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
  • Has been part of the Envato Community for over 4 years
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Located in 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
  • Has been part of the Envato Community for over 5 years
  • Has collected 10+ items on Envato Market
  • Located in Europe
  • Sells items exclusively on Envato Market
larswennerberg says

thanx

155 posts
  • Has been part of the Envato Community for over 4 years
  • Located in Canada
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
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 collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 5 years
  • Located in United States
  • Sells items exclusively on Envato Market
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