1.0.24 • Published 8 years ago

cssobj-plugin-post-cssom v1.0.24

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

cssobj-plugin-post-cssom

Apply cssobj Virtual CSS into browser's CSSOM.

This plugin already integrated into cssobj, don't apply it twice if you use cssobj.

Usage

var cssobj_core = require('cssobj-core')
var pluginCSSOM = require('cssobj-plugin-post-cssom')
var cssobj = cssobj_core({plugins: {post: pluginCSSOM(option) }})
cssobj(obj)

// cssobj will auto applied into <head>

Install

npm install cssobj/cssobj-plugin-post-cssom

API

var plugin = pluginCSSOM(option)

Get plugin function to apply, pass option.

PARAMS

option

  • name : {string} The id for <style> tag, if omit, will using random string.

  • attrs : {object} The key/val to apply to <style> tag as attributes.

RETURN

A function can be as cssobj post plugin.

Example

pluginCSSOM({name:'index-page-style'})

pluginCSSOM({name:'index-page-style', attrs:{type:'text/css', media:'screen'} })

Helpers

This plugin can use with plugin-csstext to display cssText from generated CSSOM.

1.0.24

8 years ago

1.0.8

8 years ago

1.0.3

8 years ago