styleQ is a compact and efficient JavaScript runtime designed for merging HTML class names generated by Atomic CSS compilers. It provides high-performance merging capabilities for initial renders, incorporates built-in memoization to optimize updates, and seamlessly handles both static compiled styles and dynamic inline styles. The library is currently at version 0.2.1 and is actively maintained, though specific release cadence (e.g., weekly, monthly) is not explicitly stated but typically follows an as-needed pattern for utility libraries. Its key differentiators include its small gzipped size (0.7 KB), robust support for various CSS compiler designs, and its focus on performance for critical render paths. It contrasts with traditional CSS-in-JS solutions by operating on pre-compiled class names, acting as a final merging step.
npm install styleqVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage of `styleq` to merge atomic CSS class names and inline styles, including dynamic and conditional styles, and shows how to use `styleq.factory` for custom configurations.
Ensure all style objects generated by your CSS compiler include `$$css: true` or a descriptive string.
Your Atomic CSS compiler should output objects where keys map to class names (e.g., `{ display: 'display-flex-class' }`), not raw CSS properties (e.g., `{ display: 'flex' }`).Consider profiling with and without `disableCache` if initial render performance is a critical bottleneck, especially in scenarios with infrequent component updates.
Evaluate if the default mixed merging strategy fits your performance and compiler design needs. If not, create a custom `styleq` instance with `disableMix: true`.
Use `import { styleq } from 'styleq';` instead of `const styleq = require('styleq');` for modern JavaScript modules.Ensure all compiled style objects explicitly include `$$css: true` (for production) or `$$css: 'debug-info'` (for development).
Verify that compiled style objects passed to `styleq` have values that are valid HTML class strings, as `styleq` is designed to concatenate these strings.
No dependency data recorded yet.