Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including postcss-browser-reporter with all npm packages installed. Try it out:

var postcssBrowserReporter = require("postcss-browser-reporter")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

postcss-browser-reporter v0.6.0

PostCSS plugin to report warning messages right in your browser

PostCSS Browser Reporter Build Status

PostCSS plugin to report warning messages right in your browser.

If a plugin before this one is throwing a warning, this plugin will append warning messages to html:before.

Postcss-browser-reporter – warnings from other postcss plugins in your browser

Usage

Put this plugin after all plugins if you want to cover all possible warnings:

postcss([
  require('other-plugin'),
  require('postcss-browser-reporter')
])

Options

selector ({String}, default: html::before)

You can override selector that will be used to display messages:

var messages = require('postcss-browser-reporter')
postcss([
  messages({
    selector: 'body:before'
  })
])

styles ({Object}, default: opinionated styles)

You can override default styles applied to the selector:

var messages = require('postcss-browser-reporter')
postcss([
  messages({
    styles: {
      color: 'gray',
      'text-align': 'center'
    }
  })
])

See PostCSS docs for examples for your environment.

License

The MIT License

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free