Giter Club home page Giter Club logo

unocss-preset-chroma's Issues

Getting closer to existing gradient class names

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:

  1. To rely on from-<color>, via-<colo>, and to-<color> classes, so we can easily replace the initial bg-gradient-* class with yours.
  2. To drop the chroma prefix and only have bg-gradient-<mode>-<direction> where the direction is the same from Tailwind and Windi.
  3. To support Tailwind/Windi direction suffixes like to-b, to-tr
  4. To introduce angles in UnoCSS directly with something like: bg-gradient-deg-<angle>. What do you think?
  5. To introduce conic and radial gradients in UnoCSS. SInce radial gradients support different shapes, it would require additional options.

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.

I make a replacement of this preset

Since the npm package is unavaliable because of the lost of dist, I make a forked repository and publish a copied preset of this preset named "unocss-preset-chroma-forked"
if the author fixed current error, please reply this issue and I will delete my forked repository and npm library
thks!

image image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.