Webanizr Logo
Open / sluit menu
Module createCSS

The createCSS module creates new css within a stylesheet instead of applying it directly on nodes. The advantage is that it does not overwrite more strict defined css that is already available. The new css can also be overwritten by applying classes to nodes with more strict definitions.

syntax

webanizr.send('createCSS', data, parameters, callback);

data

The css that should be added. As keys it has the selectors that should be added. The values are key-value pairs representing the attributes and corresponding values. Example:

{
    ".centercontent > #node" :
    {
        "color" : "red",
        "background-color" : "#eee",
        "padding" : "20px"
    }
}

parameters

The createCSS parameter accepts no parameters at this moment.

callback

The callback is called directly after the manipulations and receives the css data unaltered.

demo

https://cdn.cpmodules.webanizr.com/demo/css-for-selectors/index.html