Tailwind has come a long way since publishing this! The simplicity intended from using this module violates their optimization recommendations and JIT capabilities entirely by dynamically concatenating class names, rendering the purging parser useless :) Oops! Thanks for checking it out anyway! ❤️
Responsive CLasSnames... X ¯\(ツ)/¯
Javascript objects for responsive utility classes. Inspired by tailwind, clsx, and the IBM 80.
npm i -S rclsx
import { rclsx } from 'rclsx';
rclsx('mt-2', { sm: 'px-1 py-2', md: 'px-4 py-4' });
// => 'mt-2 sm:px-1 sm:py-2 md:px-4 md:py-4'
- Add checks for duplicate classNames
- Add secondary prefixes? (ie
{border: color-500 b t}
)