iconfont.scss 1.7 KB

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