@stackoverflow/stacks 1.9.4 → 1.10.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.
Files changed (39) hide show
  1. package/README.md +4 -3
  2. package/dist/css/stacks.css +89 -107
  3. package/dist/css/stacks.min.css +1 -1
  4. package/dist/js/stacks.js +33 -69
  5. package/lib/atomic/border.less +3 -3
  6. package/lib/atomic/misc.less +4 -4
  7. package/lib/atomic/typography.less +1 -1
  8. package/lib/base/body.less +1 -1
  9. package/lib/base/reset-normalize.less +3 -3
  10. package/lib/components/anchor/anchor.a11y.test.ts +42 -0
  11. package/lib/components/anchor/anchor.less +5 -2
  12. package/lib/components/anchor/anchor.visual.test.ts +53 -0
  13. package/lib/components/avatar/avatar.less +1 -1
  14. package/lib/components/banner/banner.less +10 -17
  15. package/lib/components/block-link/block-link.a11y.test.ts +7 -6
  16. package/lib/components/block-link/block-link.less +1 -1
  17. package/lib/components/block-link/block-link.visual.test.ts +7 -6
  18. package/lib/components/button/button.less +31 -46
  19. package/lib/components/card/card.visual.test.ts +7 -6
  20. package/lib/components/input-fill/input-fill.less +2 -2
  21. package/lib/components/input-icon/input-icon.less +1 -1
  22. package/lib/components/input_textarea/input_textarea.less +2 -2
  23. package/lib/components/link/link.a11y.test.ts +36 -0
  24. package/lib/components/link/link.less +1 -0
  25. package/lib/components/link/link.visual.test.ts +32 -0
  26. package/lib/components/navigation/navigation.less +1 -1
  27. package/lib/components/notice/notice.less +1 -1
  28. package/lib/components/page-title/page-title.less +1 -1
  29. package/lib/components/post-summary/post-summary.less +5 -1
  30. package/lib/components/select/select.less +2 -2
  31. package/lib/components/sidebar-widget/sidebar-widget.less +3 -3
  32. package/lib/components/spinner/spinner.less +1 -1
  33. package/lib/components/table/table.less +3 -3
  34. package/lib/components/toast/toast.test.ts +24 -23
  35. package/lib/components/topbar/topbar.less +6 -6
  36. package/lib/exports/constants-colors.less +19 -31
  37. package/lib/exports/constants-helpers.less +3 -3
  38. package/lib/exports/constants-type.less +5 -3
  39. package/package.json +28 -28
package/dist/js/stacks.js CHANGED
@@ -49,33 +49,33 @@ __webpack_require__.r(__webpack_exports__);
49
49
 
50
50
  // EXPORTS
51
51
  __webpack_require__.d(__webpack_exports__, {
52
- "BannerController": () => (/* reexport */ BannerController),
53
- "BasePopoverController": () => (/* reexport */ BasePopoverController),
54
- "ExpandableController": () => (/* reexport */ ExpandableController),
55
- "ModalController": () => (/* reexport */ ModalController),
56
- "PopoverController": () => (/* reexport */ PopoverController),
57
- "StacksApplication": () => (/* reexport */ StacksApplication),
58
- "StacksController": () => (/* reexport */ StacksController),
59
- "TabListController": () => (/* reexport */ TabListController),
60
- "TableController": () => (/* reexport */ TableController),
61
- "ToastController": () => (/* reexport */ ToastController),
62
- "TooltipController": () => (/* reexport */ TooltipController),
63
- "UploaderController": () => (/* reexport */ UploaderController),
64
- "addController": () => (/* reexport */ addController),
65
- "application": () => (/* reexport */ application),
66
- "attachPopover": () => (/* reexport */ attachPopover),
67
- "createController": () => (/* reexport */ createController),
68
- "detachPopover": () => (/* reexport */ detachPopover),
69
- "hideBanner": () => (/* reexport */ hideBanner),
70
- "hideModal": () => (/* reexport */ hideModal),
71
- "hidePopover": () => (/* reexport */ hidePopover),
72
- "hideToast": () => (/* reexport */ hideToast),
73
- "setTooltipHtml": () => (/* reexport */ setTooltipHtml),
74
- "setTooltipText": () => (/* reexport */ setTooltipText),
75
- "showBanner": () => (/* reexport */ showBanner),
76
- "showModal": () => (/* reexport */ showModal),
77
- "showPopover": () => (/* reexport */ showPopover),
78
- "showToast": () => (/* reexport */ showToast)
52
+ BannerController: () => (/* reexport */ BannerController),
53
+ BasePopoverController: () => (/* reexport */ BasePopoverController),
54
+ ExpandableController: () => (/* reexport */ ExpandableController),
55
+ ModalController: () => (/* reexport */ ModalController),
56
+ PopoverController: () => (/* reexport */ PopoverController),
57
+ StacksApplication: () => (/* reexport */ StacksApplication),
58
+ StacksController: () => (/* reexport */ StacksController),
59
+ TabListController: () => (/* reexport */ TabListController),
60
+ TableController: () => (/* reexport */ TableController),
61
+ ToastController: () => (/* reexport */ ToastController),
62
+ TooltipController: () => (/* reexport */ TooltipController),
63
+ UploaderController: () => (/* reexport */ UploaderController),
64
+ addController: () => (/* reexport */ addController),
65
+ application: () => (/* reexport */ application),
66
+ attachPopover: () => (/* reexport */ attachPopover),
67
+ createController: () => (/* reexport */ createController),
68
+ detachPopover: () => (/* reexport */ detachPopover),
69
+ hideBanner: () => (/* reexport */ hideBanner),
70
+ hideModal: () => (/* reexport */ hideModal),
71
+ hidePopover: () => (/* reexport */ hidePopover),
72
+ hideToast: () => (/* reexport */ hideToast),
73
+ setTooltipHtml: () => (/* reexport */ setTooltipHtml),
74
+ setTooltipText: () => (/* reexport */ setTooltipText),
75
+ showBanner: () => (/* reexport */ showBanner),
76
+ showModal: () => (/* reexport */ showModal),
77
+ showPopover: () => (/* reexport */ showPopover),
78
+ showToast: () => (/* reexport */ showToast)
79
79
  });
