@decidables/discountable-elements 0.6.5 → 0.7.0

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.
@@ -10194,18 +10194,6 @@
10194
10194
  getComputedStyleValue(property) {
10195
10195
  return getComputedStyle(this).getPropertyValue(property).trim();
10196
10196
  }
10197
- firstUpdated(changedProperties) {
10198
- super.firstUpdated(changedProperties);
10199
-
10200
- // Use focus highlighting if keyboard is used at all
10201
- select(this.renderRoot.host).classed('keyboard', true).on('mousemove.keyboard touchstart.keyboard', event => {
10202
- const element = event.currentTarget;
10203
- select(element.renderRoot.host).classed('keyboard', false).on('mousemove.keyboard touchstart.keyboard', null);
10204
- }).on('keydown.keyboard', event => {
10205
- const element = event.currentTarget;
10206
- select(element.renderRoot.host).classed('keyboard', true).on('keydown.keyboard mousemove.keyboard touchstart.keyboard', null);
10207
- });
10208
- }
10209
10197
  static get greys() {
10210
10198
  const grey = '#999999';
10211
10199
  const greys = {};
@@ -10341,7 +10329,7 @@
10341
10329
  };
10342
10330
  /* eslint-enable key-spacing, object-curly-newline */
10343
10331
  }
10344
- static cssBoxShadow(elevation, rotate = false, inverse = false) {
10332
+ static cssBoxShadow(elevation, inverse = false) {
10345
10333
  const umbraO = this.shadows.opacityUmbra + this.shadows.opacityBoost;
10346
10334
  const penumbraO = this.shadows.opacityPenumbra + this.shadows.opacityBoost;
10347
10335
  const ambientO = this.shadows.opacityAmbient + this.shadows.opacityBoost;
@@ -10351,9 +10339,9 @@
10351
10339
  const umbraM = this.shadows.mapUmbra[elevation];
10352
10340
  const penumbraM = this.shadows.mapPenumbra[elevation];
10353
10341
  const ambientM = this.shadows.mapAmbient[elevation];
10354
- const umbraS = rotate ? `${-umbraM.y}px ${umbraM.y / 2}px ${umbraM.b}px ${umbraM.s}px` : `${umbraM.y / 2}px ${umbraM.y}px ${umbraM.b}px ${umbraM.s}px`;
10355
- const penumbraS = rotate ? `${-penumbraM.y}px ${penumbraM.y / 2}px ${penumbraM.b}px ${penumbraM.s}px` : `${penumbraM.y / 2}px ${penumbraM.y}px ${penumbraM.b}px ${penumbraM.s}px`;
10356
- const ambientS = rotate ? `${-ambientM.y}px ${ambientM.y / 2}px ${ambientM.b}px ${ambientM.s}px` : `${ambientM.y / 2}px ${ambientM.y}px ${ambientM.b}px ${ambientM.s}px`;
10342
+ const umbraS = `${umbraM.y / 2}px ${umbraM.y}px ${umbraM.b}px ${umbraM.s}px`;
10343
+ const penumbraS = `${penumbraM.y / 2}px ${penumbraM.y}px ${penumbraM.b}px ${penumbraM.s}px`;
10344
+ const ambientS = `${ambientM.y / 2}px ${ambientM.y}px ${ambientM.b}px ${ambientM.s}px`;
10357
10345
  return `${umbraS} ${umbraC}, ${penumbraS} ${penumbraC}, ${ambientS} ${ambientC}`;
10358
10346
  }
10359
10347
  static get svgFilters() {
@@ -10489,49 +10477,58 @@
10489
10477
  button {
10490
10478
  width: 100%;
10491
10479
  height: 100%;
10480
+
10492
10481
  padding: 0.375rem 0.75rem;
10493
10482
 
10494
10483
  font-family: var(---font-family-base);
10495
10484
  font-size: 1.125rem;
10485
+
10496
10486
  line-height: 1.5;
10487
+
10497
10488
  color: var(---color-text-inverse);
10498
10489
 
10490
+ outline: none;
10491
+
10499
10492
  border: 0;
10500
10493
  border-radius: var(---border-radius);
10501
- outline: none;
10502
10494
  }
10503
10495
 
10504
10496
  button:disabled {
10505
- background-color: var(---decidables-button-background-color-disabled);
10506
10497
  outline: none;
10498
+
10499
+ background-color: var(---decidables-button-background-color-disabled);
10507
10500
  box-shadow: none;
10508
10501
  }
10509
10502
 
10510
10503
  button:enabled {
10511
10504
  cursor: pointer;
10505
+ outline: none;
10512
10506
 
10513
10507
  background-color: var(---decidables-button-background-color-enabled);
10514
- outline: none;
10515
10508
  box-shadow: var(---shadow-2);
10516
10509
  }
10517
10510
 
10518
10511
  button:enabled:hover {
10519
10512
  outline: none;
10513
+
10520
10514
  box-shadow: var(---shadow-4);
10521
10515
  }
10522
10516
 
10523
10517
  button:enabled:active {
10524
10518
  outline: none;
10519
+
10525
10520
  box-shadow: var(---shadow-8);
10526
10521
  }
10527
10522
 
10528
- :host(.keyboard) button:enabled:focus {
10523
+ button:enabled:focus-visible {
10529
10524
  outline: none;
10525
+
10530
10526
  box-shadow: var(---shadow-4);
10531
10527
  }
10532
10528
 
10533
- :host(.keyboard) button:enabled:focus:active {
10529
+ button:enabled:focus-visible:active {
10534
10530
  outline: none;
10531
+
10535
10532
  box-shadow: var(---shadow-8);
10536
10533
  }
10537
10534
  `];
@@ -10648,10 +10645,6 @@
10648
10645
  ---decidables-slider-color: var(--decidables-slider-color, var(---color-element-enabled));
10649
10646
  ---decidables-spinner-background-color: var(--decidables-slider-background-color, none);
10650
10647
 
10651
- ---shadow-2-rotate: var(--shadow-2-rotate, ${r$4(this.cssBoxShadow(2, true, false))});
10652
- ---shadow-4-rotate: var(--shadow-4-rotate, ${r$4(this.cssBoxShadow(4, true, false))});
10653
- ---shadow-8-rotate: var(--shadow-8-rotate, ${r$4(this.cssBoxShadow(8, true, false))});
10654
-
10655
10648
  display: flex;
10656
10649
 
10657
10650
  flex-direction: column;
@@ -10666,12 +10659,14 @@
10666
10659
 
10667
10660
  .range {
10668
10661
  position: relative;
10662
+
10669
10663
  display: flex;
10670
10664
 
10671
10665
  flex-direction: row;
10672
10666
 
10673
10667
  width: 3.5rem;
10674
10668
  height: 4.75rem;
10669
+
10675
10670
  margin: 0 0.25rem 0.25rem;
10676
10671
  }
10677
10672
 
@@ -10683,21 +10678,20 @@
10683
10678
  background: var(---decidables-spinner-background-color);
10684
10679
  }
10685
10680
 
10686
- /* Adapted from http://danielstern.ca/range.css/#/ */
10687
10681
  /* Overall */
10688
10682
  input[type=range] {
10689
- width: 4.75rem;
10690
- height: 3.5rem;
10683
+ width: 3.5rem;
10684
+ height: 4.75rem;
10685
+
10691
10686
  padding: 0;
10692
10687
  margin: 0;
10688
+
10689
+ appearance: none;
10693
10690
 
10694
10691
  background-color: unset;
10695
10692
 
10696
- transform: rotate(-90deg);
10697
- transform-origin: 2.375rem 2.375rem;
10698
-
10699
- /* stylelint-disable-next-line property-no-vendor-prefix */
10700
- -webkit-appearance: none;
10693
+ direction: rtl;
10694
+ writing-mode: vertical-lr;
10701
10695
  }
10702
10696
 
10703
10697
  input[type=range]:enabled {
@@ -10708,16 +10702,10 @@
10708
10702
  outline: none;
10709
10703
  }
10710
10704
 
10711
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10712
- input[type=range]::-ms-tooltip {
10713
- display: none;
10714
- }
10715
-
10716
10705
  /* Track */
10717
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10718
10706
  input[type=range]::-webkit-slider-runnable-track {
10719
- width: 100%;
10720
- height: 4px;
10707
+ width: 4px;
10708
+ height: 100%;
10721
10709
 
10722
10710
  background: var(---decidables-slider-background-color);
10723
10711
  border: 0;
@@ -10729,10 +10717,9 @@
10729
10717
  background: var(---decidables-slider-background-color);
10730
10718
  }
10731
10719
 
10732
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10733
10720
  input[type=range]::-moz-range-track {
10734
- width: 100%;
10735
- height: 4px;
10721
+ width: 4px;
10722
+ height: 100%;
10736
10723
 
10737
10724
  background: var(---decidables-slider-background-color);
10738
10725
  border: 0;
@@ -10740,57 +10727,17 @@
10740
10727
  box-shadow: none;
10741
10728
  }
10742
10729
 
10743
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10744
- input[type=range]::-ms-track {
10745
- width: 100%;
10746
- height: 4px;
10747
-
10748
- color: transparent;
10749
-
10750
- background: transparent;
10751
- border-color: transparent;
10752
- }
10753
-
10754
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10755
- input[type=range]::-ms-fill-lower {
10756
- background: #cccccc;
10757
- /* background: var(---decidables-slider-background-color); */
10758
- border: 0;
10759
- border-radius: 2px;
10760
- box-shadow: none;
10761
- }
10762
-
10763
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10764
- input[type=range]::-ms-fill-upper {
10765
- background: #cccccc;
10766
- /* background: var(---decidables-slider-background-color); */
10767
- border: 0;
10768
- border-radius: 2px;
10769
- box-shadow: none;
10770
- }
10771
-
10772
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10773
- input[type=range]:focus::-ms-fill-lower {
10774
- background: var(---decidables-slider-background-color);
10775
- }
10776
-
10777
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10778
- input[type=range]:focus::-ms-fill-upper {
10779
- background: var(---decidables-slider-background-color);
10780
- }
10781
-
10782
10730
  /* Thumb */
10783
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10784
10731
  input[type=range]::-webkit-slider-thumb {
10785
- width: 10px;
10786
- height: 20px;
10787
- margin-top: -8px;
10732
+ width: 20px;
10733
+ height: 10px;
10734
+
10735
+ margin-left: -8px;
10736
+
10737
+ appearance: none;
10788
10738
 
10789
10739
  border: 0;
10790
10740
  border-radius: 4px;
10791
-
10792
- /* stylelint-disable-next-line property-no-vendor-prefix */
10793
- -webkit-appearance: none;
10794
10741
  }
10795
10742
 
10796
10743
  input[type=range]:disabled::-webkit-slider-thumb {
@@ -10800,112 +10747,65 @@
10800
10747
 
10801
10748
  input[type=range]:enabled::-webkit-slider-thumb {
10802
10749
  background: var(---decidables-slider-color);
10803
- box-shadow: var(---shadow-2-rotate);
10750
+ box-shadow: var(---shadow-2);
10804
10751
  }
10805
10752
 
10806
10753
  input[type=range]:enabled:hover::-webkit-slider-thumb {
10807
- box-shadow: var(---shadow-4-rotate);
10754
+ box-shadow: var(---shadow-4);
10808
10755
  }
10809
10756
 
10810
10757
  input[type=range]:enabled:active::-webkit-slider-thumb {
10811
- box-shadow: var(---shadow-8-rotate);
10758
+ box-shadow: var(---shadow-8);
10812
10759
  }
10813
10760
 
10814
- :host(.keyboard) input[type=range]:enabled:focus::-webkit-slider-thumb {
10815
- box-shadow: var(---shadow-4-rotate);
10761
+ input[type=range]:enabled:focus-visible::-webkit-slider-thumb {
10762
+ box-shadow: var(---shadow-4);
10816
10763
  }
10817
10764
 
10818
- :host(.keyboard) input[type=range]:focus:active::-webkit-slider-thumb {
10819
- box-shadow: var(---shadow-8-rotate);
10765
+ input[type=range]:enabled:focus-visible:active::-webkit-slider-thumb {
10766
+ box-shadow: var(---shadow-8);
10820
10767
  }
10821
10768
 
10822
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10823
10769
  input[type=range]::-moz-range-thumb {
10824
- width: 10px;
10825
- height: 20px;
10770
+ width: 20px;
10771
+ height: 10px;
10826
10772
 
10827
10773
  border: 0;
10828
10774
  border-radius: 4px;
10829
10775
  }
10830
10776
 
10831
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10832
10777
  input[type=range]:disabled::-moz-range-thumb {
10833
10778
  background: var(---decidables-slider-background-color);
10834
10779
  box-shadow: none;
10835
10780
  }
10836
10781
 
10837
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10838
10782
  input[type=range]:enabled::-moz-range-thumb {
10839
10783
  background: var(---decidables-slider-color);
10840
- box-shadow: var(---shadow-2-rotate);
10784
+ box-shadow: var(---shadow-2);
10841
10785
  }
10842
10786
 
10843
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10844
10787
  input[type=range]:enabled:hover::-moz-range-thumb {
10845
- box-shadow: var(---shadow-4-rotate);
10788
+ box-shadow: var(---shadow-4);
10846
10789
  }
10847
10790
 
10848
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10849
10791
  input[type=range]:enabled:active::-moz-range-thumb {
10850
- box-shadow: var(---shadow-8-rotate);
10851
- }
10852
-
10853
- :host(.keyboard) input[type=range]:enabled:focus::-moz-range-thumb {
10854
- box-shadow: var(---shadow-4-rotate);
10855
- }
10856
-
10857
- :host(.keyboard) input[type=range]:enabled:focus:active::-moz-range-thumb {
10858
- box-shadow: var(---shadow-8-rotate);
10859
- }
10860
-
10861
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10862
- input[type=range]::-ms-thumb {
10863
- width: 10px;
10864
- height: 20px;
10865
- margin-top: 0;
10866
-
10867
- background: #999999;
10868
- /* background: var(---color-element-enabled); */
10869
- border: 0;
10870
- border-radius: 4px;
10871
- box-shadow: var(---shadow-2-rotate);
10872
- }
10873
-
10874
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10875
- input[type=range]:disabled::-ms-thumb {
10876
- background: var(---decidables-slider-background-color);
10877
- box-shadow: none;
10878
- }
10879
-
10880
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10881
- input[type=range]:enabled::-ms-thumb {
10882
- background: var(---decidables-slider-color);
10883
- box-shadow: var(---shadow-2-rotate);
10884
- }
10885
-
10886
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10887
- input[type=range]:enabled:hover::-ms-thumb {
10888
- box-shadow: var(---shadow-4-rotate);
10889
- }
10890
-
10891
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10892
- input[type=range]:enabled:active::-ms-thumb {
10893
- box-shadow: var(---shadow-8-rotate);
10792
+ box-shadow: var(---shadow-8);
10894
10793
  }
10895
10794
 
10896
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10897
- :host(.keyboard) input[type=range]:enabled:focus::-ms-thumb {
10898
- box-shadow: var(---shadow-4-rotate);
10795
+ input[type=range]:enabled:focus-visible::-moz-range-thumb {
10796
+ box-shadow: var(---shadow-4);
10899
10797
  }
10900
10798
 
10901
- :host(.keyboard) input[type=range]:enabled:focus:active::-ms-thumb {
10902
- box-shadow: var(---shadow-8-rotate);
10799
+ input[type=range]:enabled:focus-visible:active::-moz-range-thumb {
10800
+ box-shadow: var(---shadow-8);
10903
10801
  }
10904
10802
 
10905
- datalist {
10803
+ /* Tick marks */
10804
+ .datalist {
10906
10805
  position: absolute;
10907
10806
  left: 2rem;
10908
10807
  z-index: -1;
10808
+
10909
10809
  display: flex;
10910
10810
 
10911
10811
  flex-direction: column;
@@ -10918,14 +10818,13 @@
10918
10818
  font-size: 0.75rem;
10919
10819
  }
10920
10820
 
10921
- option {
10922
- padding: 0;
10923
-
10821
+ .option {
10924
10822
  line-height: 0.8;
10925
- min-block-size: 0;
10823
+
10824
+ white-space: nowrap;
10926
10825
  }
10927
10826
 
10928
- option::before {
10827
+ .option::before {
10929
10828
  content: "– ";
10930
10829
  }
10931
10830
  `];
@@ -10938,10 +10837,10 @@
10938
10837
  <div class="range">
10939
10838
  <input ?disabled=${this.disabled} type="range" id="slider" min=${o$2(this.rangeMin)} max=${o$2(this.rangeMax)} step=${o$2(this.rangeStep)} .value=${this.rangeValue} @change=${this.rangeChanged.bind(this)} @input=${this.rangeInputted.bind(this)}>
10940
10839
  ${this.scale ? x$2`
10941
- <datalist id="ticks">
10942
- <option value=${o$2(this.rangeMax)} label=${o$2(this.max)}></option>
10943
- <option value=${o$2(this.rangeMin)} label=${o$2(this.min)}></option>
10944
- </datalist>
10840
+ <div class="datalist">
10841
+ <div class="option">${o$2(this.max)}</div>
10842
+ <div class="option">${o$2(this.min)}</div>
10843
+ </div>
10945
10844
  ` : x$2``}
10946
10845
  </div>
10947
10846
  <decidables-spinner ?disabled=${this.disabled} min=${o$2(this.min)} max=${o$2(this.max)} step=${o$2(this.step)} .value=${this.value} @input=${this.spinnerInputted.bind(this)}></decidables-spinner>
@@ -11001,13 +10900,14 @@
11001
10900
  ---decidables-spinner-prefix: var(--decidables-spinner-prefix, "");
11002
10901
 
11003
10902
  ---decidables-spinner-postfix: var(--decidables-spinner-postfix, "");
11004
- ---decidables-spinner-postfix-padding: var(--decidables-spinner-postfix-padding, 0);
10903
+ ---decidables-spinner-postfix-padding: var(--decidables-spinner-postfix-padding, 0rem);
11005
10904
 
11006
10905
  display: block;
11007
10906
  }
11008
10907
 
11009
10908
  label {
11010
10909
  position: relative;
10910
+
11011
10911
  display: flex;
11012
10912
 
11013
10913
  flex-direction: column;
@@ -11025,6 +10925,7 @@
11025
10925
  left: calc(50% - var(---decidables-spinner-input-width) / 2 + 0.25rem);
11026
10926
 
11027
10927
  font-size: var(---decidables-spinner-font-size);
10928
+
11028
10929
  line-height: normal;
11029
10930
 
11030
10931
  content: var(---decidables-spinner-prefix);
@@ -11036,6 +10937,7 @@
11036
10937
  bottom: 1px;
11037
10938
 
11038
10939
  font-size: var(---decidables-spinner-font-size);
10940
+
11039
10941
  line-height: normal;
11040
10942
 
11041
10943
  content: var(---decidables-spinner-postfix);
@@ -11043,20 +10945,24 @@
11043
10945
 
11044
10946
  input[type=number] {
11045
10947
  width: var(---decidables-spinner-input-width);
11046
- padding-right: var(---decidables-spinner-postfix-padding);
10948
+
10949
+ padding: 1px var(---decidables-spinner-postfix-padding) 1px 2px;
10950
+ margin: 0;
11047
10951
 
11048
10952
  font-family: var(---font-family-base);
11049
10953
  font-size: var(---decidables-spinner-font-size);
10954
+
11050
10955
  color: inherit;
10956
+
11051
10957
  text-align: right;
11052
10958
 
10959
+ appearance: none;
10960
+ outline: none;
10961
+
11053
10962
  background: none;
11054
10963
  border: 0;
11055
10964
  border-radius: 0;
11056
- outline: none;
11057
10965
  box-shadow: var(---shadow-2);
11058
-
11059
- -webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */
11060
10966
  }
11061
10967
 
11062
10968
  input[type=number]:hover {
@@ -11073,20 +10979,54 @@
11073
10979
 
11074
10980
  border: 0;
11075
10981
  box-shadow: none;
10982
+ }
10983
+
10984
+ /* HACK: Manage spinners in Firefox */
10985
+ @supports (-moz-appearance: textfield) {
10986
+ input[type=number] {
10987
+ padding-right: calc(18px + var(---decidables-spinner-postfix-padding));
10988
+
10989
+ appearance: textfield;
10990
+ }
10991
+
10992
+ input[type=number]:hover,
10993
+ input[type=number]:focus,
10994
+ input[type=number]:active {
10995
+ padding-right: var(---decidables-spinner-postfix-padding);
10996
+
10997
+ appearance: none;
10998
+ }
10999
+
11000
+ input[type=number]:disabled {
11001
+ padding-right: calc(18px + var(---decidables-spinner-postfix-padding));
11002
+
11003
+ appearance: textfield;
11004
+ }
11005
+ }
11006
+
11007
+ /* HACK: Manage spinners in Chrome/Edge/Safari */
11008
+ input[type=number]::-webkit-inner-spin-button {
11009
+ /* Avoid oversized spinners in Safari */
11010
+ font-size: 1.125rem;
11011
+
11012
+ opacity: 0;
11013
+ }
11076
11014
 
11077
- /* HACK: Use correct text color in Safari */
11078
- -webkit-opacity: 1;
11079
- /* HACK: Hide spinners in disabled input for Firefox and Safari */
11080
- -moz-appearance: textfield; /* stylelint-disable-line property-no-vendor-prefix */
11081
- /* HACK: Use correct text color in Safari */
11082
- -webkit-text-fill-color: var(---color-text);
11015
+ input[type=number]:hover::-webkit-inner-spin-button,
11016
+ input[type=number]:focus::-webkit-inner-spin-button,
11017
+ input[type=number]:active::-webkit-inner-spin-button {
11018
+ opacity: 1;
11083
11019
  }
11084
11020
 
11085
- /* HACK: Hide spinners in disabled input for Firefox and Safari */
11086
- input[type=number]:disabled::-webkit-outer-spin-button,
11087
11021
  input[type=number]:disabled::-webkit-inner-spin-button {
11088
- margin: 0;
11089
- -webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */
11022
+ opacity: 0;
11023
+ }
11024
+
11025
+ /* HACK: Adjust padding on mobile w/o spinners */
11026
+ @media only screen and (hover: none) and (pointer: coarse) {
11027
+ input[type=number] {
11028
+ padding-right: calc(1.125rem + var(---decidables-spinner-postfix-padding));
11029
+ }
11090
11030
  }
11091
11031
  `];
11092
11032
  }
@@ -11150,13 +11090,16 @@
11150
11090
 
11151
11091
  width: 1px;
11152
11092
  height: 1px;
11093
+
11153
11094
  padding: 0;
11154
11095
  margin: -1px;
11096
+
11155
11097
  overflow: hidden;
11156
11098
 
11157
11099
  white-space: nowrap;
11158
11100
 
11159
11101
  border: 0;
11102
+
11160
11103
  clip-path: inset(100%); /* May cause a performance issue: https://github.com/h5bp/html5-boilerplate/issues/2021 */
11161
11104
  }
11162
11105
 
@@ -11172,6 +11115,7 @@
11172
11115
  position: relative;
11173
11116
 
11174
11117
  min-width: 24px;
11118
+
11175
11119
  padding: 0 0 36px;
11176
11120
  margin: 0.25rem 0.25rem 0;
11177
11121
 
@@ -11183,17 +11127,17 @@
11183
11127
  input[type=checkbox] + label + label::before,
11184
11128
  input[type=checkbox] + label + label::after {
11185
11129
  position: absolute;
11186
-
11187
11130
  left: 50%;
11188
11131
 
11189
11132
  margin: 0;
11190
11133
 
11191
- content: "";
11192
-
11193
11134
  outline: 0;
11194
11135
 
11195
- transition: all var(---transition-duration) ease;
11136
+ content: "";
11137
+
11196
11138
  transform: translate(-50%, 0);
11139
+
11140
+ transition: all var(---transition-duration) ease;
11197
11141
  }
11198
11142
 
11199
11143
  input[type=checkbox] + label + label::before {
@@ -11241,17 +11185,14 @@
11241
11185
  box-shadow: var(---shadow-8);
11242
11186
  }
11243
11187
 
11244
- /* stylelint-disable-next-line selector-max-compound-selectors */
11245
- :host(.keyboard) input[type=checkbox]:enabled:focus + label + label::after {
11188
+ input[type=checkbox]:enabled:focus-visible + label + label::after {
11246
11189
  box-shadow: var(---shadow-4);
11247
11190
  }
11248
11191
 
11249
- /* stylelint-disable selector-max-compound-selectors */
11250
- :host(.keyboard) input[type=checkbox]:enabled:focus + label + label:active::after,
11251
- :host(.keyboard) input[type=checkbox]:enabled:focus:active + label + label::after {
11192
+ input[type=checkbox]:enabled:focus-visible + label + label:active::after,
11193
+ input[type=checkbox]:enabled:focus-visible:active + label + label::after {
11252
11194
  box-shadow: var(---shadow-8);
11253
11195
  }
11254
- /* stylelint-enable selector-max-compound-selectors */
11255
11196
  `];
11256
11197
  }
11257
11198
  render() {
@@ -11371,39 +11312,46 @@
11371
11312
 
11372
11313
  width: 1px;
11373
11314
  height: 1px;
11315
+
11374
11316
  padding: 0;
11375
11317
  margin: -1px;
11318
+
11376
11319
  overflow: hidden;
11377
11320
 
11378
11321
  white-space: nowrap;
11379
11322
 
11380
11323
  border: 0;
11324
+
11381
11325
  clip-path: inset(100%); /* May cause a performance issue: https://github.com/h5bp/html5-boilerplate/issues/2021 */
11382
11326
  }
11383
11327
 
11384
11328
  input[type=radio] + label {
11385
11329
  width: 100%;
11330
+
11386
11331
  padding: 0.375rem 0.75rem;
11387
11332
 
11388
11333
  font-family: var(---font-family-base);
11389
11334
  font-size: 1.125rem;
11335
+
11390
11336
  line-height: 1.5;
11337
+
11391
11338
  color: var(---color-text-inverse);
11339
+
11392
11340
  text-align: center;
11393
11341
 
11394
11342
  cursor: pointer;
11343
+ outline: none;
11395
11344
 
11396
11345
  background-color: var(---color-element-enabled);
11397
11346
  border: 0;
11398
11347
  border-radius: 0;
11399
- outline: none;
11400
-
11401
11348
  box-shadow: var(---shadow-2);
11402
11349
  }
11403
11350
 
11404
11351
  input[type=radio]:checked + label {
11405
- background-color: var(---color-element-selected);
11406
11352
  outline: none;
11353
+
11354
+ background-color: var(---color-element-selected);
11407
11355
  box-shadow: var(---shadow-2);
11408
11356
  }
11409
11357
 
@@ -11411,6 +11359,7 @@
11411
11359
  z-index: 1;
11412
11360
 
11413
11361
  outline: none;
11362
+
11414
11363
  box-shadow: var(---shadow-4);
11415
11364
  }
