cssobj / cssobj-plugin-csstext

Get cssText from CSSOM.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cssobj-plugin-csstext

Join the chat at https://gitter.im/css-in-js/cssobj

DEPRECATED! Use this: cssobj-helper-showcss

Get cssText from cssobj and CSSOM, for debug purpose.

Install

  • npm
npm install cssobj/cssobj-plugin-csstext

Usage:

Option 1 (recommanded): as callback for onUpdate

var result = cssobj(obj, { onUpdate: pluginCssText(callback).post })

function callback(cssText) {
  // for each result.update
  // cssText be the whole cssom text of result

  console.log(cssText)
  // open your console and see the result
}

Option 2: as a plugin

It must load after plugin-cssom.

var pluginCssText = require('cssobj-plugin-csstext')

var result = cssobj(obj)

result.options.plugins.push( pluginCssText(callback) )

About

Get cssText from CSSOM.


Languages

Language:JavaScript 100.0%