contain-css-svelte 1.2.0 → 1.2.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.
@@ -29,7 +29,8 @@
29
29
  fn.var-with-fallbacks(--transition, list.append($prefixes, 300ms)...),
30
30
  box-shadow
31
31
  fn.var-with-fallbacks(--transition, list.append($prefixes, 300ms)...),
32
- transform fn.var-with-fallbacks(--transition, list.append($prefixes, 300ms)...);
32
+ transform
33
+ fn.var-with-fallbacks(--transition, list.append($prefixes, 300ms)...);
33
34
  }
34
35
 
35
36
  @mixin clickable-hover-affordance($prefixes...) {
@@ -41,6 +42,7 @@
41
42
  --hover-transform,
42
43
  list.append($prefixes, none)...
43
44
  );
45
+ color: var(--_color);
44
46
  background-color: color-mix(
45
47
  in oklch,
46
48
  var(--_background-color) var(--hover-base-color-percentage, 90%),
@@ -146,7 +148,10 @@
146
148
 
147
149
  // For WebKit: reserve space with transparent thumb
148
150
  &::-webkit-scrollbar {
149
- width: fn.var-with-fallbacks(--scrollbar-width, list.append($prefixes, 6px)...);
151
+ width: fn.var-with-fallbacks(
152
+ --scrollbar-width,
153
+ list.append($prefixes, 6px)...
154
+ );
150
155
  height: fn.var-with-fallbacks(
151
156
  --scrollbar-height,
152
157
  list.append($prefixes, 6px)...
@@ -90,9 +90,9 @@
90
90
  }
91
91
 
92
92
  @mixin heading-props-for($level, $group, $prefixes...) {
93
- $level-prefixes: map-prefixes($level, $prefixes);
94
- $group-prefixes: map-prefixes($group, $prefixes);
95
- $heading-prefixes: map-prefixes(heading, $prefixes);
93
+ $level-prefixes: fn.map-prefixes($level, $prefixes);
94
+ $group-prefixes: fn.map-prefixes($group, $prefixes);
95
+ $heading-prefixes: fn.map-prefixes(heading, $prefixes);
96
96
  $resolved-prefixes: ();
97
97
 
98
98
  @each $prefix in $level-prefixes {
@@ -197,7 +197,7 @@
197
197
 
198
198
  & :global(p) {
199
199
  @include typography-props-bare(
200
- list.append(map-prefixes(paragraph, $prefixes), paragraph)...
200
+ list.append(fn.map-prefixes(paragraph, $prefixes), paragraph)...
201
201
  );
202
202
  }
203
203
  & :global(p:first-of-type),
@@ -207,8 +207,8 @@
207
207
  :global(h4 + p),
208
208
  :global(h5 + p),
209
209
  :global(h6 + p) {
210
- $first-paragraph-prefixes: map-prefixes(first-paragraph, $prefixes);
211
- $paragraph-prefixes: list.append(map-prefixes(paragraph, $prefixes), paragraph);
210
+ $first-paragraph-prefixes: fn.map-prefixes(first-paragraph, $prefixes);
211
+ $paragraph-prefixes: list.append(fn.map-prefixes(paragraph, $prefixes), paragraph);
212
212
  $first-paragraph-fallback-prefixes: $first-paragraph-prefixes;
213
213
 
214
214
  @each $prefix in $paragraph-prefixes {
@@ -222,23 +222,26 @@
222
222
  @include typography-props-bare(
223
223
  list.append($first-paragraph-fallback-prefixes, first-paragraph)...
224
224
  );
225
+ // var-with-fallbacks appends the base name to each prefix itself, so these
226
+ // take the raw $prefixes -- pre-mapping them would double up on
227
+ // "first-paragraph" (e.g. --body-first-paragraph-first-paragraph-font-size).
225
228
  font-size: fn.var-with-fallbacks(
226
229
  --first-paragraph-font-size,
227
230
  list.append(
228
- map-prefixes(first-paragraph, $prefixes),
231
+ $prefixes,
229
232
  fn.vars(
230
233
  font-size,
231
- list.append(map-prefixes(paragraph, $prefixes), paragraph)...
234
+ list.append(fn.map-prefixes(paragraph, $prefixes), paragraph)...
232
235
  )
233
236
  )...
234
237
  );
235
238
  line-height: fn.var-with-fallbacks(
236
239
  --first-paragraph-line-height,
237
240
  list.append(
238
- map-prefixes(first-paragraph, $prefixes),
241
+ $prefixes,
239
242
  fn.vars(
240
243
  line-height,
241
- list.append(map-prefixes(paragraph, $prefixes), paragraph)...
244
+ list.append(fn.map-prefixes(paragraph, $prefixes), paragraph)...
242
245
  )
243
246
  )...
244
247
  );
@@ -255,7 +258,7 @@
255
258
  :global(h5 + p::first-line),
256
259
  :global(h6 + p::first-line) {
257
260
  @include typography-props-bare(
258
- list.append(map-prefixes-include-base(first-line, $prefixes), first-line)...
261
+ list.append(fn.map-prefixes-include-base(first-line, $prefixes), first-line)...
259
262
  );
260
263
  }
261
264
 
@@ -267,7 +270,7 @@
267
270
  :global(h5 + p::first-letter),
268
271
  :global(h6 + p::first-letter) {
269
272
  @include typography-props-bare(
270
- map-prefixes-include-base(first-letter, $prefixes)...
273
+ fn.map-prefixes-include-base(first-letter, $prefixes)...
271
274
  );
272
275
  --link-bg: #{fn.vars(link-bg, $prefixes...)};
273
276
  --link-fg: #{fn.vars(link-fg, $prefixes...)};