The latest simply_helpful generates dom id''s using underscores. It seems to me that the RoR community is unofficialing standardizing on that format. <p id="admin_user"> Most CSS designers use camelCase. It seems that there are some compatibility issues with using underscores. 1. Why doesn''t RoR follow the standard and use camelCase? 2. What are the exact problems with using underscores? Is it worth it? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Robert James wrote:> 1. Why doesn''t RoR follow the standard and use camelCase?Because you can usually improve Ruby''s readability by pushing statements closer to grammatically-correct English. The success of ActiveRecord _despite_ twiddling the plurality of table names demonstrates this effect. An underbar among lower-case letters is slightly closer to English than camelCase... And it''s not a ''standard'' - everything supports _ these days.> 2. What are the exact problems with using underscores? Is it worth it?CSS designers probably inherited camelCase from Java. ''nuff said. ;-) -- Phlip --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Robert James wrote:> Most CSS designers use camelCase. It seems that there are some > compatibility issues with using underscores. > > 1. Why doesn''t RoR follow the standard and use camelCase?Where did you get that camelCase is some kind of standard? Of all the CSS books I have in my shelf (there are plenty of them, ranging from B(udd) to Z(eldman)), only CSS Mastery uses camelcase in some places, and even it doesn''t use it consistently. Most seem to favour using dashes.> 2. What are the exact problems with using underscores? Is it worth it?Netscape before 4.79 and Opera versions 5 and below didn''t support it (see[1]). Since they are very old (I haven''t had a single request from either during the whole year on my site), I don''t see any reason to avoid it. //jarkko [1] http://www.nic.fi/~tapio1/Teaching/Models/Model6.html -- Jarkko Laine http://jlaine.net http://dotherightthing.com http://www.railsecommerce.com http://odesign.fi --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, On 12-Dec-06, at 11:59 AM, Robert James wrote:> > The latest simply_helpful generates dom id''s using underscores. It > seems to me that the RoR community is unofficialing standardizing on > that format. > > <p id="admin_user"> > > Most CSS designers use camelCase. It seems that there are some > compatibility issues with using underscores. > > 1. Why doesn''t RoR follow the standard and use camelCase?Camel case isn''t a standard I think. It works but, if there''s a ''standard'' at all, and I''m not saying there is, it''d be using ''-'' so ''admin-user'' rather than ''admin_user''.> 2. What are the exact problems with using underscores? Is it worth > it?It is illegal in CSS1, and was illegal in CSS2 until an errata was published circa 2001. Before the errata, you had to escape underscores, like ''admin\_user'' and many browsers screwed that up (probably still do). This is for both class names and ids by the way. Cheers, Bob> > -- > Posted via http://www.ruby-forum.com/. > > >---- Bob Hutchison -- blogs at <http://www.recursive.ca/ hutch/> Recursive Design Inc. -- <http://www.recursive.ca/> Raconteur -- <http://www.raconteur.info/> xampl for Ruby -- <http://rubyforge.org/projects/xampl/> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---