@momentum-design/components 0.144.3 → 0.144.4

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.
@@ -1,4 +1,4 @@
1
- import { css } from 'lit';
1
+ import { css, unsafeCSS } from 'lit';
2
2
  const hostFitContentStyles = css `
3
3
  :host {
4
4
  align-items: center;
@@ -22,7 +22,17 @@ const baseHostStyleVariables = css `
22
22
  --mdc-focus-ring-outer-offset: calc(var(--mdc-focus-ring-inner-width) + var(--mdc-focus-ring-middle-width));
23
23
  }
24
24
  `;
25
+ /*
26
+ * Mitigates the blue fringe on the inner edge of the focus ring on transparent elements with rounded corners.
27
+ * Every box-shadow layer shares the same anti-aliased edge at the border box, so the blue layers bleed through
28
+ * the black inner layer there. Repeating the inner color with half the spread overdraws the bleed, while its
29
+ * outer edge stays hidden below the opaque inner layer, so the ring looks the same.
30
+ * See LEARNINGS.md ("Focus ring: inner blue fringe").
31
+ */
32
+ const focusRingInnerOverdrawLayer = '0 0 0 calc(var(--mdc-focus-ring-inner-width) / 2) var(--mdc-focus-ring-inner-color)';
33
+ const focusRingInnerOverdraw = unsafeCSS(Array(8).fill(focusRingInnerOverdrawLayer).join(',\n '));
25
34
  const focusRingBoxShadow = css `0 0 0 var(--mdc-focus-ring-inner-width) var(--mdc-focus-ring-inner-color),
35
+ ${focusRingInnerOverdraw},
26
36
  0 0 0 var(--mdc-focus-ring-middle-width) var(--mdc-focus-ring-middle-color),
27
37
  0 0 0 var(--mdc-focus-ring-outer-width) var(--mdc-focus-ring-outer-color)
28
38
  `;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@momentum-design/components",
3
3
  "packageManager": "yarn@4.18.1",
4
- "version": "0.144.3",
4
+ "version": "0.144.4",
5
5
  "engines": {
6
6
  "node": ">=24.0.0",
7
7
  "npm": ">=8.0.0"