123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187 |
- // The wagtail font isn't available in WOFF2, so a @font-face is set here without a mixin.
- @font-face {
- font-family: 'wagtail';
- src: url('#{$font-root}wagtail.woff') format('woff');
- font-weight: normal;
- font-style: normal;
- }
- // Set SVG icons to use the current text color in the location they appear as
- // their default fill color. Can be overridden for a specific icon by either
- // the color or fill properties.
- .icon {
- fill: currentColor;
- }
- .icon.teal {
- color: $color-teal;
- }
- .icon.white {
- color: #fff;
- }
- .icon:before,
- .icon:after,
- .hallotoolbar [class^='icon-'],
- .hallotoolbar [class*=' icon-']:before,
- .hallotoolbar [class^='icon-']:before {
- @include icon(); // from _mixins.scss
- }
- .icon:after,
- .hallotoolbar [class^='icon-']:after,
- .hallotoolbar [class^='icon-']:after {
- text-align: right;
- }
- .hallotoolbar [class^='icon-'],
- .hallotoolbar [class*=' icon-']:before,
- .hallotoolbar [class*=' icon-']:before,
- .hallotoolbar [class^='icon-']:before {
- vertical-align: -10%;
- margin-right: 0;
- }
- // =============================================================================
- // Icon factory methods
- // =============================================================================
- @each $icon, $content in $icons {
- .icon-#{$icon}:before {
- content: quote(#{$content});
- }
- }
- @each $icon, $content in $icons-after {
- .icon-#{$icon}:after {
- content: quote(#{$content});
- }
- }
- // =============================================================================
- // Custom config for various icons
- // =============================================================================
- .icon-download {
- // Credit: Icon made by Freepik from Flaticon.com
- }
- .icon-view:before,
- .icon-no-view:before { // icon-font
- vertical-align: -3.5px;
- font-size: 1.1rem;
- }
- .icon-spinner:after,
- .icon-spinner:before { // iconfont
- width: 1em;
- animation: spin-wag 0.5s infinite linear;
- display: inline-block;
- }
- svg.icon-spinner { // TODO: leave only class when iconfont styles are removed
- animation: spin-wag 0.5s infinite linear;
- }
- .icon-horizontalrule:before {
- font-family: Open Sans, Arial, sans-serif;
- }
- .icon-larger:before {
- font-size: 1.5em;
- }
- .icon.text-replace { // iconfont
- font-size: 0;
- line-height: 0;
- overflow: hidden;
- &:before {
- margin-right: 0;
- font-size: 1rem;
- display: inline-block;
- width: 100%;
- line-height: 1.2em;
- text-align: center;
- vertical-align: middle;
- }
- }
- .text-replace {
- font-size: 0;
- line-height: 0;
- overflow: hidden;
- .icon {
- @include svg-icon(1rem, middle);
- }
- }
- @keyframes spin-wag {
- 0% {
- transform: rotate(0deg);
- }
- 100% {
- transform: rotate(360deg);
- }
- }
- .icon-spinner:after {
- display: inline-block;
- line-height: 1;
- }
- // CSS-only circled question mark.
- // <span class="icon-help-inverse" aria-hidden="true"></span>
- .icon-help-inverse {
- $size: 15px;
- &:before {
- display: inline-block;
- width: $size;
- height: $size;
- line-height: $size;
- font-size: 1.1em;
- text-align: center;
- border-radius: 100%;
- color: $color-grey-2;
- border: 1px solid currentColor;
- }
- }
- .icon {
- &.initial {
- @include svg-icon(1em);
- vertical-align: initial;
- }
- &.default {
- @include svg-icon(1.5em);
- }
- &--flipped {
- transform: scaleX(-1);
- }
- }
- .icon.locale-error {
- vertical-align: text-top;
- margin-right: 0.5em;
- width: 1.5em;
- height: 1.5em;
- color: $color-red;
- }
- // Media for Windows High Contrast mode
- @media (forced-colors: $media-forced-colours) {
- .icon {
- fill: $system-color-link-text;
- }
- }
|