c6 icon indicating copy to clipboard operation
c6 copied to clipboard

@mixin support

Open c9s opened this issue 10 years ago • 0 comments

  • [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 @include directive
  • [ ] 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;
}

c9s avatar Apr 30 '15 05:04 c9s