blob: 56d4e665a5a03947d92bc6b33b3c0baa0eb6b2a9 (
plain) (
blame)
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
|
@use 'sass:meta';
@use 'iro-sass/src/bem' as bem;
@use 'iro-sass/src/props';
@use '../props' as *;
@use 'icon.vars' as icon;
@forward 'emoji.vars';
@use 'emoji.vars' as vars;
@mixin styles {
@include materialize-at-root(meta.module-variables('vars'));
@include bem.object('emoji') {
position: relative;
display: inline-block;
inline-size: calc(props.get(vars.$size));
block-size: calc(props.get(vars.$size));
padding: calc(props.get(vars.$pad));
margin: calc(-1 * props.get(vars.$pad));
vertical-align: props.get(vars.$valign);
object-fit: contain;
@include bem.modifier('icon') {
margin: calc(-1 * props.get(vars.$pad) - .5 * (props.get(vars.$size) - props.get(icon.$size)));
vertical-align: props.get(icon.$valign);
}
@each $mod, $size, $valign in vars.$sizes {
@include bem.modifier($mod) {
inline-size: props.get($size);
block-size: props.get($size);
vertical-align: props.get($valign);
@include bem.modifier('icon') {
margin: calc(-1 * props.get(vars.$pad) - .5 * (props.get($size) - props.get(icon.$size)));
}
}
}
@include bem.modifier('zoomable') {
border-radius: calc(props.get(vars.$rounding) / props.get(vars.$zoom));
transition: transform .2s ease, background-color .2s ease;
&:hover {
background-color: props.get(vars.$bg-color);
transform: scale(props.get(vars.$zoom));
}
}
}
}
|