summaryrefslogtreecommitdiffstats
path: root/src/scopes/_headings.scss
blob: c5033e885a11f4f96f1006d0dac836e1acfb8fab (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
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
@use 'iro-sass/src/index' as iro;
@use '../functions' as fn;
@use '../mixins' as mx;
@use 'include-media/dist/include-media' as media;

@include iro.props-namespace('headings') {
    @include iro.bem-scope(iro.props-namespace()) {
        h1,
        h2,
        h3,
        h4,
        h5,
        h6 {
            @include mx.set-font(--headline);

            display:        block;
            transform:      translateX(-.06em);
            letter-spacing: normal;
            text-transform: none;
        }


        h1 {
            @include mx.heading-strong(--lg);
        }

        h2 {
            @include mx.heading-medium(--md);
        }

        h3,
        h4,
        h5,
        h6 {
            @include mx.heading-faint(--sm);
        }

        @include iro.bem-elem('highlight') {
            background-image: linear-gradient(
                to top,
                transparent .15em,
                fn.foreign-color(--heading, --bg) .15em,
                fn.foreign-color(--heading, --bg) .6em,
                transparent .6em
            );
        }

        @include iro.bem-modifier('display') {
            h1,
            h2,
            h3,
            h4,
            h5,
            h6 {
                @include mx.set-font(--headline);
            }

            h1 {
                @include mx.heading-strong(--display --xxl);

                @include media.media('<=md') {
                    @include mx.heading-strong(--display-sm --xxl);
                }
            }
    
            h2 {
                @include mx.heading-strong(--display --xl);

                @include media.media('<=md') {
                    @include mx.heading-strong(--display-sm --xl);
                }
            }
    
            h3 {
                @include mx.heading-strong(--display --lg);

                @include media.media('<=md') {
                    @include mx.heading-strong(--display-sm --lg);
                }
            }
    
            h4 {
                @include mx.heading-strong(--display --md);

                @include media.media('<=md') {
                    @include mx.heading-strong(--display-sm --md);
                }
            }

            h5 {
                @include mx.heading-medium(--display --sm);

                @include media.media('<=md') {
                    @include mx.heading-medium(--display-sm --sm);
                }
            }

            h6 {
                @include mx.heading-faint(--display --xs);

                @include media.media('<=md') {
                    @include mx.heading-faint(--display-sm --xs);
                }
            }
        }
    }
}