Packages

@capsizecss/core

4.1.3 · 12 Nov 2025MIT205.9k / weekRepositoryHomepagenpmAtom feed

Your version

4.1.1

5 May 2024Where it was published

4.1.3 is the newest release of 4.x.

In short

2 fixed

Release note

Patch Changes

  • createFontStack: Apply line-gap-override with no lineGap in preferred font

    Ensure that the line-gap-override property is applied correctly when overriding a fallback font with a web font that has no lineGap.
    Previously if the override was zero it would be omitted from the declaration, rather than the correct behaviour of overriding the fallback metric to zero.

  • createFontStack: Ensure provided `size-adjust` is factored into metric overrides

    Ensures a custom size-adjust value provided via the fontFaceProperties option is factored into the calculations for the metric overrides.

Example

If a custom `size-adjust` value is provided:

```ts
createFontStack([merriweatherSans, arial], {
  fontFaceProperties: {
    sizeAdjust: '300%',
  },
});
```

The resulting metric overrides are now adjusted accordingly:

```diff
 @font-face {
   font-family: "Merriweather Sans Fallback";
   src: local('Arial');
-  ascent-override: 92.3409%;
+  ascent-override: 32.8%;
-  descent-override: 25.619%;
+  descent-override: 9.1%;
   line-gap-override: 0%;
   size-adjust: 300%;
 }
```

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.