Closed mhulse closed 11 years ago
Already thinking this might not be as easy as I thought it would be.
For example:
%natural-box {
&:before,
&:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
}
* {
@extend %natural-box;
}
... generates:
:before, :after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
This creates the output I want:
%natural-box {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
@mixin natural-box() {
&:before,
&:after { @extend %natural-box; }
}
* {
@extend %natural-box;
@include natural-box;
}
... and the output:
*, *:before, *:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
But the above just seems a little funky.
Going to shelve this idea for a post 2.0.0 version.
I've started a discussion here:
Shelving this idea for now.
Might be a nice way to extend. Put all classes in main css file. In other words, Rex is a lib the people can extend.