1
|
// Name: Section
|
2
|
// Description: Component to create horizontal layout section
|
3
|
//
|
4
|
// Component: `uk-section`
|
5
|
//
|
6
|
// Modifiers: `uk-section-large`
|
7
|
// `uk-section-default`
|
8
|
// `uk-section-muted`
|
9
|
// `uk-section-primary`
|
10
|
// `uk-section-secondary`
|
11
|
// `uk-section-media`
|
12
|
// `uk-section-overlap`
|
13
|
//
|
14
|
// States: `uk-preserve-color`
|
15
|
//
|
16
|
// ========================================================================
|
17
|
|
18
|
|
19
|
// Variables
|
20
|
// ========================================================================
|
21
|
|
22
|
$section-padding-vertical: $global-medium-margin !default;
|
23
|
$section-padding-vertical-m: $global-large-margin !default;
|
24
|
|
25
|
$section-xsmall-padding-vertical: $global-margin !default;
|
26
|
|
27
|
$section-small-padding-vertical: $global-medium-margin !default;
|
28
|
|
29
|
$section-large-padding-vertical: $global-large-margin !default;
|
30
|
$section-large-padding-vertical-m: $global-xlarge-margin !default;
|
31
|
|
32
|
$section-xlarge-padding-vertical: $global-xlarge-margin !default;
|
33
|
$section-xlarge-padding-vertical-m: ($global-large-margin + $global-xlarge-margin) !default;
|
34
|
|
35
|
$section-default-background: $global-background !default;
|
36
|
|
37
|
$section-muted-background: $global-muted-background !default;
|
38
|
|
39
|
$section-primary-background: $global-primary-background !default;
|
40
|
$section-primary-color-mode: light !default;
|
41
|
|
42
|
$section-secondary-background: $global-secondary-background !default;
|
43
|
$section-secondary-color-mode: light !default;
|
44
|
|
45
|
|
46
|
/* ========================================================================
|
47
|
Component: Section
|
48
|
========================================================================== */
|
49
|
|
50
|
/*
|
51
|
* 1. Make it work with `100vh` and height in general
|
52
|
*/
|
53
|
|
54
|
.uk-section {
|
55
|
box-sizing: border-box; /* 1 */
|
56
|
padding-top: $section-padding-vertical;
|
57
|
padding-bottom: $section-padding-vertical;
|
58
|
@if(mixin-exists(hook-section)) {@include hook-section();}
|
59
|
}
|
60
|
|
61
|
/* Desktop and bigger */
|
62
|
@media (min-width: $breakpoint-medium) {
|
63
|
|
64
|
.uk-section {
|
65
|
padding-top: $section-padding-vertical-m;
|
66
|
padding-bottom: $section-padding-vertical-m;
|
67
|
}
|
68
|
|
69
|
}
|
70
|
|
71
|
/*
|
72
|
* Micro clearfix
|
73
|
*/
|
74
|
|
75
|
.uk-section::before,
|
76
|
.uk-section::after {
|
77
|
content: "";
|
78
|
display: table;
|
79
|
}
|
80
|
|
81
|
.uk-section::after { clear: both; }
|
82
|
|
83
|
/*
|
84
|
* Remove margin from the last-child
|
85
|
*/
|
86
|
|
87
|
.uk-section > :last-child { margin-bottom: 0; }
|
88
|
|
89
|
|
90
|
/* Size modifiers
|
91
|
========================================================================== */
|
92
|
|
93
|
/*
|
94
|
* XSmall
|
95
|
*/
|
96
|
|
97
|
.uk-section-xsmall {
|
98
|
padding-top: $section-xsmall-padding-vertical;
|
99
|
padding-bottom: $section-xsmall-padding-vertical;
|
100
|
}
|
101
|
|
102
|
/*
|
103
|
* Small
|
104
|
*/
|
105
|
|
106
|
.uk-section-small {
|
107
|
padding-top: $section-small-padding-vertical;
|
108
|
padding-bottom: $section-small-padding-vertical;
|
109
|
}
|
110
|
|
111
|
/*
|
112
|
* Large
|
113
|
*/
|
114
|
|
115
|
.uk-section-large {
|
116
|
padding-top: $section-large-padding-vertical;
|
117
|
padding-bottom: $section-large-padding-vertical;
|
118
|
}
|
119
|
|
120
|
/* Tablet landscape and bigger */
|
121
|
@media (min-width: $breakpoint-medium) {
|
122
|
|
123
|
.uk-section-large {
|
124
|
padding-top: $section-large-padding-vertical-m;
|
125
|
padding-bottom: $section-large-padding-vertical-m;
|
126
|
}
|
127
|
|
128
|
}
|
129
|
|
130
|
|
131
|
/*
|
132
|
* XLarge
|
133
|
*/
|
134
|
|
135
|
.uk-section-xlarge {
|
136
|
padding-top: $section-xlarge-padding-vertical;
|
137
|
padding-bottom: $section-xlarge-padding-vertical;
|
138
|
}
|
139
|
|
140
|
/* Tablet landscape and bigger */
|
141
|
@media (min-width: $breakpoint-medium) {
|
142
|
|
143
|
.uk-section-xlarge {
|
144
|
padding-top: $section-xlarge-padding-vertical-m;
|
145
|
padding-bottom: $section-xlarge-padding-vertical-m;
|
146
|
}
|
147
|
|
148
|
}
|
149
|
|
150
|
|
151
|
/* Style modifiers
|
152
|
========================================================================== */
|
153
|
|
154
|
/*
|
155
|
* Default
|
156
|
*/
|
157
|
|
158
|
.uk-section-default {
|
159
|
background: $section-default-background;
|
160
|
@if(mixin-exists(hook-section-default)) {@include hook-section-default();}
|
161
|
}
|
162
|
|
163
|
/*
|
164
|
* Muted
|
165
|
*/
|
166
|
|
167
|
.uk-section-muted {
|
168
|
background: $section-muted-background;
|
169
|
@if(mixin-exists(hook-section-muted)) {@include hook-section-muted();}
|
170
|
}
|
171
|
|
172
|
/*
|
173
|
* Primary
|
174
|
*/
|
175
|
|
176
|
.uk-section-primary {
|
177
|
background: $section-primary-background;
|
178
|
@if(mixin-exists(hook-section-primary)) {@include hook-section-primary();}
|
179
|
}
|
180
|
|
181
|
@if ( $section-primary-color-mode == light ) { .uk-section-primary:not(.uk-preserve-color) { @extend .uk-light;} }
|
182
|
@if ( $section-primary-color-mode == dark ) { .uk-section-primary:not(.uk-preserve-color) { @extend .uk-dark;} }
|
183
|
|
184
|
|
185
|
/*
|
186
|
* Secondary
|
187
|
*/
|
188
|
|
189
|
.uk-section-secondary {
|
190
|
background: $section-secondary-background;
|
191
|
@if(mixin-exists(hook-section-secondary)) {@include hook-section-secondary();}
|
192
|
}
|
193
|
|
194
|
@if ( $section-secondary-color-mode == light ) { .uk-section-secondary:not(.uk-preserve-color) { @extend .uk-light;} }
|
195
|
@if ( $section-secondary-color-mode == dark ) { .uk-section-secondary:not(.uk-preserve-color) { @extend .uk-dark;} }
|
196
|
|
197
|
|
198
|
/*
|
199
|
* Indicate that an image or video is used as background
|
200
|
*/
|
201
|
|
202
|
.uk-section-media {
|
203
|
@if(mixin-exists(hook-section-media)) {@include hook-section-media();}
|
204
|
}
|
205
|
|
206
|
/* Overlap modifier
|
207
|
========================================================================== */
|
208
|
|
209
|
/*
|
210
|
* Reserved modifier to make a section overlap another section with an border image
|
211
|
* Implemented by the theme
|
212
|
*/
|
213
|
|
214
|
.uk-section-overlap {
|
215
|
@if(mixin-exists(hook-section-overlap)) {@include hook-section-overlap();}
|
216
|
}
|
217
|
|
218
|
|
219
|
// Hooks
|
220
|
// ========================================================================
|
221
|
|
222
|
@if(mixin-exists(hook-section-misc)) {@include hook-section-misc();}
|
223
|
|
224
|
// @mixin hook-section(){}
|
225
|
// @mixin hook-section-default(){}
|
226
|
// @mixin hook-section-muted(){}
|
227
|
// @mixin hook-section-secondary(){}
|
228
|
// @mixin hook-section-primary(){}
|
229
|
// @mixin hook-section-media(){}
|
230
|
// @mixin hook-section-overlap(){}
|
231
|
// @mixin hook-section-misc(){}
|