summaryrefslogtreecommitdiffstats
path: root/core/css/icons.scss
blob: 710dd6b0287b72c4bce6d5810fdafe3f75ad3056 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/**
 * @copyright Copyright (c) 2018, John Molakvoæ (skjnldsv@protonmail.com)
 *
 * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
 * @author Joas Schilling <coding@schilljs.com>
 * @author Lukas Reschke <lukas@statuscode.ch>
 * @author Roeland Jago Douma <roeland@famdouma.nl>
 * @author Vincent Chan <plus.vincchan@gmail.com>
 * @author Thomas Müller <thomas.mueller@tmit.eu>
 * @author Hendrik Leppelsack <hendrik@leppelsack.de>
 * @author Jan-Christoph Borchardt <hey@jancborchardt.net>
 *
 * @license GNU AGPL version 3 or any later version
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
@use 'variables';
@import 'functions';

/* GLOBAL ------------------------------------------------------------------- */
[class^='icon-'], [class*=' icon-'] {
	background-repeat: no-repeat;
	background-position: center;
	min-width: 16px;
	min-height: 16px;
}

.icon-breadcrumb {
	background-image: url('../img/breadcrumb.svg?v=1');
}

/* LOADING ------------------------------------------------------------------ */
.loading,
.loading-small,
.icon-loading,
.icon-loading-dark,
.icon-loading-small,
.icon-loading-small-dark {
	position: relative;
	&:after {
		z-index: 2;
		content: '';
		height: 28px;
		width: 28px;
		margin: -16px 0 0 -16px;
		position: absolute;
		top: 50%;
		left: 50%;
		border-radius: 100%;
		-webkit-animation: rotate .8s infinite linear;
		animation: rotate .8s infinite linear;
		-webkit-transform-origin: center;
		-ms-transform-origin: center;
		transform-origin: center;
		border: 2px solid var(--color-loading-light);
		border-top-color: var(--color-loading-dark);
		// revert if background is too bright
		filter: var(--background-invert-if-dark);

		.primary &,
		.primary + & {
			// revert if primary is too bright
			filter: var(--primary-invert-if-bright);
		}
	}
}

.icon-loading-dark:after,
.icon-loading-small-dark:after {
	border: 2px solid var(--color-loading-dark);
	border-top-color: var(--color-loading-light);
}

.icon-loading-small:after,
.icon-loading-small-dark:after {
	height: 12px;
	width: 12px;
	margin: -8px 0 0 -8px;
}

/* Css replaced elements don't have ::after nor ::before */
audio, canvas, embed, iframe, img, input, object, video {
	&.icon-loading {
		background-image: url('../img/loading.gif');
	}
	&.icon-loading-dark {
		background-image: url('../img/loading-dark.gif');
	}
	&.icon-loading-small {
		background-image: url('../img/loading-small.gif');
	}
	&.icon-loading-small-dark {
		background-image: url('../img/loading-small-dark.gif');
	}
}

@keyframes rotate {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

.icon-32 {
	background-size: 32px !important;
}

.icon-white.icon-shadow,
.icon-audio-white,
.icon-audio-off-white,
.icon-fullscreen-white,
.icon-screen-white,
.icon-screen-off-white,
.icon-video-white,
.icon-video-off-white {
	filter: drop-shadow(1px 1px 4px var(--color-box-shadow));
}

/* ICONS -------------------------------------------------------------------
 * These icon classes are generated automatically with the following pattern
 * .icon-close (black icon)
 * .icon-close-white (white icon)
 * .icon-close.icon-white (white icon)
 *
 * Some class definitions are kept as before, since they don't follow the pattern
 * or have some additional styling like drop shadows
 */

@import url('../../dist/icons.css');