suitcss / suit

Style tools for UI components
http://suitcss.github.io/
3.8k stars 229 forks source link

State namespace collisions? #119

Closed oleersoy closed 9 years ago

oleersoy commented 9 years ago

From the naming conventions on SUIT CSS's Homepage

.MyComponent.is-animating {}
.YourComponent.is-animating {}

These selectors select (IIUC):

<div class="MyComponent is-animating">
<div class="YourComponent is-animating">

The classes would be written like this:

.MyComponent {
...
}
.YourComponent {
...
}

/** is-animating for MyComponent*/
.is-animating{
...
}

/** is-animating for YourComponent*/
.is-animating {
...
}

Am I missing something?

simonsmith commented 9 years ago

Not sure I see the problem

Why not just write them as per the docs?

.MyComponent.is-animating {}
.YourComponent.is-animating {}

Never style these classes directly; they should always be used as an adjoining class.

oleersoy commented 9 years ago

OK - hehe - Doh - Got it :). Thanks - I'll close this one.