Skip to content

Instantly share code, notes, and snippets.

Created Oct 8, 2013
Embed
What would you like to do?
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>.
@bwaidelich
Copy link

bwaidelich commented Oct 8, 2013

Image.cssClassSelector = 'foo bar'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment