greggman / gradient-editor

A Jquery based gradient editor
http://greggman.github.com/gradient-editor/
20 stars 11 forks source link

mostly style changes #3

Closed paulirish closed 13 years ago

paulirish commented 13 years ago

nothing major.

structure of the jQuery plugin was spot on, so nice job with that!

paulirish commented 13 years ago

I also added in color stop triangles for #1

greggman commented 13 years ago

awesome! thanks paul. I don't quite understand the triangle bit

paulirish commented 13 years ago

for triangles.. it's all in the .gradient-editor-color::before rule.

Basically we use generated content to inject a new pseudo-element.. that element has no width or height but has a thick border on one edge.. that ends up showing as a triangle. http://jonrohan.me/guide/css/creating-triangles-in-css/

it's a weird little trick and i'm combo'ing it with generated content to make it more clever-er.