I am working to refactor a dependency on Compass mixins to simply use CSS rules which will be vendor prefixed by autoprefixer as a post process.
So I am going through a large code-base with the need to replace strings such as:
@include border-radius($big-radius);
With something like:
border-radius: $big-radius;
The IDE I am using is PhpStorm, which provides a find/replace regex feature. What should the regex for the case above look like? I'm sure I can adapt that for many other purposes as I continue working on this.
Search for:
@include (.*)\((.*)\);
Replace with:
$1: $2;
The (.*) parts creates groups. the $<number> reference those groups.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With