Sha256: 09c611e2912ab6e5313a1703821b962d7132d34ad95cbd92b576c7d062938663

Contents?: true

Size: 1.22 KB

Versions: 24

Compression:

Stored size: 1.22 KB

Contents

## Implementation Comparisons

Below we go head to head with other implementations.

### Variables

SCSS:

     $main-color: #006;
     color: $main-color;

Less:

     @main-color: #006;
     color: @main-color;

Stylus:

     main-color = #006
     color main-color

### Mixins

SCSS:

     @mixin pad($x, $y) {
       padding: $y $x;
     }
   
     .msg {
       @include pad(5px, 10px);
     }

Less:

      .pad(@x, @y) {
        padding: @y @x;
      }
    
      .msg {
        .pad(5px, 10px);
      }

Stylus:

      pad(x, y)
        padding y x

      .msg
        pad(5px, 10px)

### Larger Example

Less:

    .box-shadow (@x: 0, @y: 0, @blur: 1px, @alpha) {
      @val: @x @y @blur rgba(0, 0, 0, @alpha);
      box-shadow:         @val;
      -webkit-box-shadow: @val;
      -moz-box-shadow:    @val;
    }
    .box {
      @base: #f938ab;
      color:        saturate(@base, 5%);
      border-color: lighten(@base, 30%);
      div { .box-shadow(0, 0, 5px, 0.4) }
    }

Stylus:

    box-shadow()
      -webkit-box-shadow arguments
      -moz-box-shadow arguments
      box-shadow arguments

    .box
      base = #f938ab
      color saturate(base, 5%)
      border-color lighten(base, 30%)
      div
        box-shadow 0 0 5px 0.4

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
stylus-source-0.23.0 vendor/docs/compare.md
stylus-source-0.22.6 vendor/docs/compare.md
stylus-source-0.22.5 vendor/docs/compare.md
stylus-source-0.22.4 vendor/docs/compare.md
stylus-source-0.22.3 vendor/docs/compare.md
stylus-source-0.22.2 vendor/docs/compare.md
stylus-source-0.22.1 vendor/docs/compare.md
stylus-source-0.22.0 vendor/docs/compare.md
stylus-source-0.21.2 vendor/docs/compare.md
stylus-source-0.21.1 vendor/docs/compare.md
stylus-source-0.21.0 vendor/docs/compare.md
stylus-source-0.20.1 vendor/docs/compare.md
stylus-source-0.20.0 vendor/docs/compare.md
stylus-source-0.19.8 vendor/docs/compare.md
stylus-source-0.19.7 vendor/docs/compare.md
stylus-source-0.19.6 vendor/docs/compare.md
stylus-source-0.19.5 vendor/docs/compare.md
stylus-source-0.19.4 vendor/docs/compare.md
stylus-source-0.19.3 vendor/docs/compare.md
stylus-source-0.19.2 vendor/docs/compare.md