Utility OpenType is a CSS library that provides simple utility classes for applying advanced typographic features (OpenType features) to web content. It aims to make OpenType features as straightforward to use as basic styles like bold and italics, ensuring predictable cascading and graceful fallbacks in browsers that don't fully support feature queries. The library is very lightweight, less than 1.75KB gzipped, and is designed to work standalone or alongside other CSS frameworks. The current stable version is 0.1.4, released in May 2016. Given the lack of updates since then, the project appears to be abandoned, with no active development or planned releases, which should be considered when adopting it for new projects.
npm install utility-opentypeVerified import paths — ran on the pinned version, not inferred.
Demonstrates installation via npm and basic Sass import, followed by example HTML markup using some of the utility classes for OpenType features like ligatures, small caps, and fractions.
Consider alternatives like directly using `font-feature-settings` in your CSS, or a more actively maintained utility CSS framework that includes typographic features.
Self-host the `utility-opentype.min.css` file from your own server or use a reliable, actively maintained CDN if you must include it directly without a build step.
Always test the desired OpenType features with your selected font in target browsers. Provide appropriate fallback styles for browsers that do not support certain features or fonts.
Ensure your project's build configuration (e.g., Webpack, Vite, Gulp) is set up to correctly process Sass files or include static CSS assets. Do not attempt to `import` this package as a JavaScript module.
When using Sass without tools like Eyeglass or a configured build system, use the full relative path: `@import "../node_modules/utility-opentype/css/utility-opentype";`. For build systems, ensure `node_modules` is added to your Sass import paths.
Verify that your font file (e.g., WOFF2) explicitly includes the OpenType features you are trying to enable. Check browser compatibility tables for `font-feature-settings` and ensure your browser version supports the feature. Use developer tools to inspect computed CSS properties.
No dependency data recorded yet.