1
|
// Name: Heading
|
2
|
// Description: Styles for headings
|
3
|
//
|
4
|
// Component: `uk-heading-primary`
|
5
|
// `uk-heading-hero`
|
6
|
// `uk-heading-divider`
|
7
|
// `uk-heading-bullet`
|
8
|
// `uk-heading-line`
|
9
|
//
|
10
|
// ========================================================================
|
11
|
|
12
|
|
13
|
// Variables
|
14
|
// ========================================================================
|
15
|
|
16
|
$heading-primary-font-size: $global-xxlarge-font-size !default;
|
17
|
$heading-primary-line-height: 1.2 !default;
|
18
|
|
19
|
$heading-primary-font-size-m: 3.75rem !default; // 54px
|
20
|
$heading-primary-line-height-m: 1.1 !default;
|
21
|
|
22
|
$heading-hero-font-size: 4rem !default; // 64px
|
23
|
$heading-hero-line-height: 1.1 !default;
|
24
|
|
25
|
$heading-hero-font-size-s: 6rem !default; // 96px
|
26
|
$heading-hero-line-height-s: 1 !default;
|
27
|
|
28
|
$heading-hero-font-size-m: 8rem !default; // 128px
|
29
|
$heading-hero-line-height-m: 1 !default;
|
30
|
|
31
|
$heading-divider-padding-bottom: 10px !default;
|
32
|
$heading-divider-border-width: $global-border-width !default;
|
33
|
$heading-divider-border: $global-border !default;
|
34
|
|
35
|
$heading-bullet-top: unquote('calc(-0.1 * 1em)') !default;
|
36
|
$heading-bullet-height: 0.9em !default;
|
37
|
$heading-bullet-margin-right: 10px !default;
|
38
|
$heading-bullet-border-width: 5px !default;
|
39
|
$heading-bullet-border: $global-border !default;
|
40
|
|
41
|
$heading-line-border-width: $global-border-width !default;
|
42
|
$heading-line-border: $global-border !default;
|
43
|
$heading-line-height: $heading-line-border-width !default;
|
44
|
$heading-line-margin-horizontal: 0.6em !default;
|
45
|
|
46
|
|
47
|
/* ========================================================================
|
48
|
Component: Heading
|
49
|
========================================================================== */
|
50
|
|
51
|
|
52
|
/* Primary
|
53
|
========================================================================== */
|
54
|
|
55
|
.uk-heading-primary {
|
56
|
font-size: $heading-primary-font-size;
|
57
|
line-height: $heading-primary-line-height;
|
58
|
@if(mixin-exists(hook-heading-primary)) {@include hook-heading-primary();}
|
59
|
}
|
60
|
|
61
|
/* Tablet landscape and bigger */
|
62
|
@media (min-width: $breakpoint-medium) {
|
63
|
|
64
|
.uk-heading-primary {
|
65
|
font-size: $heading-primary-font-size-m;
|
66
|
line-height: $heading-primary-line-height-m;
|
67
|
}
|
68
|
|
69
|
}
|
70
|
|
71
|
|
72
|
/* Hero
|
73
|
========================================================================== */
|
74
|
|
75
|
.uk-heading-hero {
|
76
|
font-size: $heading-hero-font-size;
|
77
|
line-height: $heading-hero-line-height;
|
78
|
@if(mixin-exists(hook-heading-hero)) {@include hook-heading-hero();}
|
79
|
}
|
80
|
|
81
|
/* Phone landscape and bigger */
|
82
|
@media (min-width: $breakpoint-small) {
|
83
|
|
84
|
.uk-heading-hero {
|
85
|
font-size: $heading-hero-font-size-s;
|
86
|
line-height: $heading-hero-line-height-s;
|
87
|
}
|
88
|
|
89
|
}
|
90
|
|
91
|
/* Tablet landscape and bigger */
|
92
|
@media (min-width: $breakpoint-medium) {
|
93
|
|
94
|
.uk-heading-hero {
|
95
|
font-size: $heading-hero-font-size-m;
|
96
|
line-height: $heading-hero-line-height-m;
|
97
|
}
|
98
|
|
99
|
}
|
100
|
|
101
|
|
102
|
/* Divider
|
103
|
========================================================================== */
|
104
|
|
105
|
.uk-heading-divider {
|
106
|
padding-bottom: $heading-divider-padding-bottom;
|
107
|
border-bottom: $heading-divider-border-width solid $heading-divider-border;
|
108
|
@if(mixin-exists(hook-heading-divider)) {@include hook-heading-divider();}
|
109
|
}
|
110
|
|
111
|
|
112
|
/* Bullet
|
113
|
========================================================================== */
|
114
|
|
115
|
.uk-heading-bullet { position: relative; }
|
116
|
|
117
|
/*
|
118
|
* 1. Using `inline-block` to make it work with text alignment
|
119
|
* 2. Center vertically
|
120
|
* 3. Style
|
121
|
*/
|
122
|
|
123
|
.uk-heading-bullet::before {
|
124
|
content: "";
|
125
|
/* 1 */
|
126
|
display: inline-block;
|
127
|
/* 2 */
|
128
|
position: relative;
|
129
|
top: $heading-bullet-top;
|
130
|
vertical-align: middle;
|
131
|
/* 3 */
|
132
|
height: $heading-bullet-height;
|
133
|
margin-right: $heading-bullet-margin-right;
|
134
|
border-left: $heading-bullet-border-width solid $heading-bullet-border;
|
135
|
@if(mixin-exists(hook-heading-bullet)) {@include hook-heading-bullet();}
|
136
|
}
|
137
|
|
138
|
|
139
|
/* Line
|
140
|
========================================================================== */
|
141
|
|
142
|
/*
|
143
|
* Clip the child element
|
144
|
*/
|
145
|
|
146
|
.uk-heading-line { overflow: hidden; }
|
147
|
|
148
|
/*
|
149
|
* Extra markup is needed to make it work with text align
|
150
|
*/
|
151
|
|
152
|
.uk-heading-line > * {
|
153
|
display: inline-block;
|
154
|
position: relative;
|
155
|
}
|
156
|
|
157
|
/*
|
158
|
* 1. Center vertically
|
159
|
* 2. Make the element as large as possible. It's clipped by the container.
|
160
|
* 3. Style
|
161
|
*/
|
162
|
|
163
|
.uk-heading-line > :before,
|
164
|
.uk-heading-line > :after {
|
165
|
content: "";
|
166
|
/* 1 */
|
167
|
position: absolute;
|
168
|
top: unquote('calc(50% - (#{$heading-line-height} / 2))');
|
169
|
/* 2 */
|
170
|
width: 2000px;
|
171
|
/* 3 */
|
172
|
border-bottom: $heading-line-border-width solid $heading-line-border;
|
173
|
@if(mixin-exists(hook-heading-line)) {@include hook-heading-line();}
|
174
|
}
|
175
|
|
176
|
.uk-heading-line > :before {
|
177
|
right: 100%;
|
178
|
margin-right: $heading-line-margin-horizontal;
|
179
|
}
|
180
|
.uk-heading-line > :after {
|
181
|
left: 100%;
|
182
|
margin-left: $heading-line-margin-horizontal;
|
183
|
}
|
184
|
|
185
|
|
186
|
// Hooks
|
187
|
// ========================================================================
|
188
|
|
189
|
@if(mixin-exists(hook-heading-misc)) {@include hook-heading-misc();}
|
190
|
|
191
|
// @mixin hook-heading-primary(){}
|
192
|
// @mixin hook-heading-hero(){}
|
193
|
// @mixin hook-heading-divider(){}
|
194
|
// @mixin hook-heading-bullet(){}
|
195
|
// @mixin hook-heading-line(){}
|
196
|
// @mixin hook-heading-misc(){}
|
197
|
|
198
|
|
199
|
// Inverse
|
200
|
// ========================================================================
|
201
|
|
202
|
$inverse-heading-divider-border: $inverse-global-border !default;
|
203
|
$inverse-heading-bullet-border: $inverse-global-border !default;
|
204
|
$inverse-heading-line-border: $inverse-global-border !default;
|
205
|
|
206
|
|
207
|
|
208
|
// @mixin hook-inverse-heading-primary(){}
|
209
|
// @mixin hook-inverse-heading-hero(){}
|
210
|
// @mixin hook-inverse-heading-divider(){}
|
211
|
// @mixin hook-inverse-heading-bullet(){}
|
212
|
// @mixin hook-inverse-heading-line(){}
|