Skip to content

Style Parser

Malexion edited this page Nov 6, 2016 · 2 revisions

new __.lib.StyleParser([options])

  • [options] [Optional] Options param, {...} key - value groups for style properties.

Examples

var style = new __.lib.StyleParser({ height: '100px' });

style.update({ 
   height: '200px', 
   width: '50px', 
   'font-style': 'bold', 
   'overflow-y': 'auto' 
});
style['width'] = '50%';
style.remove('font-style');
style.update('overflow-y: scroll;');

console.log(style.asString);
console.log(style.asObject);

style.clear();
console.log(style.asString);

Clone this wiki locally