summaryrefslogtreecommitdiffstats
path: root/assets/css/scopes/_headlines.scss
blob: c525af65e61d9aa1c8a0c3ad40e44cd9a01f93d1 (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
108
109
110
111
112
113
114
115
116
@include namespace('headlines') {
    @include store((
        --colors: (
            --link: (
                --idle-fg:  prop(--colors --obj, $global: true),
                --hover-fg: prop(--colors --fg-lo, $global: true),
            ),
            --emph: (
                --bg:      prop(--colors --bg-hi, $global: true),
                --body-bg: prop(--colors --bg-hi, $global: true),
            )
        )
    ));

    @include store((
        --colors: (
            --emph: (
                --body-bg: prop(--colors --bg, $global: true),
            )
        )
    ), 'light');

    @include scope(namespace()) {
        h1,
        h2,
        h3 {
            font-family:           $font-fam--large;
            font-weight:           600;
            letter-spacing:        normal;
            line-height:           1.4;
            text-transform:        none;
            font-feature-settings: 'ss02' 1;
        }

        h1,
        h2,
        h3,
        h4 {
            transform: translateX(-.06em);
        }

        h1 {
            @include iro-responsive-modular-scale(font-size, 3, $responsive-mod-scale);
        }

        h2 {
            @include iro-responsive-modular-scale(font-size, 2, $responsive-mod-scale);
        }

        h3 {
            @include iro-responsive-modular-scale(font-size, 1, $responsive-mod-scale);
        }

        h5,
        h6 {
            color:       currentColor;
            font-weight: 400;
        }

        @include element('title-inner') {
            background-image: linear-gradient(
                to top,
                transparent .15em,
                #{prop(--colors --emph --bg)} .15em,
                #{prop(--colors --emph --bg)} .6em,
                transparent .6em
            );
        }

        @include modifier('body') {
            @include element('title-inner') {
                background-image: linear-gradient(
                    to top,
                    transparent .15em,
                    #{prop(--colors --emph --body-bg)} .15em,
                    #{prop(--colors --emph --body-bg)} .6em,
                    transparent .6em
                );
            }
        }

        @include element('link') {
            display:        none;
            margin:         -.5rem 0;
            padding:        .5rem;
            vertical-align: -.02em;

            svg {
                width:  1 / 16 * 12em;
                height: 1 / 16 * 12em;
            }

            &:link,
            &:visited {
                color: prop(--colors --link --idle-fg);

                &:hover {
                    color: prop(--colors --link --hover-fg);
                }
            }
        }

        h1,
        h2,
        h3,
        h4,
        h5,
        h6 {
            &:hover {
                @include element('link') {
                    display: inline-block;
                }
            }
        }
    }
}