80
80
 
81
81
  ;// CONCATENATED MODULE: ./node_modules/@hotwired/stimulus/dist/stimulus.js
@@ -2515,7 +2515,6 @@ class StacksApplication extends Application {
2515
2515
  }
2516
2516
  }
2517
2517
  StacksApplication._initializing = true;
2518
-
2519
2518
  const application = StacksApplication.start();
2520
2519
  class StacksController extends Controller {
2521
2520
  getElementData(element, key) {
@@ -2653,7 +2652,6 @@ class BannerController extends StacksController {
2653
2652
  }
2654
2653
  }
2655
2654
  BannerController.targets = ["banner"];
2656
-
2657
2655
  /**
2658
2656
  * Helper to manually show an s-banner element via external JS
2659
2657
  * @param element the element the `data-controller="s-banner"` attribute is on
@@ -3129,7 +3127,6 @@ class ModalController extends StacksController {
3129
3127
  }
3130
3128
  }
3131
3129
  ModalController.targets = ["modal", "initialFocus"];
3132
-
3133
3130
  /**
3134
3131
  * Helper to manually show an s-modal element via external JS
3135
3132
  * @param element the element the `data-controller="s-modal"` attribute is on
@@ -3778,13 +3775,6 @@ function mergeByName(modifiers) {
3778
3775
 
3779
3776
 
3780
3777
 
3781
-
3782
-
3783
-
3784
-
3785
-
3786
- var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';
3787
- var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';
3788
3778
  var DEFAULT_OPTIONS = {
3789
3779
  placement: 'bottom',
3790
3780
  modifiers: [],
@@ -3846,11 +3836,7 @@ function popperGenerator(generatorOptions) {
3846
3836
 
3847
3837
  state.orderedModifiers = orderedModifiers.filter(function (m) {
3848
3838
  return m.enabled;
3849
- }); // Validate the provided modifiers so that the consumer will get warned
3850
- // if one of the modifiers is invalid for any reason
3851
-
3852
- if (false) { var _getComputedStyle, marginTop, marginRight, marginBottom, marginLeft, flipModifier, modifiers; }
3853
-
3839
+ });
3854
3840
  runModifierEffects();
3855
3841
  return instance.update();
3856
3842
  },
@@ -3870,8 +3856,6 @@ function popperGenerator(generatorOptions) {
3870
3856
  // anymore
3871
3857
 
3872
3858
  if (!areValidElements(reference, popper)) {
3873
- if (false) {}
3874
-
3875
3859
  return;
3876
3860
  } // Store the reference and popper rects to be read by modifiers
3877
3861
 
@@ -3894,11 +3878,8 @@ function popperGenerator(generatorOptions) {
3894
3878
  state.orderedModifiers.forEach(function (modifier) {
3895
3879
  return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
3896
3880
  });
3897
- var __debug_loops__ = 0;
3898
3881
 
3899
3882
  for (var index = 0; index < state.orderedModifiers.length; index++) {
3900
- if (false) {}
3901
-
3902
3883
  if (state.reset === true) {
3903
3884
  state.reset = false;
3904
3885
  index = -1;
@@ -3936,8 +3917,6 @@ function popperGenerator(generatorOptions) {
3936
3917
  };
3937
3918
 
3938
3919
  if (!areValidElements(reference, popper)) {
3939
- if (false) {}
3940
-
3941
3920
  return instance;
3942
3921
  }
3943
3922
 
@@ -3952,11 +3931,11 @@ function popperGenerator(generatorOptions) {
3952
3931
  // one.
3953
3932
 
3954
3933
  function runModifierEffects() {
3955
- state.orderedModifiers.forEach(function (_ref3) {
3956
- var name = _ref3.name,
3957
- _ref3$options = _ref3.options,
3958
- options = _ref3$options === void 0 ? {} : _ref3$options,
3959
- effect = _ref3.effect;
3934
+ state.orderedModifiers.forEach(function (_ref) {
3935
+ var name = _ref.name,
3936
+ _ref$options = _ref.options,
3937
+ options = _ref$options === void 0 ? {} : _ref$options,
3938
+ effect = _ref.effect;
3960
3939
 
3961
3940
  if (typeof effect === 'function') {
3962
3941
  var cleanupFn = effect({
@@ -4276,9 +4255,6 @@ function computeStyles(_ref5) {
4276
4255
  adaptive = _options$adaptive === void 0 ? true : _options$adaptive,
4277
4256
  _options$roundOffsets = options.roundOffsets,
4278
4257
  roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
4279
-
4280
- if (false) { var transitionProperty; }
4281
-
4282
4258
  var commonStyles = {
4283
4259
  placement: getBasePlacement(state.placement),
4284
4260
  variation: getVariation(state.placement),
@@ -4762,8 +4738,6 @@ function computeAutoPlacement(state, options) {
4762
4738
 
4763
4739
  if (allowedPlacements.length === 0) {
4764
4740
  allowedPlacements = placements;
4765
-
4766
- if (false) {}
4767
4741
  } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
4768
4742
 
4769
4743
 
@@ -5093,7 +5067,6 @@ function preventOverflow(_ref) {
5093
5067
 
5094
5068
 
5095
5069
 
5096
-
5097
5070
  // eslint-disable-next-line import/no-unused-modules
5098
5071
 
5099
5072
  var toPaddingObject = function toPaddingObject(padding, state) {
@@ -5159,11 +5132,7 @@ function arrow_effect(_ref2) {
5159
5132
  }
5160
5133
  }
5161
5134
 
5162
- if (false) {}
5163
-
5164
5135
  if (!contains(state.elements.popper, arrowElement)) {
5165
- if (false) {}
5166
-
5167
5136
  return;
5168
5137
  }
5169
5138
 
@@ -5593,7 +5562,6 @@ class PopoverController extends BasePopoverController {
5593
5562
  }
5594
5563
  }
5595
5564
  PopoverController.targets = [];
5596
-
5597
5565
  /**
5598
5566
  * Helper to manually show an s-popover element via external JS
5599
5567
  * @param element the element the `data-controller="s-popover"` attribute is on
@@ -5883,7 +5851,6 @@ class TableController extends StacksController {
5883
5851
  }
5884
5852
  }
5885
5853
  TableController.targets = ["column"];
5886
-
5887
5854
  /**
5888
5855
  * @internal This function is exported for testing purposes but is not a part of our public API
5889
5856
  *
@@ -6214,7 +6181,6 @@ class ToastController extends StacksController {
6214
6181
  }
6215
6182
  }
6216
6183
  ToastController.targets = ["toast", "initialFocus"];
6217
-
6218
6184
  /**
6219
6185
  * Helper to manually show an s-toast element via external JS
6220
6186
  * @param element the element the `data-controller="s-toast"` attribute is on
@@ -6453,7 +6419,6 @@ class TooltipController extends BasePopoverController {
6453
6419
  }
6454
6420
  }
6455
6421
  TooltipController.targets = [];
6456
-
6457
6422
  /**
6458
6423
  * Adds or updates a Stacks tooltip on a given element, initializing the controller if necessary
6459
6424
  * @param element The element to add a tooltip to.
@@ -6659,7 +6624,6 @@ UploaderController.targets = ["input", "previews", "uploader"];
6659
6624
  UploaderController.FILE_DISPLAY_LIMIT = 10;
6660
6625
  UploaderController.MAX_FILE_SIZE = 1024 * 1024 * 10; // 10 MB
6661
6626
 
6662
-
6663
6627
  ;// CONCATENATED MODULE: ./lib/controllers.ts
6664
6628
  // export all controllers *with helpers* so they can be bulk re-exported by the package entry point
6665
6629
 
@@ -116,9 +116,9 @@
116
116
 
117
117
  // ============================================================================
118
118
  // $ BORDER RADIUS
119
- // br-sm: Small step: 3px border radius
120
- // br-md: Medium step: 5px border radius
121
- // br-lg: Large step: 7px border radius
119
+ // br-sm: Small step: 4px border radius
120
+ // br-md: Medium step: 6px border radius
121
+ // br-lg: Large step: 8px border radius
122
122
  // ----------------------------------------------------------------------------
123
123
  // $$ All Sides
124
124
  .bar-sm { border-radius: var(--br-sm) !important; }
@@ -149,14 +149,14 @@
149
149
  // Borrowed from Wordpress
150
150
  // https://make.wordpress.org/accessibility/2015/02/09/hiding-text-for-screen-readers-with-wordpress-core/
151
151
  border: 0;
152
- clip: rect(1px, 1px, 1px, 1px);
152
+ clip: rect(var(--su-static1), var(--su-static1), var(--su-static1), var(--su-static1)); // rect(1px, 1px, 1px, 1px)
153
153
  clip-path: inset(50%);
154
- height: 1px;
155
- margin: -1px;
154
+ height: var(--su-static1);
155
+ margin: calc(var(--su-static1) * -1); // -1px
156
156
  overflow: hidden;
157
157
  padding: 0;
158
158
  position: absolute;
159
- width: 1px;
159
+ width: var(--su-static1);
160
160
  overflow-wrap: normal;
161
161
  }
162
162
 
@@ -63,7 +63,7 @@ p {
63
63
  &.has-border {
64
64
  width: 100%;
65
65
  padding: var(--su4) 0;
66
- border-top: 1px solid var(--bc-medium);
66
+ border-top: var(--su-static1) solid var(--bc-medium);
67
67
  }
68
68
  }
69
69
 
@@ -27,7 +27,7 @@ body {
27
27
  #stacks-internals #screen-sm({
28
28
  &,
29
29
  body {
30
- font-size: 11px;
30
+ font-size: calc(var(--su-static12) - var(--su-static1)); // 11px
31
31
  }
32
32
  }, @force-selector: true);
33
33
 
@@ -69,7 +69,7 @@ main { /* 1 */
69
69
  */
70
70
 
71
71
  figure {
72
- margin: 1em 40px;
72
+ margin: 1em calc(var(--su-static32) + var(--su-static8)); // 1em 40px
73
73
  }
74
74
 
75
75
  /**
@@ -303,7 +303,7 @@ button:-moz-focusring,
303
303
  [type="button"]:-moz-focusring,
304
304
  [type="reset"]:-moz-focusring,
305
305
  [type="submit"]:-moz-focusring {
306
- outline: 1px dotted ButtonText;
306
+ outline: var(--su-static1) dotted ButtonText;
307
307
  }
308
308
 
309
309
  /**
@@ -375,7 +375,7 @@ textarea {
375
375
 
376
376
  [type="search"] {
377
377
  -webkit-appearance: textfield; /* 1 */
378
- outline-offset: -2px; /* 2 */
378
+ outline-offset: calc(var(--su-static2) * -1); // -2px - /* 2 */
379
379
  }
