-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Property names #1
Comments
yes, I agree we should clean up pat-upload and bring it inline with Patternslib conventions. |
Just my 2c: It seems to me like the camel case convention has the advantage that you can use the same name everywhere, in CSS and in JavaScript. Names with dashes can not be used in JavaScript (or in Python for that matter), so you have to have different names, e.g. my-name in properties, my_name in JavaScript. |
@fulv I wasn't there when the convention was chosen, however, the Patternslib convention came first. Deciding later to then choose a different convention for Mockup was therefore IMO irresponsible. If we wanted to move to a different convention for Patternslib, we would have to change all the existing patterns. |
Fine, I'm not trying to subvert. On the other hand, names with underscores instead of dashes work everywhere, too, and almost look the same. ;) |
Hi Fulvio, It's true what you say about the underscores. One of the goals of Patternslib is to make a library that is designer friendly. One way of achieving that by making the optics of the syntax similar to something designers are familiar with: CSS. In CSS only dashes are used as a space replacement. Also dashes are sometimes considered 'prettier' than underscores and pretty helps to get designers on you side :).
|
That's also true :)
|
Hi @cornae, |
@jcbrand, The naming convention for Patterns properties is to replace space by dashes, instead of camel casing and to avoid boolean properties, as they are less declarative and not matching a CSS style syntax. For the boolean part a little bit more thinking from both our sides would be required, but could you change the mapping already for the current properties to dashed style?
The text was updated successfully, but these errors were encountered: