geddski / csstyle

MOVED TO https://github.com/csstyle/csstyle a modern approach for crafting beautifully maintainable stylesheets
http://csstyle.io
Other
850 stars 34 forks source link

Nested tweak and location #25

Closed jptredoux closed 9 years ago

jptredoux commented 10 years ago

Adds the ability to have tweak and location affect a nested component/part/option.

E.G. a tweak should override default button styles and should change based on location:

@include component(button) { border-radius: 0; background: red; @include tweak(rounded) { border-radius: 10px; } @include location(home) { background: blue; } }

result:

.button { border-radius: 0; background: red }

csstyle .button.+rounded {

border-radius: 10px }

csstyle .\@home .button {

background: blue }

geddski commented 9 years ago

@jptredoux I hadn't intended for tweaks or locations to be inside components. They already are more specific than any component/part/option. Maybe I don't understand your specific use case. Could you make a fiddle or codepen showing what you're trying to accomplish? Thanks!

geddski commented 9 years ago

closing for lack of replies. happy to continue conversation.