ElkArte Community

General => Chit Chat => Topic started by: meetdilip on June 14, 2016, 11:21:44 am

Title: CSS Patterns
Post by: meetdilip on June 14, 2016, 11:21:44 am
No more images. Go all CSS

http://lea.verou.me/css3patterns/
Title: Re: CSS Patterns
Post by: Antechinus on June 14, 2016, 05:03:36 pm
Been around for yonks. Have even used them at times, just for fun. CSS needs processing too. Don't just assume it will always need less.
Title: Re: CSS Patterns
Post by: meetdilip on June 14, 2016, 06:30:29 pm
Quote from: Antechinus – Been around for yonks. Have even used them at times, just for fun. CSS needs processing too. Don't just assume it will always need less.

Faster and better than images, I guess.
Title: Re: CSS Patterns
Post by: Antechinus on June 15, 2016, 01:44:11 am
Well, yes and no and maybe. Depends. Setting up those patterns can require a lot of CSS. This can be a/ hard to write and b/ hard to customise and c/ hard for some devices to process, depending on how over the top you get with your CSS. I know box-shadow use to kill IE9 pretty easily just as one random example.

Someone who has PS or GIMP may well be able to make a small repeating image easier than they can write CSS for a CSS-only pattern. The small repeating image may contain fewer bytes, or not a lot more, compared to a CSS pattern. It may require less processing by the browser. It's probably easier for beginners to edit, as long as they have PS or GIMP (or Irfanview or whatever).

So sometimes using a CSS pattern might be better. Other times it might not be. You'd have to benchmark it to know for sure, and you'd have to tie that in with any concerns about ease of customisation. If you want to know about benchmarking, ask Lea Verou. She's probably done it already. Knows her stuff pretty well.