amcss / attribute-module-specification

The Attribute-Module CSS (AMCSS) Specification
MIT License
393 stars 8 forks source link

Camel casing? #3

Closed geelen closed 10 years ago

geelen commented 10 years ago

I think https://github.com/suitcss/suit/blob/master/doc/naming-conventions.md is a pretty good starting point for names, so I've gone with (using am- as our prefix)

<tag am-traitName='value two three'>
<tag am-ModuleName>
<tag am-ModuleName="variant-name">
<tag am-ModuleName-ElementName>
<tag am-ModuleName-ElementName="variant-name">

thoughts? We could also do am-ModuleName-elementName or am-ModuleName__ElementName, or potentially even the much more BEM-y am-module-name__element-name, but I think it looks arse.

benschwarz commented 10 years ago

Its worth having a read of https://github.com/suitcss/suit/issues/80#issuecomment-46094932 to get a bit of perspective for why suit does what it does.

<tag am-CamelCase>
<tag am-CamelCase-ElementName>

Looks good to me. I don't think that sub elements should often have variants… but otherwise, I think syntactically we're borrowing the right things from BEM, then suit.

geelen commented 10 years ago

Good thing to remember is that attribute values (like class names) are case sensitive but atrribute names are not

On Saturday, August 23, 2014, Ben Schwarz notifications@github.com wrote:

Its worth having a read of suitcss/suit#80 (comment) https://github.com/suitcss/suit/issues/80#issuecomment-46094932 to get a bit of perspective for why suit does what it does.

Looks good to me. I don't think that sub elements should often have variants… but otherwise, I think syntactically we're borrowing the right things from BEM, then suit. — Reply to this email directly or view it on GitHub https://github.com/amcss/attribute-module-specification/issues/3#issuecomment-53116796 .
benschwarz commented 10 years ago

I’d not really considered that since we started talking about am-, but I think it’ll be ok none the less.

On Fri, Aug 22, 2014 at 3:42 PM, Glen Maddern notifications@github.com wrote:

Good thing to remember is that attribute values (like class names) are case sensitive but atrribute names are not On Saturday, August 23, 2014, Ben Schwarz notifications@github.com wrote:

Its worth having a read of suitcss/suit#80 (comment) https://github.com/suitcss/suit/issues/80#issuecomment-46094932 to get a bit of perspective for why suit does what it does.

Looks good to me. I don't think that sub elements should often have variants… but otherwise, I think syntactically we're borrowing the right things from BEM, then suit. — Reply to this email directly or view it on GitHub https://github.com/amcss/attribute-module-specification/issues/3#issuecomment-53116796 . --- Reply to this email directly or view it on GitHub: https://github.com/amcss/attribute-module-specification/issues/3#issuecomment-53130513
geelen commented 10 years ago

Yeah, one of the benefits of Nicolas' approach is not clashing with existing lower-case classes. We don't have that problem, so case sensitivity isn't a big deal, and am-ModuleName-Descendent just looks better, even though technically there's a small risk of clashes. But I think we're good.