@swiftbrowser/web 0.3.1 → 0.5.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.
package/src/symbols.ts CHANGED
@@ -215,6 +215,7 @@ import {
215
215
  Link2,
216
216
  List,
217
217
  ListChecks,
218
+ ListFilter,
218
219
  ListIndentIncrease,
219
220
  ListMusic,
220
221
  ListOrdered,
@@ -571,7 +572,8 @@ export const SF_SYMBOLS: Readonly<Record<string, SymbolGlyph>> = {
571
572
  'tag.fill': solid(Tag),
572
573
  textformat: outline(CaseSensitive),
573
574
  'line.3.horizontal': outline(Menu),
574
- 'line.3.horizontal.decrease': outline(Funnel),
575
+ // Three lines, each shorter than the one above.
576
+ 'line.3.horizontal.decrease': outline(ListFilter),
575
577
  'line.3.horizontal.decrease.circle': outline(Funnel),
576
578
  'slider.horizontal.3': outline(SlidersHorizontal),
577
579
  'list.bullet': outline(List),
package/src/typography.ts CHANGED
@@ -22,7 +22,10 @@ export {
22
22
  DYNAMIC_TYPE_SIZES,
23
23
  FONT_FAMILIES,
24
24
  FONT_WEIGHTS,
25
- LINE_HEIGHTS,
25
+ LINE_HEIGHT_RATIO,
26
+ LEADINGS,
27
+ leadingFor,
28
+ textHeight,
26
29
  TEXT_STYLE_SIZES,
27
30
  defaultFont,
28
31
  lineHeightFor,
@@ -70,7 +73,7 @@ export function applyTypeSizeVariables(target: HTMLElement, size: DynamicTypeSiz
70
73
  for (const style of TEXT_STYLES) {
71
74
  const { fontSize, lineHeight } = resolveTextStyle(style, size);
72
75
  target.style.setProperty(textStyleVar(style, 'size'), `${fontSize}px`);
73
- target.style.setProperty(textStyleVar(style, 'lh'), `${lineHeight}px`);
76
+ target.style.setProperty(textStyleVar(style, 'lh'), `${Math.round(lineHeight * 100) / 100}px`);
74
77
  target.style.setProperty(`--sb-ts-${style}-scale`, String(relativeScale(style, size)));
75
78
  }
76
79
  }