Skip to content

Instantly share code, notes, and snippets.

@hdodov
Created January 16, 2018 07:42
Show Gist options
  • Save hdodov/a7061c852beae3e2f550f782e8679950 to your computer and use it in GitHub Desktop.
Save hdodov/a7061c852beae3e2f550f782e8679950 to your computer and use it in GitHub Desktop.
Regex to convert all SCSS mixins to simple CSS rules for transitioning from Bourbon to Autoprefixer.
// 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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment