DEV Community

Cover image for Uses of CSS conic gradients
technikhil314
technikhil314

Posted on • Edited on

7

Uses of CSS conic gradients

With conic gradient landing up in firefox 83. It will now have good support. Removing dependancy on SVG for some simple usecases progress ring is one of them.

Here is how I have achieved it with conic gradient, custom css properties and eight lines of javascript.

Check it out here

What more can we achieve with conic gradients:

You can create pie charts like this

or some awesome checkerboard background patterns like this

or something like this

or some fancy borders like these

or a hue color wheel

References:

  1. There is nice article already by Jeremias Menichelli about creating progress rings using svg here
  2. Use of CSS custom properties inspired from this talk by Lea Verou

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (1)

Collapse
 
xilam675 profile image
xilam675

Good

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay