c6
c6 copied to clipboard
@mixin support
- [x] ParseMixinStatement
- [x] ParseMixinName
- [x] ParseMixinArguments
- [x] Variable Arguments
- [ ] Register mixin symbol table to global context for look up.
- [ ] Reduce expressions with constant value
- [ ] Build mixin argument prototype in two format: (key: value) and argument list.
- [ ] Mixin Invoker used in
@includedirective - [ ] Keyword Arguments
- [ ] Shorthand Syntax
+,=support.
Test Case:
@mixin sexy-border($color, $width) {
border: {
color: $color;
width: $width;
style: dashed;
}
}
Test Case 2:
@mixin sexy-border($color, $width: 1in) {
border: {
color: $color;
width: $width;
style: dashed;
}
}
p { @include sexy-border(blue); }
h1 { @include sexy-border(blue, 2in); }
Test Case 3:
@mixin border-radius($radius) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
-ms-border-radius: $radius;
border-radius: $radius;
}