@skirbi/pinta 0.0.38 → 0.0.39

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/Changes CHANGED
@@ -1,5 +1,10 @@
1
1
  Revision history for @skirbi/pinta
2
2
 
3
+ 0.0.39 2026-09-15 01:57:23Z
4
+
5
+ * Fix bug for `a` elements for lead, antagonist attributes.
6
+ * Update recipes for card layouts
7
+
3
8
  0.0.38 2026-09-12 03:21:26Z
4
9
 
5
10
  * Add attribution CSS
package/lib/index.mjs CHANGED
@@ -2,4 +2,4 @@
2
2
  //
3
3
  // SPDX-License-Identifier: MIT
4
4
 
5
- const VERSION = "0.0.38";
5
+ const VERSION = "0.0.39";
@@ -3633,7 +3633,7 @@
3633
3633
  pointer-events: none;
3634
3634
  }
3635
3635
 
3636
- [lead] {
3636
+ a[lead] {
3637
3637
  background: var(--skirbi-button-lead-bg, var(--skirbi-primary-main));
3638
3638
  /*
3639
3639
  * This leaves some weird ass artifact, fix it and enable gradient
@@ -3655,7 +3655,7 @@
3655
3655
  }
3656
3656
  }
3657
3657
 
3658
- [support] {
3658
+ a[support] {
3659
3659
  background: var(--skirbi-button-support-bg, transparent);
3660
3660
  color: var(--skirbi-button-support-color, var(--skirbi-primary-main));
3661
3661
  border-color: var(--skirbi-button-support-border,
@@ -3669,7 +3669,7 @@
3669
3669
  }
3670
3670
  }
3671
3671
 
3672
- [extra] {
3672
+ a[extra] {
3673
3673
  background: var(--skirbi-button-extra-bg, transparent);
3674
3674
  color: var(--skirbi-button-extra-color, var(--skirbi-primary-main));
3675
3675
  border-color: var(--skirbi-button-extra-border,
@@ -3685,7 +3685,7 @@
3685
3685
  }
3686
3686
  }
3687
3687
 
3688
- [antagonist] {
3688
+ a[antagonist] {
3689
3689
  background: var(--skirbi-button-antagonist-bg, transparent);
3690
3690
  color: var(--skirbi-button-antagonist-color,
3691
3691
  var(--skirbi-error-base, #b91c1c));
@@ -3701,7 +3701,7 @@
3701
3701
  }
3702
3702
  }
3703
3703
 
3704
- [antagonist][lead] {
3704
+ a[antagonist][lead] {
3705
3705
  background: var(--skirbi-button-antagonist-strong-bg,
3706
3706
  var(--skirbi-error-base, #b91c1c));
3707
3707
  color: var(--skirbi-on-dark, white);
@@ -3714,7 +3714,7 @@
3714
3714
  }
3715
3715
  }
3716
3716
 
3717
- [herald] {
3717
+ a[herald] {
3718
3718
  background: var(--skirbi-button-herald-bg, transparent);
3719
3719
  color: var(--skirbi-button-herald-color,
3720
3720
  var(--skirbi-warn-base, #d97706));
@@ -3728,7 +3728,7 @@
3728
3728
  var(--skirbi-warn-base, #d97706));
3729
3729
  }
3730
3730
  }
3731
- [herald][lead] {
3731
+ a[herald][lead] {
3732
3732
  background: var(--skirbi-button-herald-strong-bg,
3733
3733
  var(--skirbi-warn-base, #d97706));
3734
3734
  color: var(--skirbi-on-dark, white);
@@ -4275,7 +4275,31 @@
4275
4275
  * @description
4276
4276
  *
4277
4277
  * Default recipe for `<semtic-article-card>`, its rendered content hooks,
4278
- * hero presentation, and restrained card heading scale.
4278
+ * and the six card variants Tatuahe assigns per card, in descending
4279
+ * order of prominence
4280
+ * (`[hero]`, `[feature]`, `[support]`, `[lead]`, `[extra]`, `[overview]`):
4281
+ *
4282
+ * - `hero` and `feature` are image-forward, full-bleed cards. `hero` is
4283
+ * the larger of the two; `feature` uses the same treatment at a
4284
+ * smaller scale.
4285
+ * - `support` is text-only: the plain bordered/shadowed card shell, with
4286
+ * a title size between feature's and lead's. No image.
4287
+ * - `lead` and `extra` are compact, text-first cards. `lead` gets a
4288
+ * short, contained thumbnail above the title (no bleed, unlike
4289
+ * hero/feature); `extra` has no image at all and reads as the quieter
4290
+ * of the two.
4291
+ * - `overview` places the image and text side by side when an image is
4292
+ * present, and behaves like `lead` when it isn't.
4293
+ *
4294
+ * Two custom properties are overridable per instance:
4295
+ *
4296
+ * - `--skirbi-article-card-gap` -- gap between the card's own regions
4297
+ * (eyebrow, header, content). Defaults to `0.75rem`.
4298
+ * - `--skirbi-article-card-image-inset` -- gap between the hero/feature
4299
+ * image and the card's border (and the matching border-radius on the
4300
+ * image). Defaults to `0`, i.e. the image bleeds edge to edge. Set it
4301
+ * on a specific card with e.g.
4302
+ * `<semtic-article-card feature style="--skirbi-article-card-image-inset: 1rem">`.
4279
4303
  */
4280
4304
 
4281
4305
  [skirbi-theme] {
@@ -4286,21 +4310,26 @@
4286
4310
 
4287
4311
  > [semtic-article-card-link] {
4288
4312
  display: grid;
4289
- gap: 0.75rem;
4313
+ gap: var(--skirbi-article-card-gap, 0.75rem);
4290
4314
  align-content: start;
4291
4315
  block-size: 100%;
4292
4316
  box-sizing: border-box;
4293
4317
  padding: 1.5rem;
4294
- background: color-mix(
4295
- in srgb,
4296
- var(--skirbi-primary-main) 8%,
4297
- white
4298
- );
4299
- border: 2px solid var(--skirbi-primary-main);
4318
+ background: var(--skirbi-surface-bg-final);
4319
+ border: 1px solid var(--skirbi-surface-border-final);
4300
4320
  border-radius: 0.75rem;
4301
- box-shadow: 0 4px 16px rgb(0 0 0 / 0.12);
4302
- color: var(--skirbi-primary-dark);
4321
+ box-shadow: var(--skirbi-shadow-md, 0 1px 3px rgb(0 0 0 / 0.08));
4322
+ color: var(--skirbi-surface-fg);
4303
4323
  text-decoration: none;
4324
+ transition: box-shadow 0.15s ease, transform 0.15s ease,
4325
+ border-color 0.15s ease;
4326
+ }
4327
+
4328
+ &:hover > [semtic-article-card-link],
4329
+ &:focus-within > [semtic-article-card-link] {
4330
+ border-color: var(--skirbi-primary-main);
4331
+ box-shadow: 0 8px 24px rgb(0 0 0 / 0.12);
4332
+ transform: translateY(-2px);
4304
4333
  }
4305
4334
 
4306
4335
  [semtic-article-card-header],
@@ -4316,6 +4345,10 @@
4316
4345
  align-items: center;
4317
4346
  }
4318
4347
 
4348
+ [semtic-article-card-eyebrow] semtic-pill-box {
4349
+ font-size: 0.75rem;
4350
+ }
4351
+
4319
4352
  [semtic-article-card-title] {
4320
4353
  margin: 0;
4321
4354
  }
@@ -4323,6 +4356,20 @@
4323
4356
  [semtic-article-card-author],
4324
4357
  [semtic-article-card-date] {
4325
4358
  font-size: 0.875em;
4359
+ color: var(--skirbi-text-muted-final);
4360
+ }
4361
+
4362
+ /*
4363
+ * A date moved into the eyebrow inside a semtic-pill-box (for
4364
+ * contrast on the hero/feature scrim and to match the category
4365
+ * pill's look) takes the pill's own color and type scale instead
4366
+ * of fighting it with the muted meta styling above. On lead, the
4367
+ * date sits bare in the eyebrow (no pill, no category to sit next
4368
+ * to), so it keeps that muted meta styling as-is.
4369
+ */
4370
+ [semtic-article-card-eyebrow] semtic-pill-box [semtic-article-card-date] {
4371
+ font-size: inherit;
4372
+ color: inherit;
4326
4373
  }
4327
4374
 
4328
4375
  [semtic-article-card-image] {
@@ -4332,32 +4379,261 @@
4332
4379
  border-radius: 0.5rem;
4333
4380
  }
4334
4381
 
4335
- &[hero] {
4382
+ /*
4383
+ * Image-forward treatment shared by hero and feature: the image
4384
+ * fills the card and the header (eyebrow, title, author) overlays
4385
+ * its bottom edge instead of stacking below it, with a scrim
4386
+ * behind the text so it stays readable over any image.
4387
+ */
4388
+ &:is([hero], [feature]) {
4336
4389
  > [semtic-article-card-link] {
4390
+ position: relative;
4337
4391
  padding: 0;
4338
4392
  overflow: hidden;
4393
+ background: var(--skirbi-surface-bg-elevated-final);
4339
4394
  }
4340
4395
 
4341
4396
  [semtic-article-card-content] {
4342
4397
  display: contents;
4343
4398
  }
4344
4399
 
4345
- [semtic-article-card-header],
4346
4400
  [semtic-article-card-content] > :not([semtic-article-card-image]) {
4347
4401
  margin-inline: 1.5rem;
4348
4402
  }
4349
4403
 
4404
+ [semtic-article-card-content] > :last-child {
4405
+ margin-block-end: 1.5rem;
4406
+ }
4407
+
4408
+ [semtic-article-card-image] {
4409
+ position: absolute;
4410
+ inset: var(--skirbi-article-card-image-inset, 0px);
4411
+ inline-size: calc(100% - (var(--skirbi-article-card-image-inset, 0px) * 2));
4412
+ block-size: calc(100% - (var(--skirbi-article-card-image-inset, 0px) * 2));
4413
+ max-block-size: none;
4414
+ margin: 0;
4415
+ order: -1;
4416
+ object-fit: cover;
4417
+ z-index: 0;
4418
+ }
4419
+
4350
4420
  [semtic-article-card-header] {
4351
- margin-block-start: 1.5rem;
4421
+ position: absolute;
4422
+ z-index: 1;
4423
+ inset-inline: 0;
4424
+ inset-block-end: 0;
4425
+ margin: 0;
4426
+ padding: 1.5rem;
4427
+ gap: 0.35rem;
4428
+ background: linear-gradient(
4429
+ to top,
4430
+ color-mix(in srgb, black 65%, transparent),
4431
+ color-mix(in srgb, black 65%, transparent) 60%,
4432
+ transparent
4433
+ );
4434
+ border-radius: 0;
4435
+ color: var(--skirbi-on-dark, white);
4352
4436
  }
4353
4437
 
4354
- [semtic-article-card-content] > :last-child {
4355
- margin-block-end: 1.5rem;
4438
+ /*
4439
+ * The scrim above fades to transparent well before the top of
4440
+ * the header block, right where the eyebrow sits -- so its
4441
+ * pills need their own solid backdrop instead of trusting
4442
+ * whatever part of the image is behind them.
4443
+ */
4444
+ [semtic-article-card-eyebrow] semtic-pill-box {
4445
+ background: rgba(0, 0, 0, 0.55);
4446
+ color: white;
4447
+ }
4448
+
4449
+ [semtic-article-card-eyebrow] semtic-pill-box[live] {
4450
+ background: var(--skirbi-info-base, #2f6fed);
4451
+ }
4452
+
4453
+ [semtic-article-card-eyebrow] semtic-pill-box[breaking] {
4454
+ background: var(--skirbi-error-base, #b91c1c);
4455
+ }
4456
+ }
4457
+
4458
+ &[hero] {
4459
+ > [semtic-article-card-link] {
4460
+ min-block-size: 22rem;
4461
+ border-width: 2px;
4462
+ border-color: var(--skirbi-primary-main);
4463
+ box-shadow: 0 12px 32px rgb(0 0 0 / 0.16);
4464
+ }
4465
+
4466
+ [semtic-article-card-title] {
4467
+ font-size: clamp(1.75rem, 2.4vw, 2.5rem);
4468
+ }
4469
+
4470
+ @media (max-width: 48rem) {
4471
+ > [semtic-article-card-link] {
4472
+ min-block-size: 16rem;
4473
+ }
4474
+
4475
+ [semtic-article-card-title] {
4476
+ font-size: clamp(1.35rem, 6vw, 1.75rem);
4477
+ }
4478
+ }
4479
+ }
4480
+
4481
+ &[feature] {
4482
+ > [semtic-article-card-link] {
4483
+ min-block-size: 14rem;
4484
+ }
4485
+
4486
+ @media (max-width: 48rem) {
4487
+ > [semtic-article-card-link] {
4488
+ min-block-size: 11rem;
4489
+ }
4490
+ }
4491
+ }
4492
+
4493
+ &:is([hero], [feature]) {
4494
+ @media (max-width: 48rem) {
4495
+ [semtic-article-card-header] {
4496
+ padding: 1rem;
4497
+ }
4498
+ }
4499
+ }
4500
+
4501
+ /*
4502
+ * Text-first treatment shared by lead and extra: no border or
4503
+ * shadow weight, a bottom rule doing the separating instead, and a
4504
+ * tighter heading scale that reads as secondary to hero/feature.
4505
+ */
4506
+ &:is([lead], [extra]) {
4507
+ > [semtic-article-card-link] {
4508
+ gap: 0.5rem;
4509
+ padding: 1rem 0;
4510
+ background: transparent;
4511
+ border: 0;
4512
+ border-block-end: 1px solid var(--skirbi-surface-border-final);
4513
+ border-radius: 0;
4514
+ box-shadow: none;
4515
+ }
4516
+
4517
+ &:hover > [semtic-article-card-link],
4518
+ &:focus-within > [semtic-article-card-link] {
4519
+ border-color: var(--skirbi-primary-main);
4520
+ box-shadow: none;
4521
+ transform: none;
4522
+ }
4523
+
4524
+ [semtic-article-card-title] {
4525
+ font-size: clamp(1.05rem, 1.4vw, 1.25rem);
4526
+ }
4527
+ }
4528
+
4529
+ /*
4530
+ * Lead gets a contained thumbnail above the title -- unlike
4531
+ * hero/feature, it stays in normal flow (no bleed, no absolute
4532
+ * overlay): just reordered ahead of the header via the same
4533
+ * display: contents + order trick, at a much shorter cap.
4534
+ */
4535
+ &[lead] {
4536
+ [semtic-article-card-content] {
4537
+ display: contents;
4356
4538
  }
4357
4539
 
4358
4540
  [semtic-article-card-image] {
4359
4541
  order: -1;
4542
+ max-block-size: 10rem;
4543
+ border-radius: 0.5rem;
4544
+ }
4545
+ }
4546
+
4547
+ &[extra] {
4548
+ [semtic-article-card-title] {
4549
+ font-size: 1rem;
4550
+ }
4551
+
4552
+ [semtic-article-card-author],
4553
+ [semtic-article-card-date] {
4554
+ font-size: 0.8em;
4555
+ }
4556
+ }
4557
+
4558
+ /*
4559
+ * Support is text-only, no image, sitting between feature and
4560
+ * lead in prominence -- it keeps the default bordered/shadowed
4561
+ * card shell (nothing to override there) and just gets a title
4562
+ * size between feature's (the plain h2 default) and lead's.
4563
+ */
4564
+ &[support] {
4565
+ [semtic-article-card-title] {
4566
+ font-size: clamp(1.2rem, 1.6vw, 1.5rem);
4567
+ }
4568
+ }
4569
+
4570
+ /*
4571
+ * Overview pairs the image with the text side by side, nos.nl
4572
+ * style. Falls back to the lead treatment when there is no
4573
+ * image to sit next to.
4574
+ */
4575
+ &[overview]:has([semtic-article-card-image]) {
4576
+ > [semtic-article-card-link] {
4577
+ display: grid;
4578
+ grid-template-columns: minmax(8rem, 12rem) 1fr;
4579
+ gap: 1rem;
4580
+ align-items: start;
4581
+ padding: 1rem 0;
4582
+ background: transparent;
4583
+ border: 0;
4584
+ border-block-end: 1px solid var(--skirbi-surface-border-final);
4585
+ border-radius: 0;
4586
+ box-shadow: none;
4587
+ }
4588
+
4589
+ &:hover > [semtic-article-card-link],
4590
+ &:focus-within > [semtic-article-card-link] {
4591
+ border-color: var(--skirbi-primary-main);
4592
+ box-shadow: none;
4593
+ transform: none;
4594
+ }
4595
+
4596
+ [semtic-article-card-image] {
4597
+ max-block-size: 8rem;
4598
+ border-radius: 0.5rem;
4599
+ }
4600
+
4601
+ [semtic-article-card-header],
4602
+ [semtic-article-card-content] {
4603
+ grid-column: 2;
4604
+ }
4605
+
4606
+ @media (max-width: 48rem) {
4607
+ > [semtic-article-card-link] {
4608
+ grid-template-columns: 1fr;
4609
+ }
4610
+
4611
+ [semtic-article-card-image] {
4612
+ max-block-size: 12rem;
4613
+ }
4614
+
4615
+ [semtic-article-card-header],
4616
+ [semtic-article-card-content] {
4617
+ grid-column: 1;
4618
+ }
4619
+ }
4620
+ }
4621
+
4622
+ &[overview]:not(:has([semtic-article-card-image])) {
4623
+ > [semtic-article-card-link] {
4624
+ padding: 1rem 0;
4625
+ background: transparent;
4626
+ border: 0;
4627
+ border-block-end: 1px solid var(--skirbi-surface-border-final);
4360
4628
  border-radius: 0;
4629
+ box-shadow: none;
4630
+ }
4631
+
4632
+ &:hover > [semtic-article-card-link],
4633
+ &:focus-within > [semtic-article-card-link] {
4634
+ border-color: var(--skirbi-primary-main);
4635
+ box-shadow: none;
4636
+ transform: none;
4361
4637
  }
4362
4638
  }
4363
4639
 
@@ -4400,7 +4676,9 @@
4400
4676
  * @styles pinta.semtic-pill-box Semtic pill box
4401
4677
  * @description
4402
4678
  *
4403
- * Default compact pill recipe for `<semtic-pill-box>`, including linked pills.
4679
+ * Default compact pill recipe for `<semtic-pill-box>`, including linked
4680
+ * pills. `[live]` and `[breaking]` are color toggles -- documented on the
4681
+ * component since it shipped, but never actually given a color until now.
4404
4682
  */
4405
4683
 
4406
4684
  [skirbi-theme] {
@@ -4413,6 +4691,14 @@
4413
4691
  color: white;
4414
4692
  }
4415
4693
 
4694
+ semtic-pill-box[live] {
4695
+ background: var(--skirbi-info-base, #2f6fed);
4696
+ }
4697
+
4698
+ semtic-pill-box[breaking] {
4699
+ background: var(--skirbi-error-base, #b91c1c);
4700
+ }
4701
+
4416
4702
  semtic-pill-box[url] {
4417
4703
  padding: 0;
4418
4704
  }
package/package.json CHANGED
@@ -32,5 +32,5 @@
32
32
  },
33
33
  "sideEffects": false,
34
34
  "type": "module",
35
- "version": "0.0.38"
35
+ "version": "0.0.39"
36
36
  }
Binary file
Binary file