380
380
 
381
381
  /**
@@ -0,0 +1,42 @@
1
+ import { defaultOptions, runComponentTests } from "../../test/test-utils";
2
+ import "../../index";
3
+
4
+ // TODO check for visited styling
5
+ const link = (text = "", visited = true, classes = "") =>
6
+ `<a class="${classes}" href="${
7
+ visited ? "/" : "https://stackoverflow.design/404-unvisited"
8
+ }">${text}</a>`;
9
+
10
+ describe("anchors", () => {
11
+ runComponentTests({
12
+ type: "a11y",
13
+ baseClass: "s-anchors",
14
+ modifiers: {
15
+ primary: [
16
+ "default",
17
+ "grayscale",
18
+ "muted",
19
+ "danger",
20
+ "inherit",
21
+ "underlined",
22
+ ],
23
+ },
24
+ children: {
25
+ default: `A ${link(
26
+ "link"
27
+ )}, a <button class="s-btn s-btn__link">button</button>, an ${link(
28
+ "unvisited link",
29
+ false
30
+ )}.`,
31
+ },
32
+ options: {
33
+ ...defaultOptions,
34
+ includeNullModifier: false,
35
+ },
36
+ skippedTestids: [
37
+ "s-anchors-dark-danger", // TODO fix contrast issue
38
+ "s-anchors-dark-default", // TODO fix contrast issue
39
+ "s-anchors-dark-underlined", // TODO fix contrast issue
40
+ ],
41
+ });
42
+ });
@@ -2,6 +2,7 @@
2
2
  // CUSTOM PROPERTIED DEFINED WITHIN VARIANTS
3
3
  // --_an-a-fc
4
4
  // --_an-a-fc-hover
5
+ --_an-a-fc-visited: var(--_an-a-fc);
5
6
 
6
7
  // MODIFIERS
7
8
  &&__underlined {
@@ -20,6 +21,7 @@
20
21
  &&__default {
21
22
  --_an-a-fc: var(--theme-link-color);
22
23
  --_an-a-fc-hover: var(--theme-link-color-hover);
24
+ --_an-a-fc-visited: var(--theme-link-color-visited);
23
25
  }
24
26
 
25
27
  &&__grayscale {
@@ -44,6 +46,8 @@
44
46
  &&__muted {
45
47
  a:not(.s-link),
46
48
  .s-btn.s-btn__link {
49
+ color: var(--_an-a-fc, inherit);
50
+
47
51
  &:hover,
48
52
  &:active {
49
53
  &,
@@ -52,9 +56,8 @@
52
56
  }
53
57
  }
54
58
 
55
- &,
56
59
  &:visited {
57
- color: var(--_an-a-fc, inherit);
60
+ color: var(--_an-a-fc-visited, inherit);
58
61
  }
59
62
  }
60
63
  }
@@ -0,0 +1,53 @@
1
+ import { html } from "@open-wc/testing";
2
+ import { defaultOptions, runComponentTests } from "../../test/test-utils";
3
+ import "../../index";
4
+
5
+ // TODO check for visited styling
6
+ const link = (text = "", classes = "") =>
7
+ `<a class="${classes}" href="#">${text}</a>`;
8
+ const links = `A ${link(
9
+ "link"
10
+ )}, a <button class="s-btn s-btn__link">button</button>, an ${link(
11
+ "unvisited link"
12
+ )}.<br/>Nested: ${link("danger", "s-link s-link__danger")}, ${link(
13
+ "grayscale",
14
+ "s-link s-link__grayscale"
15
+ )}.`;
16
+
17
+ describe("anchors", () => {
18
+ runComponentTests({
19
+ type: "visual",
20
+ baseClass: "s-anchors",
21
+ modifiers: {
22
+ primary: [
23
+ "default",
24
+ "grayscale",
25
+ "muted",
26
+ "danger",
27
+ "inherit",
28
+ "underlined",
29
+ ],
30
+ },
31
+ children: {
32
+ // children include nested anchors block to test for appropriate nested styling
33
+ default: `
34
+ ${links}
35
+ <div class="s-card s-anchors s-anchors__danger">Danger: ${links}</div>
36
+ <div class="s-card s-anchors s-anchors__muted mt4">Muted: ${links}</div>
37
+ `,
38
+ },
39
+ options: {
40
+ ...defaultOptions,
41
+ includeNullModifier: false,
42
+ },
43
+ template: ({ component, testid }) => html`
44
+ <div data-testid="${testid}" class="s-card ws3 fc-green-600">
45
+ ${testid}: ${component}
46
+ </div>
47
+ `,
48
+ skippedTestids: [
49
+ // TODO resolve webkit failures for these. See https://github.com/StackExchange/Stacks/actions/runs/5406068986/jobs/9822478155?pr=1404
50
+ /s-anchors/,
51
+ ],
52
+ });
53
+ });
@@ -12,7 +12,7 @@
12
12
  }
13
13
 
14
14
  background-color: var(--black);
15
- box-shadow: 0 0 0 1px var(--black);
15
+ box-shadow: 0 0 0 var(--su-static1) var(--black);
16
16
  color: var(--white);
17
17
  });
18
18
 
@@ -2,23 +2,24 @@
2
2
  // TODO deprecate .s-banner (by turning it into a modifier on .s-notice)
3
3
  // This would reduce the amount of CSS we ship to the client and simplify our codebase
4
4
  .s-banner {
5
- --_no-x-offset: 0; // [1]
5
+ --_no-x-offset: 0;
6
6
  .construct-notice-component(s-banner);
7
7
 
8
8
  &[aria-hidden="true"] { // If you want to hide and reveal the banner
9
- --_no-x-offset: calc(var(--su48) + var(--su2) * -1); // -50px
9
+ --_no-x-offset: -1;
10
10
  opacity: 0;
11
11
  visibility: hidden;
12
12
  }
13
13
 
14
14
  &[aria-hidden="false"] {
15
- --_no-x-offset: calc(var(--su48) + var(--su1)); // 49px
15
+ --_no-x-offset: 1;
16
16
  opacity: 1;
17
17
  visibility: visible;
18
- }
19
18
 
20
- &.is-pinned { // If you want to put the banner above the topbar
21
- z-index: calc(var(--zi-navigation-fixed) + 1);
19
+ &.is-pinned { // If you want to put the banner above the topbar
20
+ --_no-x-offset: 0;
21
+ z-index: calc(var(--zi-navigation-fixed) + 1);
22
+ }
22
23
  }
23
24
 
24
25
  &__body-pt {
@@ -32,20 +33,12 @@
32
33
  width: 100%;
33
34
  }
34
35
 
35
- border-width: var(--su-static1) 0;
36
+ border-width: 0 0 var(--su-static1);
36
37
  inset: 0 0 auto 0;
37
38
  padding: var(--su12);
38
39
  position: fixed;
39
- -webkit-transform: translate3d(0, var(--_no-x-offset), 0);
40
- transform: translate3d(0, var(--_no-x-offset), 0);
40
+ -webkit-transform: translate3d(0, calc(var(--theme-topbar-height) * var(--_no-x-offset)), 0);
41
+ transform: translate3d(0, calc(var(--theme-topbar-height) * var(--_no-x-offset)), 0);
41
42
  width: 100%;
42
43
  z-index: calc(var(--zi-navigation-fixed) - 1); // Tuck below topbar
43
44
  }
44
-
45
- // [1] When we use .s-banner, we need to adjust the padding-top on
46
- // the body tag. This class correctly adjusts the body padding ONLY if
47
- // the notice is one line. If it wraps to multiple lines, more classes or
48
- // (ideally) JS will need to be used to determine the notice's height
49
- // at the time of render. The padding value is determined like so:
50
- // 50px (top bar) + 44px (notice height) - 1px (bottom border)
51
- // The borders subtraction are necessary to neatly tuck everything together.
@@ -3,12 +3,13 @@ import { defaultOptions, runComponentTests } from "../../test/test-utils";
3
3
  import "../../index";
4
4
 
5
5
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6
- const blockLinkTemplate = ({ component, testid }: any) => html`<div
7
- class="d-inline-flex ai-center jc-center hs1 ws2 p8"
8
- data-testid="${testid}"
9
- >
10
- ${component}
11
- </div>`;
6
+ const blockLinkTemplate = ({ component, testid }: any) =>
7
+ html`<div
8
+ class="d-inline-flex ai-center jc-center hs1 ws2 p8"
9
+ data-testid="${testid}"
10
+ >
11
+ ${component}
12
+ </div>`;
12
13
 
13
14
  describe("block-link", () => {
14
15
  // Base block link
@@ -40,7 +40,7 @@ a.s-block-link,
40
40
 
41
41
  &&__right {
42
42
  &.is-selected {
43
- --_li-block-bs-offset-x: -3px;
43
+ --_li-block-bs-offset-x: calc(var(--su-static1) - var(--su-static4)); // -3px
44
44
  }
45
45
  }
46
46
 
@@ -3,12 +3,13 @@ import { defaultOptions, runComponentTests } from "../../test/test-utils";
3
3
  import "../../index";
4
4
 
5
5
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6
- const blockLinkTemplate = ({ component, testid }: any) => html`<div
7
- class="d-inline-flex ai-center jc-center hs1 ws2 p8"
8
- data-testid="${testid}"
9
- >
10
- ${component}
11
- </div>`;
6
+ const blockLinkTemplate = ({ component, testid }: any) =>
7
+ html`<div
8
+ class="d-inline-flex ai-center jc-center hs1 ws2 p8"
9
+ data-testid="${testid}"
10
+ >
11
+ ${component}
12
+ </div>`;
12
13
 
13
14
  describe("block-link", () => {
14
15
  // Base block link