This is a CSS utility library that automatically generates background-image
, width
, and height
styles for elements based on local image paths.
💡 Iterated from the littlee/autobg.macro
- 🖼️ Automatically generates styles that respect the original aspect ratio of images
- 🛠️ Supports multiple integration methods:
- babel-plugin-macros plugin
- unocss preset
- postcss plugin
- 🔄 Fully compatible with webpack and vite
- 🔗 Supports relative path image imports in unocss and vite unocss #1397
- 📏 Supports custom style units in babel macro
For detailed usage instructions, please check the corresponding documentation:
MIT