css3patterns icon indicating copy to clipboard operation
css3patterns copied to clipboard

LESS.js

Open abernier opened this issue 12 years ago • 7 comments

Just another idea,

Creating CSS patterns often requires to manually compute values (ex: "half the size"...), or have a variable in mind (ex: "my background is white")...

Have you thought of using something like LESS?

The pattern could then be saved as less stylesheet, but it should be displayed as plain CSS on the site (like it is) to allow users to just copy/paste the snippet which is good.

Let me know your thoughts about it ;)

— Antoine

abernier avatar Jul 22 '11 19:07 abernier

That's a very good idea actually. Does LESS.js support inline styles (in style attribute)? I wouldn't want to change how easy it is to add a new pattern.

LeaVerou avatar Dec 07 '11 02:12 LeaVerou

Hello LeaVerou,

From personal experience the "Less" does not work with inline attributes "style".

gravataLonga avatar Jan 13 '12 22:01 gravataLonga

You could create a LESS file assigning each gradient to a class (ex: .zig-zag) and then assign that class to the corresponding li

Anahkiasen avatar Feb 23 '12 14:02 Anahkiasen

This would require editing two places to add a pattern instead of just one.

LeaVerou avatar Feb 23 '12 15:02 LeaVerou

A LESS option would be nice for Less users I'm sure. FYI there's a Sass version that a few of us have been working on as part of Compass Recipes https://github.com/MoOx/compass-recipes/tree/master/stylesheets/recipes/background

codingdesigner avatar Feb 23 '12 15:02 codingdesigner

I'm making a stylesheet of LESS mixins of all the gradients.

Anahkiasen avatar Feb 24 '12 08:02 Anahkiasen

:+1:

moacirosa avatar Jul 31 '13 22:07 moacirosa