@lumx/core 3.6.1 → 3.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lumx.css +1 -1
- package/lumx.min.css +1 -1
- package/package.json +1 -1
- package/scss/components/thumbnail/_index.scss +21 -18
package/package.json
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"update-version-changelog": "yarn version-changelog ../../CHANGELOG.md"
|
|
41
41
|
},
|
|
42
42
|
"sideEffects": false,
|
|
43
|
-
"version": "3.6.
|
|
43
|
+
"version": "3.6.2",
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@babel/core": "^7.18.13",
|
|
46
46
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
@@ -105,6 +105,10 @@
|
|
|
105
105
|
object-position: center;
|
|
106
106
|
width: 100%;
|
|
107
107
|
height: 100%;
|
|
108
|
+
// When using object-fit:cover + ratio 1/1, Chrome switches to pixelated downsizing algo https://stackoverflow.com/a/77059936
|
|
109
|
+
// The following prevent this so the image is correctly downsized using blurrying effect
|
|
110
|
+
overflow-clip-margin: unset;
|
|
111
|
+
overflow: visible;
|
|
108
112
|
|
|
109
113
|
@supports not (aspect-ratio: 1 / 1) {
|
|
110
114
|
position: absolute;
|
|
@@ -119,7 +123,7 @@
|
|
|
119
123
|
@supports (aspect-ratio: 1 / 1) {
|
|
120
124
|
@each $key, $aspect-ratio-fraction in $lumx-thumbnail-aspect-ratio-fraction {
|
|
121
125
|
.#{$lumx-base-prefix}-thumbnail--aspect-ratio-#{$key}:not(.#{$lumx-base-prefix}-thumbnail--fill-height)
|
|
122
|
-
|
|
126
|
+
.#{$lumx-base-prefix}-thumbnail__image {
|
|
123
127
|
aspect-ratio: var(--lumx-thumbnail-aspect-ratio, string.unquote($aspect-ratio-fraction));
|
|
124
128
|
}
|
|
125
129
|
}
|
|
@@ -128,7 +132,7 @@
|
|
|
128
132
|
@supports not (aspect-ratio: 1 / 1) {
|
|
129
133
|
@each $key, $aspect-ratio in $lumx-thumbnail-aspect-ratio {
|
|
130
134
|
.#{$lumx-base-prefix}-thumbnail--aspect-ratio-#{$key}:not(.#{$lumx-base-prefix}-thumbnail--fill-height)
|
|
131
|
-
|
|
135
|
+
.#{$lumx-base-prefix}-thumbnail__background {
|
|
132
136
|
padding-top: $aspect-ratio;
|
|
133
137
|
}
|
|
134
138
|
}
|
|
@@ -154,18 +158,18 @@
|
|
|
154
158
|
bottom: 0;
|
|
155
159
|
left: 0;
|
|
156
160
|
pointer-events: none;
|
|
157
|
-
content:
|
|
161
|
+
content: '';
|
|
158
162
|
}
|
|
159
163
|
|
|
160
164
|
/* Hover */
|
|
161
165
|
&:hover::after,
|
|
162
166
|
&:focus::after {
|
|
163
|
-
@include lumx-state(lumx-base-const(
|
|
167
|
+
@include lumx-state(lumx-base-const('state', 'HOVER'), lumx-base-const('emphasis', 'LOW'), 'dark');
|
|
164
168
|
}
|
|
165
169
|
|
|
166
170
|
/* Active */
|
|
167
171
|
&:active::after {
|
|
168
|
-
@include lumx-state(lumx-base-const(
|
|
172
|
+
@include lumx-state(lumx-base-const('state', 'ACTIVE'), lumx-base-const('emphasis', 'LOW'), 'dark');
|
|
169
173
|
}
|
|
170
174
|
}
|
|
171
175
|
|
|
@@ -179,25 +183,25 @@
|
|
|
179
183
|
/* Focused (light theme) */
|
|
180
184
|
.#{$lumx-base-prefix}-thumbnail--theme-light.#{$lumx-base-prefix}-thumbnail--is-clickable {
|
|
181
185
|
&[data-focus-visible-added]::after {
|
|
182
|
-
@include lumx-state(lumx-base-const(
|
|
186
|
+
@include lumx-state(lumx-base-const('state', 'FOCUS'), lumx-base-const('emphasis', 'LOW'), 'dark');
|
|
183
187
|
}
|
|
184
188
|
}
|
|
185
189
|
|
|
186
190
|
/* Focused (dark theme) */
|
|
187
191
|
.#{$lumx-base-prefix}-thumbnail--theme-dark.#{$lumx-base-prefix}-thumbnail--is-clickable {
|
|
188
192
|
&[data-focus-visible-added]::after {
|
|
189
|
-
@include lumx-state(lumx-base-const(
|
|
193
|
+
@include lumx-state(lumx-base-const('state', 'FOCUS'), lumx-base-const('emphasis', 'LOW'), 'light');
|
|
190
194
|
}
|
|
191
195
|
}
|
|
192
196
|
|
|
193
197
|
/* Loading state */
|
|
194
198
|
.#{$lumx-base-prefix}-thumbnail--is-loading {
|
|
195
199
|
&.#{$lumx-base-prefix}-thumbnail--theme-light .#{$lumx-base-prefix}-thumbnail__background {
|
|
196
|
-
@include lumx-skeleton(
|
|
200
|
+
@include lumx-skeleton('light');
|
|
197
201
|
}
|
|
198
202
|
|
|
199
203
|
&.#{$lumx-base-prefix}-thumbnail--theme-dark .#{$lumx-base-prefix}-thumbnail__background {
|
|
200
|
-
@include lumx-skeleton(
|
|
204
|
+
@include lumx-skeleton('dark');
|
|
201
205
|
}
|
|
202
206
|
}
|
|
203
207
|
|
|
@@ -217,11 +221,11 @@
|
|
|
217
221
|
}
|
|
218
222
|
|
|
219
223
|
&.#{$lumx-base-prefix}-thumbnail--theme-light .#{$lumx-base-prefix}-thumbnail__fallback {
|
|
220
|
-
background-color: lumx-color-variant(
|
|
224
|
+
background-color: lumx-color-variant('dark', 'L6');
|
|
221
225
|
}
|
|
222
226
|
|
|
223
227
|
&.#{$lumx-base-prefix}-thumbnail--theme-dark .#{$lumx-base-prefix}-thumbnail__fallback {
|
|
224
|
-
background-color: lumx-color-variant(
|
|
228
|
+
background-color: lumx-color-variant('light', 'L6');
|
|
225
229
|
}
|
|
226
230
|
}
|
|
227
231
|
|
|
@@ -237,16 +241,15 @@
|
|
|
237
241
|
/* Thumbnail badge mask
|
|
238
242
|
========================================================================== */
|
|
239
243
|
|
|
240
|
-
$badge-radius-size: math.div(map.get($lumx-sizes, lumx-base-const(
|
|
244
|
+
$badge-radius-size: math.div(map.get($lumx-sizes, lumx-base-const('size', 'XS')), 2) + 2;
|
|
241
245
|
|
|
242
246
|
.#{$lumx-base-prefix}-thumbnail--has-badge {
|
|
243
247
|
.#{$lumx-base-prefix}-thumbnail__background,
|
|
244
248
|
.#{$lumx-base-prefix}-thumbnail__fallback {
|
|
245
|
-
mask-image:
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
);
|
|
249
|
+
mask-image: radial-gradient(
|
|
250
|
+
circle at calc(100% - #{$badge-radius-size - 6}) calc(100% - #{$badge-radius-size - 6}),
|
|
251
|
+
transparent $badge-radius-size,
|
|
252
|
+
black $badge-radius-size + 1
|
|
253
|
+
);
|
|
251
254
|
}
|
|
252
255
|
}
|