summaryrefslogtreecommitdiffstats
path: root/src/scopes/_tables.scss
blob: e8135eb2b4c3b8173e9690634381b6476745a8fc (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
51
52
53
54
55
@use 'iro-sass/src/index' as iro;
@use '../functions' as fn;
@use '../mixins' as mx;

@include iro.props-namespace('tables') {
    @include iro.props-store((
        --dims: (
            --pad-x: fn.global-dim(--size --175),
            --pad-y: fn.global-dim(--size --125),
        ),
    ), 'dims');

    @include iro.props-store((
        --colors: (
            --border:  fn.global-color(--obj),
            --heading: fn.global-color(--fg-hi),
        )
    ), 'colors');

    @include iro.bem-scope(iro.props-namespace()) {
        table {
            border-spacing:  0;
            border-collapse: separate;
        }

        th {
            @include mx.set-font(--standard, (
                --line-height: null,
                --size:        fn.global-dim(--font-size --50),
                --weight:      500,
                --transform:   uppercase,
                --spacing:     .5px
            ));

            padding:    fn.dim(--pad-y) fn.dim(--pad-x);
            color:      fn.color(--heading);
            text-align: left;
        }

        td {
            padding:          fn.dim(--pad-y) fn.dim(--pad-x);
            border-width:     1px 0 0;
            border-style:     solid;
            border-color:     fn.color(--border);
        }

        tr {
            &:last-child {
                td {
                    border-bottom-width: 1px;
                }
            }
        }
    }
}