diff options
author | Volpeon <git@volpeon.ink> | 2023-01-20 17:47:42 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2023-01-20 17:47:42 +0100 |
commit | 4a567c385f7d16e12da46718d2ee4ff970072711 (patch) | |
tree | adaeb338facfc99e2bc9602588b43f7ff735301f /src/objects/_emoji.scss | |
parent | Fixed flaws (diff) | |
download | iro-design-4a567c385f7d16e12da46718d2ee4ff970072711.tar.gz iro-design-4a567c385f7d16e12da46718d2ee4ff970072711.tar.bz2 iro-design-4a567c385f7d16e12da46718d2ee4ff970072711.zip |
Add emoji object
Diffstat (limited to 'src/objects/_emoji.scss')
-rw-r--r-- | src/objects/_emoji.scss | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/objects/_emoji.scss b/src/objects/_emoji.scss new file mode 100644 index 0000000..82c415e --- /dev/null +++ b/src/objects/_emoji.scss | |||
@@ -0,0 +1,39 @@ | |||
1 | @use 'iro-sass/src/index' as iro; | ||
2 | @use '../functions' as fn; | ||
3 | |||
4 | @include iro.props-namespace('emoji') { | ||
5 | @include iro.props-store(( | ||
6 | --dims: ( | ||
7 | --size: 1.4em, | ||
8 | --pad: .2em, | ||
9 | --rounding: 3px, | ||
10 | --zoom: 2, | ||
11 | ) | ||
12 | ), 'dims'); | ||
13 | |||
14 | @include iro.props-store(( | ||
15 | --colors: ( | ||
16 | --bg: fn.global-color(--obj-hi), | ||
17 | ) | ||
18 | ), 'colors'); | ||
19 | |||
20 | @include iro.bem-object(iro.props-namespace()) { | ||
21 | display: inline; | ||
22 | position: relative; | ||
23 | top: calc(-.5em * fn.global-dim(--font --standard --line-height) + fn.dim(--rounding)); | ||
24 | width: fn.dim(--size); | ||
25 | height: fn.dim(--size); | ||
26 | margin: calc(-.5 * fn.dim(--size)) 0; | ||
27 | padding: fn.dim(--pad); | ||
28 | transition: transform .2s ease, background-color .2s ease; | ||
29 | border-radius: calc(fn.dim(--rounding) / fn.dim(--zoom)); | ||
30 | vertical-align: bottom; | ||
31 | |||
32 | @include iro.bem-modifier('zoomable') { | ||
33 | &:hover { | ||
34 | transform: scale(fn.dim(--zoom)); | ||
35 | background-color: fn.color(--bg); | ||
36 | } | ||
37 | } | ||
38 | } | ||
39 | } | ||