thesabbir / simple-line-icons

Simple and Minimal Line Icons
https://thesabbir.github.io/simple-line-icons
MIT License
1.86k stars 845 forks source link

add !default in scss variables #118

Closed garbinmarcelo closed 4 years ago

garbinmarcelo commented 4 years ago

Hi, ref. #116 What I did was:

  1. add comments like "//default" to the scripts/simple-line-icons.less file;
  2. In scripts/less2sass.js in the Less2Sass.prototype.convertVariables function I added .replace(/;\/\/default/g, ' !default;');
  3. I built the package.

Maybe someone can improve this code, but at the moment it works and supports the subscription of SCSS variables coming from an external file. Example: image

Without the !default in SCSS file the variable ends up not being able to be previously replaced. More about this in the documentation https://sass-lang.com/documentation/variables#default-values

garbinmarcelo commented 4 years ago

closed in favor of https://github.com/thesabbir/simple-line-icons/pull/117