Skip to content

Instantly share code, notes, and snippets.

@hdodov
Created January 16, 2018 07:42

Revisions

  1. hdodov revised this gist Jan 16, 2018. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions mixin-to-rule.scss
    Original file line number Diff line number Diff line change
    @@ -4,14 +4,14 @@
    // Replace:
    $1: $2;

    ---
    // ----------------------------------

    Transforms this:
    // Transforms this:
    @include display(flex);
    @include transform(translateY(-50%));
    @include transition(all 0.3s ease);

    Into this:
    // Into this:
    display: flex;
    transform: translateY(-50%);
    transition: all 0.3s ease;
  2. hdodov created this gist Jan 16, 2018.
    17 changes: 17 additions & 0 deletions mixin-to-rule.scss
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    // Find (add properties as needed):
    @include\s*(animation|appearance|transform|transition|display|align-items|justify-content|flex-flow|flex|backface-visibility|user-select)\(([^;]+)\);

    // Replace:
    $1: $2;

    ---

    Transforms this:
    @include display(flex);
    @include transform(translateY(-50%));
    @include transition(all 0.3s ease);

    Into this:
    display: flex;
    transform: translateY(-50%);
    transition: all 0.3s ease;