Created
October 8, 2013 05:07
-
-
Save anonymous/6879748 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After thinking through it again, I think we have the following options: | |
* class | |
* classes | |
* className | |
* classNames | |
* cssClass | |
* cssClasses | |
* elementClass | |
* elementClasses | |
I would use the *singular* form here, as we expect a *string* and not an array currently. | |
This way, we could use the *plural form* later in a non-breaking manner. This leaves us with: | |
* class -> very generic, to be confused with @class from TypoScript | |
* className | |
* cssClass | |
* elementClass | |
For the "image" object, we add the class directly to the <image> tag, not to the <figure> | |
surrounding it. so we might add "imageClass" / "imgClass" / "imageClassName" / "imgClassName" to the list in that case? | |
* imageClass | |
Image { | |
className = 'my-image-class' | |
} | |
Image { | |
cssClass = 'my-image-class' | |
} | |
Image { | |
elementClass = 'my-image-class' | |
} | |
Image { | |
imageClass = 'my-image-class' | |
} | |
Image { | |
imgClass = 'my-image-class' | |
} | |
Image { | |
imageClassName = 'my-image-class' | |
} | |
Image { | |
imgClassName = 'my-image-class' | |
} | |
MultiColumn { | |
className = 'fooo' | |
} | |
MultiColumn { | |
cssClass = 'foo' | |
} | |
MultiColumn { | |
elementClass = 'foo' | |
} | |
Some more (unsorted) arguments: | |
* ember uses "elementId" to set the ID property of an element | |
* Backbone uses "className", same as Ember.JS | |
After looking through that list, I'm tending towards "className" for the general CSS classes, | |
and then it must be either "imageClassName" or "imgClassName" for the class applied to <img>. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Image.cssClassSelector = 'foo bar'