11416
11365
 
@@ -11418,6 +11367,7 @@
11418
11367
  z-index: 2;
11419
11368
 
11420
11369
  outline: none;
11370
+
11421
11371
  box-shadow: var(---shadow-8);
11422
11372
  }
11423
11373
 
@@ -11431,25 +11381,28 @@
11431
11381
  border-bottom-left-radius: 0.25rem;
11432
11382
  }
11433
11383
 
11434
- :host(.keyboard) input[type=radio]:focus + label {
11384
+ input[type=radio]:focus-visible + label {
11435
11385
  z-index: 1;
11436
11386
 
11437
11387
  outline: none;
11388
+
11438
11389
  box-shadow: var(---shadow-4);
11439
11390
  }
11440
11391
 
11441
- :host(.keyboard) input[type=radio]:focus:checked + label {
11392
+ input[type=radio]:focus-visible:checked + label {
11442
11393
  z-index: 1;
11443
11394
 
11444
- background-color: var(---color-element-selected);
11445
11395
  outline: none;
11396
+
11397
+ background-color: var(---color-element-selected);
11446
11398
  box-shadow: var(---shadow-4);
11447
11399
  }
11448
11400
 
11449
- :host(.keyboard) input[type=radio]:focus + label:active {
11401
+ input[type=radio]:focus-visible + label:active {
11450
11402
  z-index: 2;
11451
11403
 
11452
11404
  outline: none;
11405
+
11453
11406
  box-shadow: var(---shadow-8);
11454
11407
  }
11455
11408
  `];
@@ -11929,6 +11882,7 @@
11929
11882
 
11930
11883
  width: 5.25rem;
11931
11884
  height: 3.5rem;
11885
+
11932
11886
  padding: 0.375rem 0.75rem;
11933
11887
  margin: 0.25rem;
11934
11888
 
@@ -12454,11 +12408,13 @@
12454
12408
 
12455
12409
  .addend {
12456
12410
  position: relative;
12411
+
12457
12412
  display: inline-block;
12458
12413
  }
12459
12414
 
12460
12415
  .comparison {
12461
12416
  position: relative;
12417
+
12462
12418
  display: inline-block;
12463
12419
 
12464
12420
  font-size: 125%;
@@ -13022,8 +12978,9 @@
13022
12978
  }
13023
12979
 
13024
12980
  .option .interactive {
13025
- filter: url("#shadow-2");
13026
12981
  outline: none;
12982
+
12983
+ filter: url("#shadow-2");
13027
12984
  }
13028
12985
 
13029
12986
  .option .interactive:hover {
@@ -13041,7 +12998,7 @@
13041
12998
  transform: translateY(0);
13042
12999
  }
13043
13000
 
13044
- :host(.keyboard) .option .interactive:focus-within {
13001
+ .option .interactive:focus-visible {
13045
13002
  filter: url("#shadow-8");
13046
13003
 
13047
13004
  /* HACK: This gets Safari to correctly apply the filter! */
@@ -13062,7 +13019,7 @@
13062
13019
  transform: translateY(0);
13063
13020
  }
13064
13021
 
13065
- :host(.keyboard) .body.interactive:has(~ .point:focus-within) {
13022
+ .body.interactive:has(~ .point:focus-visible) {
13066
13023
  filter: url("#shadow-8");
13067
13024
 
13068
13025
  /* HACK: This gets Safari to correctly apply the filter! */
@@ -13095,7 +13052,6 @@
13095
13052
 
13096
13053
  .interactive .fill {
13097
13054
  cursor: move;
13098
-
13099
13055
  outline: none;
13100
13056
  }
13101
13057
 
@@ -13123,7 +13079,6 @@
13123
13079
 
13124
13080
  .interactive .bar {
13125
13081
  cursor: ew-resize;
13126
-
13127
13082
  outline: none;
13128
13083
  }
13129
13084
 
@@ -13137,14 +13092,13 @@
13137
13092
  font-size: 0.75rem;
13138
13093
 
13139
13094
  dominant-baseline: middle;
13140
- text-anchor: middle;
13141
13095
 
13096
+ text-anchor: middle;
13142
13097
  fill: var(---color-text-inverse);
13143
13098
  }
13144
13099
 
13145
13100
  .point.interact {
13146
13101
  cursor: ns-resize;
13147
-
13148
13102
  outline: none;
13149
13103
  }
13150
13104
 
@@ -13156,7 +13110,6 @@
13156
13110
 
13157
13111
  .curve.interactive {
13158
13112
  cursor: nwse-resize;
13159
-
13160
13113
  outline: none;
13161
13114
  }
13162
13115
 
@@ -13168,8 +13121,8 @@
13168
13121
 
13169
13122
  @media (pointer: coarse) {
13170
13123
  .interactive .touch {
13171
- stroke-linecap: round;
13172
13124
  stroke-width: 12;
13125
+ stroke-linecap: round;
13173
13126
  }
13174
13127
  }
13175
13128
  `];
@@ -23166,6 +23119,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
23166
23119
 
23167
23120
  decidables-slider {
23168
23121
  line-height: 1;
23122
+
23169
23123
  text-align: center;
23170
23124
  }
23171
23125
 
@@ -23252,8 +23206,8 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
23252
23206
 
23253
23207
  width: 100%;
23254
23208
  height: 100%;
23209
+
23255
23210
  overflow: visible;
23256
-
23257
23211
 
23258
23212
  background: var(---color-element-background);
23259
23213
  border: 2px solid var(---color-element-emphasis);