iconfont.scss 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*!
  2. * Tabler Icons <%= v %> by tabler - https://tabler.io
  3. * License - https://github.com/tabler/tabler-icons/blob/master/LICENSE
  4. */
  5. $ti-font-family: '<%= fileName %>' !default;
  6. $ti-font-path: './fonts' !default;
  7. $ti-font-display: null !default;
  8. $ti-prefix: 'ti' !default;
  9. @font-face {
  10. font-family: $ti-font-family;
  11. font-style: normal;
  12. font-weight: 400;
  13. font-display: $ti-font-display;
  14. src: url('#{$ti-font-path}/<%= fileName %>.eot?v<%= v %>');
  15. src: url('#{$ti-font-path}/<%= fileName %>.eot?#iefix-v<%= v %>') format('embedded-opentype'),
  16. url('#{$ti-font-path}/<%= fileName %>.woff2?v<%= v %>') format('woff2'),
  17. url('#{$ti-font-path}/<%= fileName %>.woff?') format('woff'),
  18. url('#{$ti-font-path}/<%= fileName %>.ttf?v<%= v %>') format('truetype');
  19. }
  20. .#{$ti-prefix} {
  21. font-family: $ti-font-family !important;
  22. speak: none;
  23. font-style: normal;
  24. font-weight: normal;
  25. font-variant: normal;
  26. text-transform: none;
  27. line-height: 1;
  28. /* Better Font Rendering */
  29. -webkit-font-smoothing: antialiased;
  30. -moz-osx-font-smoothing: grayscale;
  31. }
  32. @function unicode($str) {
  33. @return unquote("\"")+unquote(str-insert($str, "\\", 1))+unquote("\"")
  34. }
  35. <% glyphs.forEach(function(glyph) { %>
  36. $ti-icon-<%= glyph.name %>: unicode('<%= glyph.unicode[0].codePointAt(0).toString(16) %>');<% }); %>
  37. <% glyphs.forEach(function(glyph) { %>
  38. .#{$ti-prefix}-<%= glyph.name %>:before { content: $ti-icon-<%= glyph.name %>; }<% }); %>