summaryrefslogtreecommitdiff
blob: c1d1fc509469c5c581d064979f14e2a501030398 (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
@import '../../shared/styles/gutenberg-colors.scss';
@import '../../shared/styles/jetpack-variables.scss';

.wp-block-jetpack-slideshow {
	margin-bottom: $jetpack-block-margin-bottom;
	position: relative;

	.wp-block-jetpack-slideshow_container {
		width: 100%;
		overflow: hidden;
		opacity: 0;

		&.wp-swiper-initialized {
			opacity: 1;
		}

		// High specifity to override theme styles
		.wp-block-jetpack-slideshow_swiper-wrappper,
		.wp-block-jetpack-slideshow_slide {
			padding: 0;
			margin: 0;
			line-height: normal;
		}
	}

	.wp-block-jetpack-slideshow_slide {
		background: rgba( 0, 0, 0, 0.1 );
		display: flex;
		height: 100%;
		width: 100%;
		figure {
			align-items: center;
			display: flex;
			height: 100%;
			justify-content: center;
			margin: 0;
			position: relative;
			width: 100%;
		}
	}

	.swiper-container-fade .wp-block-jetpack-slideshow_slide {
		background: var( --color-neutral-0 );
	}

	.wp-block-jetpack-slideshow_image {
		display: block;
		height: auto;
		max-height: 100%;
		max-width: 100%;
		width: auto;
		object-fit: contain;
	}

	.wp-block-jetpack-slideshow_button-prev,
	.wp-block-jetpack-slideshow_button-next,
	.wp-block-jetpack-slideshow_button-pause {
		background-color: rgba( 0, 0, 0, 0.5 );
		background-position: center;
		background-repeat: no-repeat;
		background-size: 24px;
		border: 0;
		border-radius: 4px;
		box-shadow: none;
		height: 48px;
		margin: -24px 0 0;
		padding: 0;
		transition: background-color 250ms;
		width: 48px;

		&:focus,
		&:hover {
			background-color: rgba( 0, 0, 0, 0.75 );
		}

		&:focus {
			outline: thin dotted $white;
			outline-offset: -4px;
		}
	}

	&.swiper-container-rtl .swiper-button-prev.swiper-button-white,
	&.swiper-container-rtl .wp-block-jetpack-slideshow_button-prev,
	.swiper-button-next.swiper-button-white,
	.wp-block-jetpack-slideshow_button-next {
		background-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M5.88 4.12L13.76 12l-7.88 7.88L8 22l10-10L8 2z' fill='white'/%3E%3Cpath fill='none' d='M0 0h24v24H0z'/%3E%3C/svg%3E" );
	}

	&.swiper-container-rtl .swiper-button-next.swiper-button-white,
	&.swiper-container-rtl .wp-block-jetpack-slideshow_button-next,
	.swiper-button-prev.swiper-button-white,
	.wp-block-jetpack-slideshow_button-prev {
		background-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M18 4.12L10.12 12 18 19.88 15.88 22l-10-10 10-10z' fill='white'/%3E%3Cpath fill='none' d='M0 0h24v24H0z'/%3E%3C/svg%3E" );
	}

	.wp-block-jetpack-slideshow_button-pause {
		background-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M6 19h4V5H6v14zm8-14v14h4V5h-4z' fill='white'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E" );
		display: none;
		margin-top: 0;
		position: absolute;
		right: 10px;
		top: 10px;
		z-index: 1;
	}

	.wp-block-jetpack-slideshow_autoplay-paused .wp-block-jetpack-slideshow_button-pause {
		background-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='white'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E" );
	}

	&[data-autoplay='true'] .wp-block-jetpack-slideshow_button-pause {
		display: block;
	}

	.wp-block-jetpack-slideshow_caption.gallery-caption {
		background-color: rgba( 0, 0, 0, 0.5 );
		box-sizing: border-box;
		bottom: 0;
		color: $white;
		cursor: text;
		left: 0;
		margin: 0 !important;
		padding: 0.75em;
		position: absolute;
		right: 0;
		text-align: initial;
		z-index: 1;
		a {
			color: inherit;
		}
	}

	.wp-block-jetpack-slideshow_pagination.swiper-pagination-bullets {
		bottom: 0;
		line-height: 24px;
		padding: 10px 0 2px;
		position: relative;

		.swiper-pagination-bullet {
			background: currentColor;
			color: currentColor;
			height: 16px;
			opacity: 0.5;
			transform: scale( 0.75 );
			transition: opacity 250ms, transform 250ms;
			vertical-align: top;
			width: 16px;

			&:focus,
			&:hover {
				opacity: 1;
			}

			&:focus {
				outline: thin dotted;
				outline-offset: 0;
			}
		}

		.swiper-pagination-bullet-active {
			background-color: currentColor;
			opacity: 1;
			transform: scale( 1 );
		}
	}
}