Skip to content

Instantly share code, notes, and snippets.

@douglasdeodato
Created January 30, 2017 15:46
Show Gist options
  • Select an option

  • Save douglasdeodato/ed61157bddf85dde0ac972590f7862d8 to your computer and use it in GitHub Desktop.

Select an option

Save douglasdeodato/ed61157bddf85dde0ac972590f7862d8 to your computer and use it in GitHub Desktop.

Revisions

  1. douglasdeodato created this gist Jan 30, 2017.
    45 changes: 45 additions & 0 deletions SassMeister-input.scss
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,45 @@
    // ----
    // Sass (v3.4.21)
    // Compass (v1.0.3)
    // ----

    $silver :silver;
    $yellow: yellow;
    $green: green;


    @function palette($palette-name, $shade: 'base', $palette: $main-palette) {
    @return map-get(map-get($palette, $palette-name), $shade);
    }

    $main-palette: (
    grey: (
    light : #000fff,
    base : $silver,
    dark : #00eeee,
    ),
    green: (
    base : $green,
    ),
    );

    $data-palette: (
    yellow: (
    light : #004444,
    base : $yellow,
    ),
    );

    .class2 {
    background: palette(grey, light);
    }


    .class-dark {
    background: palette(green);
    }

    .class33 {
    background: palette(yellow, light, $data-palette);

    }
    11 changes: 11 additions & 0 deletions SassMeister-output.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    .class2 {
    background: #000fff;
    }

    .class-dark {
    background: green;
    }

    .class33 {
    background: #004444;
    }