@motion-proto/live-tokens 0.53.0 → 0.54.1

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.
@@ -200,6 +200,9 @@
200
200
  lastPageBackground = pageBackground;
201
201
  const token = contrastTokenForBackground(pageBackground);
202
202
  stageEl.style.setProperty('--ftt-contrast-color', `var(${token})`);
203
+ // Dark strokes on a light page read far heavier than white ones on a dark
204
+ // page at the same alpha, so the light theme gets a thinner string.
205
+ stageEl.style.setProperty('--ftt-string-opacity', token === '--color-black' ? '0.3' : '0.5');
203
206
  }
204
207
 
205
208
  function syncBoxLabelContrast() {
@@ -48,7 +48,8 @@ function luminance({ r, g, b }: Rgb): number {
48
48
 
49
49
  /**
50
50
  * Pick the invariant black/white token with the stronger minimum contrast
51
- * against every explicit colour in a solid or gradient page background.
51
+ * against every explicit colour in a solid or gradient page background —
52
+ * the rule FloatingTokenTags uses for its kite strings.
52
53
  */
53
54
  export function contrastTokenForBackground(background: string): ContrastColorToken {
54
55
  const colors = colorsIn(background);