2022-02-04 11:57:55 +00:00
|
|
|
@use 'sass:string';
|
2021-12-23 04:21:23 +00:00
|
|
|
|
2019-01-01 23:11:47 +00:00
|
|
|
@font-face {
|
2022-07-09 06:32:51 +00:00
|
|
|
font-family: $font-wagtail-icons;
|
2022-02-04 11:57:55 +00:00
|
|
|
src: url('../fonts/wagtail.woff') format('woff');
|
|
|
|
font-weight: normal;
|
|
|
|
font-style: normal;
|
2019-01-01 23:11:47 +00:00
|
|
|
}
|
2016-02-15 09:31:07 +00:00
|
|
|
|
2018-04-11 08:35:03 +00:00
|
|
|
// 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 {
|
2022-02-04 11:57:55 +00:00
|
|
|
fill: currentColor;
|
2018-04-11 08:35:03 +00:00
|
|
|
}
|
|
|
|
|
2015-09-25 13:17:39 +00:00
|
|
|
.icon.teal {
|
2022-07-09 06:32:51 +00:00
|
|
|
color: $color-teal-darker;
|
2014-01-24 17:34:26 +00:00
|
|
|
}
|
2015-11-03 12:15:33 +00:00
|
|
|
|
2015-09-25 13:17:39 +00:00
|
|
|
.icon.white {
|
2022-07-09 06:32:51 +00:00
|
|
|
color: $color-white;
|
2014-01-24 17:34:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.icon:before,
|
2022-01-30 10:26:20 +00:00
|
|
|
.icon:after {
|
2022-02-04 11:57:55 +00:00
|
|
|
@include icon(); // from _mixins.scss
|
2014-01-24 17:34:26 +00:00
|
|
|
}
|
2015-11-03 12:15:33 +00:00
|
|
|
|
2022-01-30 10:26:20 +00:00
|
|
|
.icon:after {
|
2022-03-15 13:21:06 +00:00
|
|
|
text-align: end;
|
2014-01-24 17:34:26 +00:00
|
|
|
}
|
|
|
|
|
2016-02-15 09:31:07 +00:00
|
|
|
// =============================================================================
|
|
|
|
// Icon factory methods
|
|
|
|
// =============================================================================
|
2015-11-03 12:15:33 +00:00
|
|
|
|
2016-02-15 09:31:07 +00:00
|
|
|
@each $icon, $content in $icons {
|
2022-02-04 11:57:55 +00:00
|
|
|
.icon-#{$icon}:before {
|
|
|
|
content: string.quote(#{$content});
|
|
|
|
}
|
2014-01-24 17:34:26 +00:00
|
|
|
}
|
2015-11-03 12:15:33 +00:00
|
|
|
|
2016-02-15 09:31:07 +00:00
|
|
|
@each $icon, $content in $icons-after {
|
2022-02-04 11:57:55 +00:00
|
|
|
.icon-#{$icon}:after {
|
|
|
|
content: string.quote(#{$content});
|
|
|
|
}
|
2014-02-05 11:12:18 +00:00
|
|
|
}
|
2015-11-03 12:15:33 +00:00
|
|
|
|
2016-02-15 09:31:07 +00:00
|
|
|
// =============================================================================
|
|
|
|
// Custom config for various icons
|
|
|
|
// =============================================================================
|
|
|
|
.icon-download {
|
2022-02-04 11:57:55 +00:00
|
|
|
// Credit: Icon made by Freepik from Flaticon.com
|
2014-03-07 15:41:17 +00:00
|
|
|
}
|
2015-11-03 12:15:33 +00:00
|
|
|
|
2014-09-16 15:50:36 +00:00
|
|
|
.icon-view:before,
|
2022-02-04 11:57:55 +00:00
|
|
|
.icon-no-view:before {
|
|
|
|
// icon-font
|
|
|
|
vertical-align: -3.5px;
|
|
|
|
font-size: 1.1rem;
|
2014-06-19 15:58:48 +00:00
|
|
|
}
|
2015-11-03 12:15:33 +00:00
|
|
|
|
2016-02-15 09:31:07 +00:00
|
|
|
.icon-spinner:after,
|
2022-02-04 11:57:55 +00:00
|
|
|
.icon-spinner:before {
|
|
|
|
// iconfont
|
|
|
|
width: 1em;
|
|
|
|
animation: spin-wag 0.5s infinite linear;
|
|
|
|
display: inline-block;
|
2015-02-05 15:42:52 +00:00
|
|
|
}
|
2015-11-03 12:15:33 +00:00
|
|
|
|
2022-07-25 14:20:19 +00:00
|
|
|
// For SVG icons, add spinner styles onto the use element,
|
|
|
|
// so an icon can be turned into a spinner by changing the href only.
|
|
|
|
// This allows us to switch any icon to a spinner with much less boilerplate.
|
|
|
|
use[href='#icon-spinner'] {
|
2022-02-04 11:57:55 +00:00
|
|
|
animation: spin-wag 0.5s infinite linear;
|
2022-07-25 14:20:19 +00:00
|
|
|
transform-origin: center;
|
2020-06-15 11:31:05 +00:00
|
|
|
}
|
|
|
|
|
2016-02-15 09:31:07 +00:00
|
|
|
.icon-horizontalrule:before {
|
2022-02-04 11:57:55 +00:00
|
|
|
font-family: $font-sans;
|
2015-02-05 15:42:52 +00:00
|
|
|
}
|
2015-11-03 12:15:33 +00:00
|
|
|
|
2015-09-25 13:17:39 +00:00
|
|
|
.icon-larger:before {
|
2022-02-04 11:57:55 +00:00
|
|
|
font-size: 1.5em;
|
2015-02-13 10:38:40 +00:00
|
|
|
}
|
2014-06-19 15:58:48 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
.icon.text-replace {
|
|
|
|
// iconfont
|
|
|
|
font-size: 0;
|
|
|
|
line-height: 0;
|
|
|
|
overflow: hidden;
|
2014-04-02 15:48:26 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
&:before {
|
2022-03-15 13:21:06 +00:00
|
|
|
margin-inline-end: 0;
|
2022-02-04 11:57:55 +00:00
|
|
|
font-size: 1rem;
|
|
|
|
display: inline-block;
|
|
|
|
width: 100%;
|
|
|
|
line-height: 1.2em;
|
|
|
|
text-align: center;
|
|
|
|
vertical-align: middle;
|
|
|
|
}
|
2014-03-07 12:27:34 +00:00
|
|
|
}
|
|
|
|
|
2020-06-15 10:06:29 +00:00
|
|
|
.text-replace {
|
2022-02-04 11:57:55 +00:00
|
|
|
font-size: 0;
|
|
|
|
line-height: 0;
|
|
|
|
overflow: hidden;
|
2020-06-15 10:06:29 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
.icon {
|
|
|
|
@include svg-icon(1rem, middle);
|
|
|
|
}
|
2020-06-15 10:06:29 +00:00
|
|
|
}
|
|
|
|
|
2021-06-29 19:30:42 +00:00
|
|
|
@keyframes spin-wag {
|
2022-02-04 11:57:55 +00:00
|
|
|
0% {
|
|
|
|
transform: rotate(0deg);
|
|
|
|
}
|
2015-11-03 12:15:33 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
100% {
|
|
|
|
transform: rotate(360deg);
|
|
|
|
}
|
2014-03-07 12:27:34 +00:00
|
|
|
}
|
2015-11-19 06:05:57 +00:00
|
|
|
|
|
|
|
.icon-spinner:after {
|
2022-02-04 11:57:55 +00:00
|
|
|
display: inline-block;
|
|
|
|
line-height: 1;
|
2015-11-19 06:05:57 +00:00
|
|
|
}
|
2018-02-14 08:09:54 +00:00
|
|
|
|
2021-12-23 02:42:22 +00:00
|
|
|
// stylelint-disable-next-line no-duplicate-selectors
|
2020-06-09 10:28:18 +00:00
|
|
|
.icon {
|
2022-02-04 11:57:55 +00:00
|
|
|
&.initial {
|
|
|
|
@include svg-icon(1em);
|
|
|
|
vertical-align: initial;
|
|
|
|
}
|
2020-06-09 10:28:18 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
&.default {
|
|
|
|
@include svg-icon(1.5em);
|
|
|
|
}
|
2020-06-15 15:13:08 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
&--flipped {
|
|
|
|
transform: scaleX(-1);
|
|
|
|
}
|
2020-06-09 10:28:18 +00:00
|
|
|
}
|
2020-06-15 15:13:08 +00:00
|
|
|
|
2020-07-22 14:46:55 +00:00
|
|
|
.icon.locale-error {
|
2022-02-04 11:57:55 +00:00
|
|
|
vertical-align: text-top;
|
2022-03-15 13:21:06 +00:00
|
|
|
margin-inline-end: 0.5em;
|
2022-02-04 11:57:55 +00:00
|
|
|
width: 1.5em;
|
|
|
|
height: 1.5em;
|
2022-07-09 06:32:51 +00:00
|
|
|
color: theme('colors.critical.200');
|
2020-07-22 14:46:55 +00:00
|
|
|
}
|