@utrecht/component-library-css 1.0.0-alpha.568 → 1.0.0-alpha.569

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/dist/html.css CHANGED
@@ -306,6 +306,9 @@ however browsers don't seem to have implemented great looking supixel tweening y
306
306
  `text-decoration-skip` also makes the transition more challenging to implement.
307
307
 
308
308
  */
309
+ /**
310
+ * Simulate forced-colors mode.
311
+ */
309
312
  /* stylelint-disable-next-line block-no-empty */
310
313
  /* stylelint-disable-next-line block-no-empty */
311
314
  /* stylelint-disable-next-line block-no-empty */
@@ -981,33 +984,31 @@ however browsers don't seem to have implemented great looking supixel tweening y
981
984
  }
982
985
  .utrecht-html a {
983
986
  --utrecht-icon-size: var(--utrecht-link-icon-size, 1em);
984
- color: var(--utrecht-link-color, blue);
985
- text-decoration: var(--utrecht-link-text-decoration, underline);
986
- text-decoration-color: var(--utrecht-link-text-decoration-color, currentColor);
987
- text-decoration-skip-ink: all;
988
- text-decoration-thickness: max(var(--utrecht-link-text-decoration-thickness), 1px);
989
- text-underline-offset: var(--utrecht-link-text-underline-offset);
987
+ color: var(--_utrecht-link-state-color, var(--utrecht-link-color, var(--_utrecht-link-forced-colors-color)));
990
988
  }
991
989
  .utrecht-html a:visited {
992
- color: var(--utrecht-link-visited-color, var(--utrecht-link-color));
990
+ --_utrecht-link-forced-colors-color: visitedtext;
991
+ --_utrecht-link-state-color: var(--utrecht-link-visited-color);
993
992
  }
994
993
  .utrecht-html a:hover {
995
- color: var(--utrecht-link-hover-color, var(--utrecht-link-color));
996
- text-decoration: var(--utrecht-link-hover-text-decoration, var(--utrecht-link-text-decoration, underline));
994
+ --_utrecht-link-forced-colors-color: linktext;
995
+ --_utrecht-link-state-color: var(--utrecht-link-hover-color);
996
+ --_utrecht-link-state-text-decoration: var(--utrecht-link-hover-text-decoration);
997
+ --_utrecht-link-state-text-decoration-thickness: var(--utrecht-link-hover-text-decoration-thickness);
997
998
  text-decoration-skip: none;
998
999
  text-decoration-skip-ink: none;
999
- text-decoration-thickness: max(var(--utrecht-link-hover-text-decoration-thickness, var(--utrecht-link-text-decoration-thickness)), 1px);
1000
1000
  }
1001
1001
  .utrecht-html a:active {
1002
- color: var(--utrecht-link-active-color, var(--utrecht-link-color));
1002
+ --_utrecht-link-forced-colors-color: activetext;
1003
+ --_utrecht-link-state-color: var(--utrecht-link-active-color);
1003
1004
  }
