summaryrefslogtreecommitdiff
blob: 125994384cc2ab65cd7687e80bb9914d939285fd (plain)
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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
// Featured image styles

.site-header.featured-image {

	/* Hide overflow for overflowing featured image */
	overflow: hidden;

	/* Need relative positioning to properly align layers. */
	position: relative;

	/* Add text shadow to text, to increase readability. */
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);

	/* Set white text color when featured image is set. */
	.site-branding .site-title,
	.site-branding .site-description,
	.main-navigation a:after,
	.main-navigation .main-menu > li.menu-item-has-children:after,
	.main-navigation li,
	.social-navigation li,
	.entry-meta,
	.entry-title {
		color: $color__background-body;
	}

	.main-navigation a,
	.main-navigation a + svg,
	.social-navigation a,
	.site-title a,
	.site-featured-image a {
		color: $color__background-body;
		transition: opacity $link_transition ease-in-out;

		&:hover,
		&:active,
		&:hover + svg,
		&:active + svg {
			color: $color__background-body;
			opacity: 0.6;
		}

		&:focus,
		&:focus + svg {
			color: $color__background-body;
		}
	}

	.main-navigation .sub-menu a {
		opacity: inherit;
	}

	/* add focus state to social media icons */
	.social-navigation a {
		&:focus {
			color: $color__background-body;
			opacity: 1;
			border-bottom: 1px solid $color__background-body;
		}
	}

	.social-navigation svg,
	.site-featured-image svg {
		/* Use -webkit- only if supporting: Chrome < 54, iOS < 9.3, Android < 4.4.4 */
		-webkit-filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35) );
				filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35) );
	}

	/* Entry header */
	.site-featured-image {

		/* First layer: grayscale. */
		.post-thumbnail img {
			height: auto;
			left: 50%;
			max-width: 1000%;
			min-height: 100%;
			min-width: 100vw;
			position: absolute;
			top: 50%;
			transform: translateX(-50%) translateY(-50%);
			width: auto;
			z-index: 1;

			@supports ( object-fit: cover ) {
				height: 100%;
				left: 0;
				object-fit: cover;
				top: 0;
				transform: none;
				width: 100%;
			}

			/* When image filters are active, make it grayscale to colorize it blue. */
			.image-filters-enabled & {
				filter: grayscale(100%);
			}
		}

		.entry-header {

			margin-top: calc( 4 * #{$size__spacing-unit});
			margin-bottom: 0;
			margin-left: 0;
			margin-right: 0;

			@include media (tablet) {

				margin-left: $size__site-margins;
				margin-right: $size__site-margins;
			}

			.entry-title {

				&:before {
					background: $color__background-body;
				}
			}

			/* Entry meta */

			.entry-meta {

				font-weight: 500;

				> span {

					margin-right: $size__spacing-unit;
					display: inline-block;

					&:last-child {
						margin-right: 0;
					}
				}

				a {

					@include link-transition;
					color: currentColor;

					&:hover {
						text-decoration: none;
					}
				}

				.svg-icon {
					position: relative;
					display: inline-block;
					vertical-align: middle;
					margin-right: 0.5em;
				}

				.discussion-avatar-list {
					display: none;
				}
			}

			&.has-discussion {

				@include media (tablet) {

					.entry-meta {
						display: flex;
						position: relative;
					}

					.entry-title {
						padding-right: calc(1 * (100vw / 12) + #{$size__spacing-unit});
					}

					.entry-meta .comment-count {
						position: absolute;
						right: 0;
					}

					.entry-meta .discussion-avatar-list {
						display: block;
						position: absolute;
						bottom: 100%;
					}
				}
			}
		}
	}

	/* Custom Logo Link */

	.custom-logo-link {

		background: $color__background-body;
		box-shadow: 0 0 0 0 rgba($color__background-body, 0);

		&:hover,
		&:active,
		&:focus {
			box-shadow: 0 0 0 2px rgba($color__background-body, 1);
		}
	}

	/* Make sure important elements are above pseudo elements used for effects. */
	.site-branding {
		position: relative;
		z-index: 10;
	}

	.site-featured-image .entry-header {
		position: relative;
		z-index: 9;
	}

	/* Set up image filter layer positioning */
	.site-branding-container:after,
	.site-featured-image:before,
	.site-featured-image:after,
	&:after {
		display: block;
		position: absolute;
		top: 0; left: 0;
		content: "\020";
		width: 100%;
		height: 100%;
	}

	/* Background & Effects */
	/* Shared background settings between pseudo elements. */
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;

	/* The intensity of each blend mode is controlled via layer opacity. */

	/* Second layer: screen. */
	.image-filters-enabled & .site-featured-image:before {
		background: $color__link;
		mix-blend-mode: screen;
		opacity: 0.1;
	}

	/* Third layer: multiply. */
	/* When image filters are inactive, a black overlay is added. */
	.site-featured-image:after {
		background: #000;
		mix-blend-mode: multiply;
		opacity: .7;

	  	/* When image filters are active, a blue overlay is added. */
		.image-filters-enabled & {
			background: $color__link;
			opacity: .8;
			z-index: 3;

			/* Browsers supporting mix-blend-mode don't need opacity < 1 */
			@supports (mix-blend-mode: multiply) {
				opacity: 1;
			}
		}
	}

	/* Fourth layer: overlay. */
  	.image-filters-enabled & .site-branding-container:after {
		background: rgba(0, 0, 0, 0.35);
		mix-blend-mode: overlay;
		opacity: 0.5;
		z-index: 4;

		/* Browsers supporting mix-blend-mode can have a light overlay */
		@supports (mix-blend-mode: overlay) {
			background: rgba($color__background-body, 0.35);
		}
	}

	/* Fifth layer: readability overlay */
	&:after {
		background: #000;
		/**
		 * Add a transition to the readability overlay, to add a subtle
		 * but smooth effect when resizing the screen.
		 */
		transition: opacity 1200ms ease-in-out;
		opacity: 0.7;
		z-index: 5;

		/* When image filters are active, a blue overlay is added. */
		.image-filters-enabled & {
			background: mix($color__link, black, 12%);
			opacity: 0.38;

			@include media(tablet) {
				opacity: 0.18;
			}
		}
	}


	::-moz-selection {
		background: rgba($color__background-body, 0.17);
	}

	::selection {
		background: rgba($color__background-body, 0.17);
	}
}