CSS gradient placeholders
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 5 commits ahead of fraser-hemp:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
demo.html
grad.js

README.md

gradify

A module to produce CSS gradients as placeholders for images.

gradify showcase

0.1.1 (beta)

The JS version was quickly written to use as an example on the website, and needs further work. In this fork, some bug fix was added as well as the possibility to return just the plain style text.

The demo.html was developed as a demonstration to get the gradient result of grad.js to use as placeholders in lazy load technique applied in pictures. Thus, it is possible to preprocess the pictures and do not require them before the actual need on the page.

More automations can be used as using asynchronous techniques to send the plain text style classes to back-end platforms and so write a style file.

Usage

Include the images to process following the demo.html example, and just run the page in one browser. Make sure each image element have distinct id values.

License MIT

Copyright (c) 2015 Fraser Hemphill

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.