regular.scss 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*!
  2. * Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com
  3. * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
  4. * Copyright 2025 Fonticons, Inc.
  5. */
  6. @use "sass:string";
  7. @use 'variables' as v;
  8. @use 'mixins' as m;
  9. :root, :host {
  10. --#{v.$css-prefix}-family-classic: '#{ v.$family }';
  11. --#{v.$css-prefix}-font-regular: normal 400 1em/1 var(--#{v.$css-prefix}-family-classic);
  12. /* deprecated: this older custom property will be removed next major release */
  13. --#{v.$css-prefix}-style-family-classic: var(--#{v.$css-prefix}-family-classic);
  14. }
  15. @font-face {
  16. font-family: 'Font Awesome 7 Free';
  17. font-style: normal;
  18. font-weight: 400;
  19. font-display: v.$font-display;
  20. src: url('#{v.$font-path}/fa-regular-400.woff2');
  21. }
  22. .far {
  23. --#{v.$css-prefix}-family: var(--#{v.$css-prefix}-family-classic);
  24. --#{v.$css-prefix}-style: 400;
  25. }
  26. .#{v.$css-prefix}-classic {
  27. --#{v.$css-prefix}-family: var(--#{v.$css-prefix}-family-classic);
  28. }
  29. .#{v.$css-prefix}-regular {
  30. --#{v.$css-prefix}-style: 400;
  31. }
  32. // convenience mixin for declaring pseudo-elements by CSS variable,
  33. // including all style-specific font properties and ::before elements.
  34. @mixin icon($var) {
  35. @include m.fa-icon(Font Awesome 7 Free);
  36. @extend .#{v.$css-prefix}-regular;
  37. @extend .#{v.$css-prefix}-classic;
  38. &::before {
  39. content: string.unquote("\"#{ $var }\"");
  40. }
  41. }