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

stylelint-rational-order-plugin

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylelint-rational-order-plugin

Stylelint plugin that sorts related property declarations by grouping together following the order: Positioning, Box Model, Typography, Visual, Animation, Other.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.4K
increased by0.14%
Maintainers
1
Weekly downloads
 
Created
Source

stylelint-rational-order-plugin

NPM version Build status License

Stylelint config that sorts related property declarations by grouping together following the order:

  1. Positioning
  2. Box Model
  3. Typography
  4. Visual
  5. Animation
  6. Misc
.declaration-order {
  /* Positioning */
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;

  /* Box Model */
  display: block;
  float: right;
  width: 100px;
  height: 100px;
  margin: 10px;
  padding: 10px;

  /* Typography */
  color: #888;
  font: normal 16px Helvetica, sans-serif;
  line-height: 1.3;
  text-align: center;

  /* Visual */
  background-color: #eee;
  border: 1px solid #888;
  border-radius: 4px;
  opacity: 1;

  /* Animation */
  transition: all 1s;

  /* Misc */
  user-select: none;
}

Usage

  1. Add stylelint and this package to your project:
npm install --save-dev stylelint stylelint-rational-order-plugin
# or, if you prefer yarn over npm:
yarn add --dev stylelint stylelint-rational-order-plugin
  1. Add this package to the end of your extends array inside Stylelint configuration (.stylelintrc for example):
{
  "plugins": [
    "stylelint-rational-order-plugin"
  ],
  "plugin/rational-order": true
}

Options

Boolean, or an array of options, where the first element is true, and the second is an options object.

Boolean option

true: Enables the plugin.

false: Disables the plugin.

Optional secondary options

"borderInBoxModel": Boolean

Default border property belongs to the visual section "borderInBoxModel": false. If true border property belongs to the box model section.

"emptyLineBeetweenGroup": Boolean

This option adds an empty line between groups. Default false.

Credits

Keywords

FAQs

Package last updated on 24 Feb 2019

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