summaryrefslogtreecommitdiffstats
path: root/src/objects/_icon.scss
blob: 5c4bfabffd9d80c920f7d1e371c9df4c1358ed6d (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
@use 'iro-sass/src/index' as iro;
@use '../functions' as fn;

@include iro.props-namespace('icon') {
    @include iro.props-store((
        --dims: (
            --stroke:  1.5px,
            --size:    calc(1 / 14 * 16em),
            --valign:  -.2em,
        )
    ), 'dims');

    @include iro.bem-object(iro.props-namespace()) {
        display:         inline;
        width:           fn.dim(--size);
        height:          fn.dim(--size);
        stroke-width:    fn.dim(--stroke);
        stroke-linecap:  round;
        stroke-linejoin: round;
        vertical-align:  fn.dim(--valign);

        @include iro.bem-modifier('block') {
            display: block;
        }
    }
}