-
Notifications
You must be signed in to change notification settings - Fork 171
/
Copy path_patterns_strip.scss
256 lines (217 loc) · 7.93 KB
/
_patterns_strip.scss
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
@use 'sass:color';
@import 'settings';
@mixin vf-p-strip {
%vf-strip {
@extend %section-padding--default;
clear: both;
position: relative;
width: 100%;
}
@include vf-p-strip-default;
@include vf-p-strip-accent;
@include vf-p-strip-image;
@include vf-p-strip-bordered;
@include vf-p-strip-shallow;
@include vf-p-strip-deep;
@include vf-p-strip-suru;
@include vf-p-strip-suru-topped;
}
@mixin vf-p-strip-default {
// default strip is theme-agnostic, it doesn't change the theme
// unless the theme class is specifically applied to it,
// in which case it will set the background and text colours
.p-strip {
@extend %vf-strip;
background-color: transparent;
// themed versions of the strip should set the background and text colours
&.is-light,
&.is-paper,
&.is-dark {
background-color: $colors--theme--background-default;
color: $colors--theme--text-default;
}
}
// highligted version if the strip is using the alternative background colour
// this is the recommended replacement for the deprecated .p-strip--white,
// .p-strip--light and .p-strip--accent
.p-strip--highlighted {
@extend %vf-strip;
background-color: $colors--theme--background-alt;
color: $colors--theme--text-default;
}
// DEPRECATED: use any other available p-strip instead
.p-strip--light {
@extend %vf-strip;
@include vf-theme-light;
background-color: $colors--theme--background-alt;
color: $colors--theme--text-default;
}
// DEPRECATED: use .p-strip .is-dark instead
.p-strip--dark {
@extend %vf-strip;
@include vf-theme-dark;
background-color: $colors--theme--background-default;
color: $colors--theme--text-default;
}
// DEPRECATED: use .p-strip--highlighted instead
.p-strip--white {
@extend %vf-strip;
@include vf-theme-light;
background-color: $color-x-light;
color: $colors--theme--text-default;
}
}
// DEPRECATED: use other available strip variants instead
@mixin vf-p-strip-accent {
.p-strip--accent {
@extend %vf-strip;
@include vf-determine-theme-from-background($color-accent-background);
background-color: $color-accent-background;
color: $colors--theme--text-default;
}
}
// DEPRECATED: use other available strip variants or suru component instead
@mixin vf-p-strip-image {
.p-strip--image {
@extend %vf-strip;
background-repeat: no-repeat;
background-size: cover;
color: $colors--theme--text-default;
}
}
// DEPRECATED: use other available strip variants instead
@mixin vf-p-strip-bordered {
[class*='p-strip'].is-bordered {
@extend %vf-pseudo-border--bottom;
}
}
@mixin vf-p-strip-shallow {
[class*='p-strip'].is-shallow {
@extend %section-padding--shallow;
}
}
@mixin vf-p-strip-deep {
[class*='p-strip'].is-deep {
@extend %section-padding--deep;
}
}
// DEPRECATED:
// gradient of the main suru slant
$color-suru-start: color.adjust($color-brand, $lightness: 10%) !default;
$color-suru-middle: $color-brand !default;
$color-suru-end: color.adjust($color-brand, $lightness: -10%) !default;
// page background
$color-suru-background: $color-x-light !default;
// colors of suru slants on left right (for blend mode multiply)
$color-suru-slant-right: rgba(205, 205, 205, 0.55) !default;
$color-suru-slant-left: rgba(205, 205, 205, 0.55) !default;
// fallback colors of suru slants (when blend mode multiply is not supported)
$color-suru-slant-right-fallback: rgba(205, 205, 205, 0.14) !default;
$color-suru-slant-left-fallback: rgba(205, 205, 205, 0.14) !default;
// DEPRECATED: use new .p-suru components instead
@mixin vf-p-strip-suru {
.p-strip--suru {
@extend %vf-strip;
background-image: linear-gradient(to bottom right, $color-suru-slant-left-fallback 0%, $color-suru-slant-left-fallback 49.8%, transparent 50%, transparent 100%),
linear-gradient(to bottom left, $color-suru-slant-right-fallback 0%, $color-suru-slant-right-fallback 49.8%, transparent 50%, transparent 100%),
linear-gradient(to top right, #fff 0%, #fff 49%, transparent 50%, transparent 100%), linear-gradient(to top right, #fff 0%, #fff 100%),
linear-gradient(111deg, $color-suru-start 10%, $color-suru-middle 37%, $color-suru-end 100%);
background-position:
0% 0%,
top right,
right 0 bottom 4rem,
right bottom,
0% 0%;
background-repeat: no-repeat;
background-size:
100% calc(100% - 4rem),
50% 100%,
100% 4rem,
100% 4rem,
auto;
color: $color-x-light;
margin-bottom: -4rem;
overflow: hidden;
padding-bottom: 12rem;
position: relative;
@supports (background-blend-mode: multiply) {
background-blend-mode: multiply, multiply, normal, normal, normal;
background-image: linear-gradient(to bottom right, $color-suru-slant-left 0%, $color-suru-slant-left 49.8%, transparent 50%, transparent 100%),
linear-gradient(to bottom left, $color-suru-slant-right 0%, $color-suru-slant-right 49.8%, transparent 50%, transparent 100%),
linear-gradient(to top right, $color-suru-background 0%, $color-suru-background 49%, transparent 50%, transparent 100%),
linear-gradient($color-suru-background 0%, $color-suru-background 100%), linear-gradient(111deg, $color-suru-start 10%, $color-suru-middle 37%, $color-suru-end 100%);
}
&.is-deep {
$padding: 3rem;
background-position:
0% 0%,
top right,
right 0 bottom $padding,
right bottom,
0% 0%;
background-size:
100% calc(100% - $padding),
100% 100%,
100% $padding,
100% $padding,
auto;
margin-bottom: -$padding;
padding-bottom: ($padding * 3) !important;
@media (min-width: $threshold-6-12-col) {
$padding: 6rem;
background-position:
0% 0%,
top right,
right 0 bottom $padding,
right bottom,
0% 0%;
background-size:
100% calc(100% - $padding),
50% 100%,
100% $padding,
100% $padding,
auto;
margin-bottom: -$padding;
padding-bottom: ($padding * 3) !important;
}
}
&.is-shallow {
// Override is-shallow class with default padding, as Suru strips were not designed to be shallow
padding: 4rem 0 12rem 0;
}
}
}
// DEPRECATED: use new .p-suru components instead
@mixin vf-p-strip-suru-topped {
.p-strip--suru-topped {
@extend %vf-strip;
background-image: linear-gradient(to bottom left, rgba(229, 229, 229, 0.14) 0%, rgba(229, 229, 229, 0.14) 49%, transparent 50%, transparent 100%),
linear-gradient(to bottom left, rgba($color-suru-middle, 0.14) 0%, rgba($color-suru-middle, 0.14) 49%, transparent 50%, transparent 100%),
linear-gradient(to bottom right, transparent 0%, transparent 49%, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 1) 100%),
linear-gradient(90deg, $color-suru-start 4%, $color-suru-middle 50%, $color-suru-end 88%);
background-position:
top right,
top right,
top left,
top left;
background-repeat: no-repeat;
background-size:
39.4% 6rem,
54% 4rem,
63% 4rem,
62.6% 4rem;
padding-bottom: 4rem;
padding-top: 6rem;
@supports (background-blend-mode: multiply) {
background-blend-mode: multiply, multiply, normal, normal;
background-image: linear-gradient(to bottom left, rgba(229, 229, 229, 0.5) 0%, rgba(229, 229, 229, 0.5) 49%, transparent 50%, transparent 100%),
linear-gradient(to bottom left, rgba($color-suru-middle, 0.16) 0%, rgba($color-suru-middle, 0.16) 49%, transparent 50%, transparent 100%),
linear-gradient(to bottom right, transparent 0%, transparent 49%, #fff 50%, #fff 100%),
linear-gradient(90deg, $color-suru-start 4%, $color-suru-middle 50%, $color-suru-end 88%);
}
&.is-shallow {
// Override is-shallow class with default padding, as Suru strips were not designed to be shallow
padding: 6rem 0 4rem 0;
}
}
}