Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-button

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-button

A PostCSS plugin to create buttons.

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
34
increased by6.25%
Maintainers
1
Weekly downloads
 
Created
Source

postcss-button Build Status

francoisromain.github.io/postcss-button

A PostCSS plugin to create buttons.


Installation

Install the npm module:

$ npm install postcss-button --save-dev

Require the PostCSS plugin:

postcss([ require('postcss-button') ])

See PostCSS docs to setup with Gulp, Grunt, Webpack, npm scripts…


Configuration (optional)

The default settings can be overrided with an atrule:


@button {
  color: grey;
  background-color: white;
  color-active: black;
  background-color-active: silver;
  border-width: 0;
  border-style: none;
  border-color: grey;
  border-color-active: black;
  border-radius: 0;
  class-active: active;
  class-disabled: disabled;
}

Usage

There are two ways of declaring a button:

  • With an atRule declaration
  • With specific declarations

With an atRule declaration

@button [name] {
  color: grey;
  background-color: white;
  color-active: black;
  background-color-active: silver;
  border-width: 0;
  border-style: none;
  border-color: grey;
  border-color-active: black;
  border-radius: 0;
  class-active: active;
  class-disabled: disabled;
}

.my-button {
  button: [name]
}
  • name: custom identifier

With specific declarations

.my-button {
  button-color: [color] [background-color] [color-active] [background-color-active];
  button-border: [width] [style] [color] [color-active];
  button-radius: [size];
  button-classes: [active] [disabled];
}

Missing declarations will use the default settings.

Example: input, output, markup, demo

Keywords

FAQs

Package last updated on 25 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc