2
0

_icons.scss 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. // The wagtail font isn't available in WOFF2, so a @font-face is set here without a mixin.
  2. @font-face {
  3. font-family: 'wagtail';
  4. src: url('#{$font-root}wagtail.woff') format('woff');
  5. font-weight: normal;
  6. font-style: normal;
  7. }
  8. .icon.teal {
  9. color: $color-teal;
  10. }
  11. .icon.white {
  12. color: #fff;
  13. }
  14. .icon:before,
  15. .icon:after,
  16. .hallotoolbar [class^='icon-'],
  17. .hallotoolbar [class*=' icon-']:before,
  18. .hallotoolbar [class^='icon-']:before {
  19. @include icon(); // from _mixins.scss
  20. }
  21. .icon:after,
  22. .hallotoolbar [class^='icon-']:after,
  23. .hallotoolbar [class^='icon-']:after {
  24. text-align: right;
  25. }
  26. .hallotoolbar [class^='icon-'],
  27. .hallotoolbar [class*=' icon-']:before,
  28. .hallotoolbar [class*=' icon-']:before,
  29. .hallotoolbar [class^='icon-']:before {
  30. vertical-align: -10%;
  31. margin-right: 0;
  32. }
  33. // =============================================================================
  34. // Icon factory methods
  35. // =============================================================================
  36. @each $icon, $content in $icons {
  37. .icon-#{$icon}:before {
  38. content: quote(#{$content});
  39. }
  40. }
  41. @each $icon, $content in $icons-after {
  42. .icon-#{$icon}:after {
  43. content: quote(#{$content});
  44. }
  45. }
  46. // =============================================================================
  47. // Custom config for various icons
  48. // =============================================================================
  49. .icon-download {
  50. // Credit: Icon made by Freepik from Flaticon.com
  51. }
  52. .icon-view:before,
  53. .icon-no-view:before {
  54. vertical-align: -3.5px;
  55. font-size: 1.1rem;
  56. }
  57. .icon-view:before {
  58. content: '4';
  59. }
  60. .icon-no-view:before {
  61. content: '^';
  62. }
  63. .icon-collapse-down:before {
  64. content: '5';
  65. }
  66. .icon-collapse-up:before {
  67. content: '6';
  68. }
  69. .icon-date:before {
  70. content: '7';
  71. }
  72. .icon-time:before {
  73. content: '8';
  74. }
  75. .icon-spinner:after,
  76. .icon-spinner:before {
  77. width: 1em;
  78. animation: spin 0.5s infinite linear;
  79. display: inline-block;
  80. // content: '1';
  81. }
  82. .icon-horizontalrule:before {
  83. font-family: Open Sans, Arial, sans-serif;
  84. }
  85. .icon-larger:before {
  86. font-size: 1.5em;
  87. }
  88. .icon.text-replace {
  89. font-size: 0;
  90. line-height: 0;
  91. overflow: hidden;
  92. &:before {
  93. margin-right: 0;
  94. font-size: 1rem;
  95. display: inline-block;
  96. width: 100%;
  97. line-height: 1.2em;
  98. text-align: center;
  99. vertical-align: middle;
  100. }
  101. }
  102. @keyframes spin {
  103. 0% {
  104. transform: rotate(0deg);
  105. }
  106. 100% {
  107. transform: rotate(360deg);
  108. }
  109. }
  110. .icon-spinner:after {
  111. display: inline-block;
  112. line-height: 1;
  113. }
  114. // CSS-only circled question mark.
  115. // <span class="icon-help-inverse" aria-hidden="true"></span>
  116. .icon-help-inverse {
  117. $size: 15px;
  118. &:before {
  119. content: '?';
  120. display: inline-block;
  121. width: $size;
  122. height: $size;
  123. line-height: $size;
  124. font-size: 1.1em;
  125. text-align: center;
  126. border-radius: 100%;
  127. color: $color-grey-2;
  128. border: 1px solid currentColor;
  129. }
  130. }