@capsizecss/core
4.1.3 · 12 Nov 2025MIT205.9k / weekRepositoryHomepagenpmAtom feed
4.1.3 is the newest release of 4.x.
In short
1 breaking2 fixed
- Breaking
Precompile Capsize packages with [Crackle]
Release note
Major Changes
- Breaking
Precompile Capsize packages with [Crackle]
Migrating Capsize packages to be precompiled with [Crackle], with a key change being Crackle now handles entry points instead of [Preconstruct].
Other benefits include:
Modern module entry point syntax using the ["exports" field] with better tooling compatibility.
Improved types and better ESM and CJS compatibility
Better alignment between compiled code and module entry points
Breaking changes
API changes
While technically a breaking change, consumers of Capsize's public APIs are not affected by this change. If you are affected due to reaching into package internals, please get in touch and see if we can find a more maintainable approach.
TypeScript
TypeScript consumers should ensure they are using a compatible [`moduleResolution` strategy in TSConfig] — either `node16`, `nodenext` or `bundler`. This will ensure types are correctly resolved across the different module specifications. [Crackle]: https://github.com/seek-oss/crackle?tab=readme-ov-file#-crackle- [Preconstruct]: https://preconstruct.tools/ ["exports" field]: https://nodejs.org/api/packages.html#exports [`moduleResolution` strategy in tsconfig]: https://www.typescriptlang.org/tsconfig#moduleResolution
Patch Changes
createFontStack: Append original fallback font name to the font stack
The
fontFamilyreturned fromcreateFontStacknow includes the original fallback font name(s). These are appended to the end of the font stack in the case the preferred font and generated fallbacks are not available.import lobster from '@capsizecss/metrics/lobster'; import arial from '@capsizecss/metrics/arial'; const { fontFamily } = createFontStack([lobster, arial]);Where
fontFamilyis now:- `Lobster, 'Lobster Fallback: Arial'` + `Lobster, 'Lobster Fallback: Arial', Arial`
createFontStack: Quote
font-familyin@font-facedeclaration if neededPreviously, when using
fontFaceFormat: 'styleObject', the generated fallback name was not quoted as necessary within the@font-facedeclaration.
This could cause issues if the font family name contained spaces or other characters that required quoting.
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.