chu121su12 / unocss-preset-chroma Goto Github PK
View Code? Open in Web Editor NEWchroma-js gradient for UnoCSS
License: MIT License
chroma-js gradient for UnoCSS
License: MIT License
Clone of the repo works as expected. Installation via pnpm to typescript project following instructions
import { presetChroma } from 'unocss-preset-chroma'
missing .d.ts?
大佬,你dist目录没提交到npm
Hi @chu121su12,
I wanted to make such a preset and discovered yours. Thanks for making it. 😍 I also enjoyed reading the recent article from Josh.
After testing it, I have few remarks regarding the naming you adopted which seems a bit far from existing gradient utilities. As an example, in Tailwind or Windi, you would write bg-gradient-to-b from-blue-400 to-violet-400
. The direction is attached to bg-gradient
and the colors endings are separate classes.
I would suggest suggest few things:
from-<color>
, via-<colo>
, and to-<color>
classes, so we can easily replace the initial bg-gradient-*
class with yours.chroma
prefix and only have bg-gradient-<mode>-<direction>
where the direction is the same from Tailwind and Windi.to-b
, to-tr
…bg-gradient-deg-<angle>
. What do you think?Example:
bg-gradient-hsl-to-b from-blue-400 to-pink-300
Example with angle:
bg-gradient-hsl-deg-34 from-blue-400 to-pink-300
I think this is the right time to revise the preset before it's heavily used. Can't wait to get your feedback.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.