No benefit other than I prefer the aesthetics of dash-case for ids :) On Friday, February 20, 2015 at 6:17:55 PM UTC-8, Peter Wong wrote: > > I wonder what the benefits of dash-casing ids would be, as there's nothing > stopping you from writing a camelCase id like <div id="myContainer">... > right? > Maybe I'm missing something... :) > > > On Friday, February 20, 2015 at 7:53:00 PM UTC-6, Michael Bleigh wrote: >> >> I think you're right. The dash-to-camel convention only landed a couple >> days ago, so it's probably an oversight. >> https://github.com/Polymer/polymer/commit/68f5ad4bfd34797c1ad90a7133304f76923ac451 >> >> Can I just say for the record that I am *extremely thrilled about >> dash-case attributes*!!! It felt really awful doing camelcase in attributes >> (esp. since HTML spec says atts are case-insensitive). >> >> One other add-on question: can we do dash-case ids as well? So <div >> id="my-container"> ends up as $.myContainer? (Assuming the $ convention is >> still around in 0.8) >> >> On Friday, February 20, 2015 at 5:48:48 PM UTC-8, Artem Khodyush wrote: >>> >>> Hi >>> >>> I was reading through 0.8 PRIMER.md and I encountered these two >>> statements: >>> >>> At >>> https://github.com/Polymer/polymer/blob/0.8-preview/PRIMER.md#attribute-deserialization >>> >>> it says: >>> >>> If an attribute matches a property listed in the published object, the >>>> attribute value will be assigned to a property of the same name on the >>>> element instance >>> >>> >>> Then later, at the end of >>> https://github.com/Polymer/polymer/blob/0.8-preview/PRIMER.md#basic-property-binding >>> >>> it says: >>> >>> In order to bind to camel-case properties of elements, dash-case should >>>> be used in the attribute name. Example: >>>> <user-view first-name="{{managerName}}"></user-view> >>>> <!-- will set <user-view>.firstName = this.managerName; --> >>> >>> >>> Is this dash-to-camel-case conversion applies uniformly to all >>> assignments to published properties in the element tag? If so, then the >>> first statement should not say "property of the same name", right? >>> >>> Or does it mean that <user-view first-name="John"> and <user-view >>> first-name="{{managerName}}"> are somehow different in this regard? >>> >>> Thanks, >>> Artem >>> >>
Follow Polymer on Google+: plus.google.com/107187849809354688692 --- You received this message because you are subscribed to the Google Groups "Polymer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/8ae8a21e-324e-4f2b-9439-5b41e3d32e6e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