1004
1005
  .utrecht-html a:focus {
1006
+ --_utrecht-link-state-color: var(--utrecht-link-focus-color);
1007
+ --_utrecht-link-state-text-decoration: var(--utrecht-link-focus-text-decoration);
1008
+ --_utrecht-link-state-text-decoration-thickness: var(--utrecht-link-focus-text-decoration-thickness);
1005
1009
  background-color: var(--utrecht-link-focus-background-color, transparent);
1006
- color: var(--utrecht-link-focus-color, var(--utrecht-link-color));
1007
- text-decoration: var(--utrecht-link-focus-text-decoration, var(--utrecht-link-text-decoration, underline));
1008
1010
  text-decoration-skip: none;
1009
1011
  text-decoration-skip-ink: none;
1010
- text-decoration-thickness: max(var(--utrecht-link-focus-text-decoration-thickness, var(--utrecht-link-text-decoration-thickness)), 1px);
1011
1012
  /* - The browser default focus ring should apply when these CSS custom properties are not set.
1012
1013
  * - Make the `box-shadow` value available, so components that have their own `box-shadow`
1013
1014
  * can combine it with the focus ring box shadow.
package/dist/index.css CHANGED
@@ -2560,6 +2560,25 @@ ol.utrecht-breadcrumb__list {
2560
2560
  font-weight: var(--utrecht-emphasis-strong-font-weight, bold);
2561
2561
  }
2562
2562
 
2563
+ /**
2564
+ * @license EUPL-1.2
2565
+ * Copyright (c) 2021 Robbert Broersma
2566
+ */
2567
+ /**
2568
+ * @license EUPL-1.2
2569
+ * Copyright (c) 2021 Robbert Broersma
2570
+ */
2571
+ .utrecht-figure {
2572
+ margin-block-end: calc(var(--utrecht-space-around, 0) * var(--utrecht-figure-margin-block-end, 0));
2573
+ margin-block-start: calc(var(--utrecht-space-around, 0) * var(--utrecht-figure-margin-block-start, 0));
2574
+ }
2575
+
2576
+ .utrecht-figure__caption {
2577
+ color: var(--utrecht-figure-caption-color);
2578
+ font-size: var(--utrecht-figure-caption-font-size);
2579
+ line-height: var(--utrecht-figure-caption-line-height);
2580
+ }
2581
+
2563
2582
  /**
2564
2583
  * @license EUPL-1.2
2565
2584
  * Copyright (c) 2020-2022 Gemeente Utrecht
@@ -3423,6 +3442,9 @@ however browsers don't seem to have implemented great looking supixel tweening y
3423
3442
  `text-decoration-skip` also makes the transition more challenging to implement.
3424
3443
 
3425
3444
  */
3445
+ /**
3446
+ * Simulate forced-colors mode.
3447
+ */
3426
3448
  /* stylelint-disable-next-line block-no-empty */
3427
3449
  /* stylelint-disable-next-line block-no-empty */
3428
3450
  /* stylelint-disable-next-line block-no-empty */
@@ -3440,11 +3462,15 @@ however browsers don't seem to have implemented great looking supixel tweening y
3440
3462
  /* stylelint-disable-next-line block-no-empty */
3441
3463
  .utrecht-link-button {
3442
3464
  --utrecht-icon-size: var(--utrecht-link-icon-size, 1em);
3443
- color: var(--utrecht-link-color, blue);
3444
- text-decoration: var(--utrecht-link-text-decoration, underline);
3445
- text-decoration-color: var(--utrecht-link-text-decoration-color, currentColor);
3465
+ color: var(--_utrecht-link-state-color, var(--utrecht-link-color, var(--_utrecht-link-forced-colors-color)));
3466
+ /* Only underline `<a href="...">...</a>`, which matches `a:any-link`.
3467
+ * Do not underline `<a name="">Anchor</a>`.
3468
+ */
3469
+ --_utrecht-link-forced-colors-color: linktext;
3470
+ text-decoration-color: var(--_utrecht-link-state-text-decoration-color, var(--utrecht-link-text-decoration-color, currentColor));
3471
+ text-decoration-line: var(--_utrecht-link-state-text-decoration, var(--utrecht-link-text-decoration, underline));
3446
3472
  text-decoration-skip-ink: all;
3447
- text-decoration-thickness: max(var(--utrecht-link-text-decoration-thickness), 1px);
3473
+ text-decoration-thickness: max(var(--_utrecht-link-state-text-decoration-thickness, var(--utrecht-link-text-decoration-thickness)), 1px);
3448
3474
  text-underline-offset: var(--utrecht-link-text-underline-offset);
3449
3475
  --utrecht-icon-size: var(--utrecht-button-icon-size, 1em);
3450
3476
  align-items: center;
@@ -3469,26 +3495,29 @@ however browsers don't seem to have implemented great looking supixel tweening y
3469
3495
  }
3470
3496
 
3471
3497
  .utrecht-link-button--hover, .utrecht-link-button--html-button:not(:disabled):hover {
3472
- color: var(--utrecht-link-hover-color, var(--utrecht-link-color));
3473
- text-decoration: var(--utrecht-link-hover-text-decoration, var(--utrecht-link-text-decoration, underline));
3498
+ --_utrecht-link-forced-colors-color: linktext;
3499
+ --_utrecht-link-state-color: var(--utrecht-link-hover-color);
3500
+ --_utrecht-link-state-text-decoration: var(--utrecht-link-hover-text-decoration);
3501
+ --_utrecht-link-state-text-decoration-thickness: var(--utrecht-link-hover-text-decoration-thickness);
3474
3502
  text-decoration-skip: none;
3475
3503
  text-decoration-skip-ink: none;
3476
- text-decoration-thickness: max(var(--utrecht-link-hover-text-decoration-thickness, var(--utrecht-link-text-decoration-thickness)), 1px);
3477
3504
  }
3478
3505
 
3479
3506
  .utrecht-link-button--disabled {
3480
- color: var(--utrecht-link-placeholder-color, var(--utrecht-link-color));
3481
- cursor: var(--utrecht-action-disabled-cursor);
3482
- text-decoration: none;
3507
+ --_utrecht-link-forced-colors-color: GrayText;
3508
+ --_utrecht-link-state-color: var(--utrecht-link-placeholder-color);
3509
+ cursor: var(--utrecht-action-disabled-cursor, not-allowed);
3510
+ font-weight: var(--utrecht-link-placeholder-font-weight);
3511
+ text-decoration-line: none;
3483
3512
  }
3484
3513
 
3485
3514
  .utrecht-link-button--focus, .utrecht-link-button--html-button:not(:disabled):focus {
3515
+ --_utrecht-link-state-color: var(--utrecht-link-focus-color);
3516
+ --_utrecht-link-state-text-decoration: var(--utrecht-link-focus-text-decoration);
3517
+ --_utrecht-link-state-text-decoration-thickness: var(--utrecht-link-focus-text-decoration-thickness);
3486
3518
  background-color: var(--utrecht-link-focus-background-color, transparent);
3487
- color: var(--utrecht-link-focus-color, var(--utrecht-link-color));
3488
- text-decoration: var(--utrecht-link-focus-text-decoration, var(--utrecht-link-text-decoration, underline));
3489
3519
  text-decoration-skip: none;
3490
3520
  text-decoration-skip-ink: none;
3491
- text-decoration-thickness: max(var(--utrecht-link-focus-text-decoration-thickness, var(--utrecht-link-text-decoration-thickness)), 1px);
3492
3521
  }
3493
3522
 
3494
3523
  .utrecht-link-button--focus-visible, .utrecht-link-button--html-button:focus-visible {
@@ -3506,7 +3535,8 @@ however browsers don't seem to have implemented great looking supixel tweening y
3506
3535
  }
3507
3536
 
3508
3537
  .utrecht-link-button--active, .utrecht-link-button--html-button:not(:disabled):active {
3509
- color: var(--utrecht-link-active-color, var(--utrecht-link-color));
3538
+ --_utrecht-link-forced-colors-color: activetext;
3539
+ --_utrecht-link-state-color: var(--utrecht-link-active-color);
3510
3540
  }
3511
3541
 
3512
3542
  .utrecht-link-button--inline {
@@ -3527,7 +3557,8 @@ however browsers don't seem to have implemented great looking supixel tweening y
3527
3557
  - style `pressed` like the link state `current`, or:
3528
3558
  - add `pressed` design tokens
3529
3559
  */
3530
- color: var(--utrecht-link-active-color, var(--utrecht-link-color));
3560
+ --_utrecht-link-forced-colors-color: activetext;
3561
+ --_utrecht-link-state-color: var(--utrecht-link-active-color);
3531
3562
  }
3532
3563
 
3533
3564
  .utrecht-link-button--html-button {
@@ -3689,6 +3720,9 @@ however browsers don't seem to have implemented great looking supixel tweening y
3689
3720
  `text-decoration-skip` also makes the transition more challenging to implement.
3690
3721
 
3691
3722
  */
3723
+ /**
3724
+ * Simulate forced-colors mode.
3725
+ */
3692
3726
  /* stylelint-disable-next-line block-no-empty */
3693
3727
  /* stylelint-disable-next-line block-no-empty */
3694
3728
  /* stylelint-disable-next-line block-no-empty */
@@ -3700,11 +3734,18 @@ however browsers don't seem to have implemented great looking supixel tweening y
3700
3734
  */
3701
3735
  .utrecht-link {
3702
3736
  --utrecht-icon-size: var(--utrecht-link-icon-size, 1em);
3703
- color: var(--utrecht-link-color, blue);
3704
- text-decoration: var(--utrecht-link-text-decoration, underline);
3705
- text-decoration-color: var(--utrecht-link-text-decoration-color, currentColor);
3737
+ color: var(--_utrecht-link-state-color, var(--utrecht-link-color, var(--_utrecht-link-forced-colors-color)));
3738
+ }
3739
+
3740
+ .utrecht-link:any-link {
3741
+ /* Only underline `<a href="...">...</a>`, which matches `a:any-link`.
3742
+ * Do not underline `<a name="">Anchor</a>`.
3743
+ */
3744
+ --_utrecht-link-forced-colors-color: linktext;
3745
+ text-decoration-color: var(--_utrecht-link-state-text-decoration-color, var(--utrecht-link-text-decoration-color, currentColor));
3746
+ text-decoration-line: var(--_utrecht-link-state-text-decoration, var(--utrecht-link-text-decoration, underline));
3706
3747
  text-decoration-skip-ink: all;
3707
- text-decoration-thickness: max(var(--utrecht-link-text-decoration-thickness), 1px);
3748
+ text-decoration-thickness: max(var(--_utrecht-link-state-text-decoration-thickness, var(--utrecht-link-text-decoration-thickness)), 1px);
3708
3749
  text-underline-offset: var(--utrecht-link-text-underline-offset);
3709
3750
  }
3710
3751
 
@@ -3712,33 +3753,35 @@ however browsers don't seem to have implemented great looking supixel tweening y
3712
3753
  background-image: var(--utrecht-link-icon-left-background-image, none);
3713
3754
  background-position: 0 0.25em;
3714
3755
  background-repeat: no-repeat;
3715
- color: var(--utrecht-link-color, blue);
3756
+ color: var(--utrecht-link-color, LinkText);
3716
3757
  font-weight: var(--utrecht-typography-weight-scale-bold-font-weight);
3717
3758
  padding-inline-start: var(--utrecht-space-block-md);
3718
- text-decoration: none;
3759
+ text-decoration-line: none;
3719
3760
  }
3720
3761
 
3721
- .utrecht-link:visited,
3722
3762
  .utrecht-link--visited {
3723
- color: var(--utrecht-link-visited-color, var(--utrecht-link-color));
3763
+ --_utrecht-link-forced-colors-color: visitedtext;
3764
+ --_utrecht-link-state-color: var(--utrecht-link-visited-color);
3724
3765
  }
3725
3766
 
3726
- .utrecht-link:hover,
3767
+ /* `:hover` should only apply to links with `href`, not on disabled links */
3768
+ .utrecht-link--html-a:any-link:hover,
3727
3769
  .utrecht-link--hover {
3728
- color: var(--utrecht-link-hover-color, var(--utrecht-link-color));
3729
- text-decoration: var(--utrecht-link-hover-text-decoration, var(--utrecht-link-text-decoration, underline));
3770
+ --_utrecht-link-forced-colors-color: linktext;
3771
+ --_utrecht-link-state-color: var(--utrecht-link-hover-color);
3772
+ --_utrecht-link-state-text-decoration: var(--utrecht-link-hover-text-decoration);
3773
+ --_utrecht-link-state-text-decoration-thickness: var(--utrecht-link-hover-text-decoration-thickness);
3730
3774
  text-decoration-skip: none;
3731
3775
  text-decoration-skip-ink: none;
3732
- text-decoration-thickness: max(var(--utrecht-link-hover-text-decoration-thickness, var(--utrecht-link-text-decoration-thickness)), 1px);
3733
3776
  }
3734
3777
 
3735
3778
  .utrecht-link--focus {
3779
+ --_utrecht-link-state-color: var(--utrecht-link-focus-color);
3780
+ --_utrecht-link-state-text-decoration: var(--utrecht-link-focus-text-decoration);
3781
+ --_utrecht-link-state-text-decoration-thickness: var(--utrecht-link-focus-text-decoration-thickness);
3736
3782
  background-color: var(--utrecht-link-focus-background-color, transparent);
3737
- color: var(--utrecht-link-focus-color, var(--utrecht-link-color));
3738
- text-decoration: var(--utrecht-link-focus-text-decoration, var(--utrecht-link-text-decoration, underline));
3739
3783
  text-decoration-skip: none;
3740
3784
  text-decoration-skip-ink: none;
3741
- text-decoration-thickness: max(var(--utrecht-link-focus-text-decoration-thickness, var(--utrecht-link-text-decoration-thickness)), 1px);
3742
3785
  }
3743
3786
 
3744
3787
  .utrecht-link--focus-visible {
@@ -3755,13 +3798,15 @@ however browsers don't seem to have implemented great looking supixel tweening y
3755
3798
  outline-width: var(--utrecht-focus-outline-width, revert);
3756
3799
  }
3757
3800
 
3758
- .utrecht-link:focus {
3801
+ /* `:focus` should only apply to links with `href`, not on disabled links */
3802
+ .utrecht-link--html-span:focus,
3803
+ .utrecht-link--html-a:any-link:focus {
3804
+ --_utrecht-link-state-color: var(--utrecht-link-focus-color);
3805
+ --_utrecht-link-state-text-decoration: var(--utrecht-link-focus-text-decoration);
3806
+ --_utrecht-link-state-text-decoration-thickness: var(--utrecht-link-focus-text-decoration-thickness);
3759
3807
  background-color: var(--utrecht-link-focus-background-color, transparent);
3760
- color: var(--utrecht-link-focus-color, var(--utrecht-link-color));
3761
- text-decoration: var(--utrecht-link-focus-text-decoration, var(--utrecht-link-text-decoration, underline));
3762
3808
  text-decoration-skip: none;
3763
3809
  text-decoration-skip-ink: none;
3764
- text-decoration-thickness: max(var(--utrecht-link-focus-text-decoration-thickness, var(--utrecht-link-text-decoration-thickness)), 1px);
3765
3810
  /* - The browser default focus ring should apply when these CSS custom properties are not set.
3766
3811
  * - Make the `box-shadow` value available, so components that have their own `box-shadow`
3767
3812
  * can combine it with the focus ring box shadow.
@@ -3775,34 +3820,62 @@ however browsers don't seem to have implemented great looking supixel tweening y
3775
3820
  outline-width: var(--utrecht-focus-outline-width, revert);
3776
3821
  }
3777
3822
 
3778
- .utrecht-link:focus:not(:focus-visible) {
3823
+ .utrecht-link--html-span:focus:not(:focus-visible),
3824
+ .utrecht-link--html-a:any-link:focus:not(:focus-visible) {
3779
3825
  /* undo focus ring */
3780
3826
  box-shadow: none;
3781
3827
  outline-style: revert;
3782
3828
  }
3783
3829
 
3784
- .utrecht-link:active,
3830
+ .utrecht-link--html-span:active,
3831
+ .utrecht-link--html-a:any-link:active,
3785
3832
  .utrecht-link--active {
3786
- color: var(--utrecht-link-active-color, var(--utrecht-link-color));
3833
+ --_utrecht-link-forced-colors-color: activetext;
3834
+ --_utrecht-link-state-color: var(--utrecht-link-active-color);
3787
3835
  }
3788
3836
 
3789
3837
  .utrecht-link--telephone {
3790
3838
  white-space: nowrap;
3791
3839
  }
3792
3840
 
3793
- .utrecht-link--box-content {
3841
+ .utrecht-link--current {
3842
+ cursor: var(--utrecht-action-inert-cursor, normal);
3843
+ font-weight: var(--utrecht-link-current-font-weight);
3844
+ }
3845
+
3846
+ .utrecht-link--box-content:any-link {
3794
3847
  color: unset;
3795
3848
  display: inline-block;
3796
- text-decoration: unset;
3849
+ text-decoration-line: unset;
3797
3850
  text-decoration-skip-ink: unset;
3798
3851
  text-decoration-thickness: unset;
3799
3852
  text-underline-offset: unset;
3800
3853
  }
3801
3854
 
3802
3855
  .utrecht-link--placeholder {
3803
- color: var(--utrecht-link-placeholder-color, var(--utrecht-link-color));
3804
- cursor: var(--utrecht-action-disabled-cursor);
3805
- text-decoration: none;
3856
+ --_utrecht-link-forced-colors-color: GrayText;
3857
+ --_utrecht-link-state-color: var(--utrecht-link-placeholder-color);
3858
+ cursor: var(--utrecht-action-disabled-cursor, not-allowed);
3859
+ font-weight: var(--utrecht-link-placeholder-font-weight);
3860
+ text-decoration-line: none;
3861
+ }
3862
+
3863
+ /**
3864
+ * Simulate forced-colors mode.
3865
+ */
3866
+ .utrecht-link--forced-colors {
3867
+ /* Some others choose `transparent` to trigger `currentColor` for `inverse-outline-color`,
3868
+ * however this doesn't guarantee significant contrast between `outline-color` and `inverse-outline-color`.
3869
+ * That's why we use `Highlight` vs `HighlightText`.
3870
+ */
3871
+ --utrecht-focus-outline-color: Highlight;
3872
+ --utrecht-focus-inverse-outline-color: HighlightText;
3873
+ --utrecht-link-color: linktext;
3874
+ --utrecht-link-hover-color: linktext;
3875
+ --utrecht-link-focus-color: linktext;
3876
+ --utrecht-link-active-color: activetext;
3877
+ --utrecht-link-visited-color: visitedtext;
3878
+ --utrecht-link-placeholder-color: GrayText;
3806
3879
  }
3807
3880
 
3808
3881
  /**
@@ -3951,6 +4024,47 @@ however browsers don't seem to have implemented great looking supixel tweening y
3951
4024
  justify-content: center;
3952
4025
  }
3953
4026
 
4027
+ /**
4028
+ * @license EUPL-1.2
4029
+ * Copyright (c) 2021 The Knights Who Say NIH! B.V.
4030
+ * Copyright (c) 2021 Gemeente Utrecht
4031
+ */
4032
+ /**
4033
+ * @license EUPL-1.2
4034
+ * Copyright (c) 2021 Gemeente Utrecht
4035
+ * Copyright (c) 2021 Robbert Broersma
4036
+ */
4037
+ .utrecht-mark {
4038
+ background-color: var(--utrecht-mark-background-color, revert);
4039
+ color: var(--utrecht-mark-color, revert);
4040
+ }
4041
+ @media print {
4042
+ .utrecht-mark {
4043
+ outline-color: currentColor;
4044
+ outline-style: dotted;
4045
+ outline-width: 0.1em;
4046
+ }
4047
+ }
4048
+ @media screen and (-ms-high-contrast: active) {
4049
+ .utrecht-mark {
4050
+ background-color: Highlight;
4051
+ color: HighlightText;
4052
+ }
4053
+ }
4054
+
4055
+ /* class name available only for Storybook */
4056
+ .utrecht-mark--print {
4057
+ outline-color: currentColor;
4058
+ outline-style: dotted;
4059
+ outline-width: 0.1em;
4060
+ }
4061
+
4062
+ /* class name available only for Storybook */
4063
+ .utrecht-mark--windows-high-contrast {
4064
+ background-color: Highlight;
4065
+ color: HighlightText;
4066
+ }
4067
+
3954
4068
  /**
3955
4069
  * @license EUPL-1.2
3956
4070
  * Copyright (c) 2021 Gemeente Utrecht
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.0-alpha.568",
2
+ "version": "1.0.0-alpha.569",
3
3
  "author": "Community for NL Design System",
4
4
  "description": "Component library bundle for the Municipality of Utrecht based on the NL Design System architecture",
5
5
  "license": "EUPL-1.2",
@@ -26,5 +26,5 @@
26
26
  "clean": "rimraf dist/"
27
27
  },
28
28
  "main": "dist/index.css",
29
- "gitHead": "5a5b58bc414ac0446511a8c1140a1639e9d60192"
29
+ "gitHead": "7c03dd014bd1c699a48fb3f0425c60dcf501b974"
30
30
  }