[Suggestion] Single SCSS file

24 views
Skip to first unread message

Rafael Sirotheau

unread,
Mar 27, 2017, 3:42:11 PM3/27/17
to IcoMoon
Hello guys!

I'm currently using icomoon with "generate sass variables" on, and it's generates two files. For organization reasons, I use only one file for the icon font. It would be great if Icomoon App would only generate one file, by using sass maps, unique-id and @each. It saves a lot of space for fonts with a lot of icons.

So, instead of

@import "variables";

It would be something like:

$icons: (
    arrow: "\e906",
    circle: "\e901"
);

and for the random string after ?
url('#{$icomoon-font-path}/icomoon.eot?th35f8')


I defined a $uid variable as follow
$uid: unique-id();

And
url('#{$icomoon-font-path}/icomoon.eot?#{$uid}')


Finally, for icon classes:
@each $icon, $char in $icons {
  .icon-#{$icon} {
    &:before {
      content: $char;
    }
  }
}


Reply all
Reply to author
Forward
0 new messages