Skip to content

add a flag to ouptut instead of modify #18

Description

@Kikobeats

The case of use of this library for me is get the gradient style to apply instead of specify what element modify.

I think that could be much clear to use and accord with the definition of 'simple'. For example:

var gradient = colorify({container: #myImage})
// => { 'background-image': 'linear-gradient(to right bottom, rgb(0, 0, 0), rgb(0, 0, 0))'}

Now I can select the container that I want to apply the style. If I pass a container with more than one image:

var gradient = colorify({container: #myImages})
// => { image1: 'background-image': 'linear-gradient(to right bottom, rgb(0, 0, 0), rgb(0, 0, 0))',
//      image2: 'background-image': 'linear-gradient(to right bottom, rgb(0, 0, 0), rgb(0, 0, 0))',
//      image3: 'background-image': 'linear-gradient(to right bottom, rgb(0, 0, 0), rgb(0, 0, 0))' }

Just an example, but I think If the library follow this approach could be more flexible.

As simple idea, separate the process to get the color from the process of apply the color.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions