All Projects → jedmao → Postcss Nested Props

jedmao / Postcss Nested Props

Licence: mit
PostCSS plugin to unwrap nested properties.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Postcss Nested Props

Naomi
Sublime Text enhanced syntax highlighting for JavaScript ES6/ES7/ES2015/ES2016/ES2017+, Babel, FlowType, React JSX, Styled Components, HTML5, SCSS3, PHP 7, phpDoc, PHPUnit, MQL4. Basic: Git config files.
Stars: ✭ 544 (+837.93%)
Mutual labels:  sass, postcss
Postcss Triangle
PostCSS plugin to create a triangle.
Stars: ✭ 57 (-1.72%)
Mutual labels:  postcss, postcss-plugin
Postcss Easing Gradients
PostCSS plugin to create smooth linear-gradients that approximate easing functions.
Stars: ✭ 689 (+1087.93%)
Mutual labels:  postcss, postcss-plugin
Postcss Sprites
Generate sprites from stylesheets.
Stars: ✭ 402 (+593.1%)
Mutual labels:  postcss, postcss-plugin
Postcss Banner
PostCSS plugin to add text banner and footer to resulting file
Stars: ✭ 13 (-77.59%)
Mutual labels:  postcss, postcss-plugin
Rollup Plugin Postcss
Seamless integration between Rollup and PostCSS.
Stars: ✭ 507 (+774.14%)
Mutual labels:  sass, postcss
Postcss Import
PostCSS plugin to inline @import rules content
Stars: ✭ 1,048 (+1706.9%)
Mutual labels:  postcss, postcss-plugin
Vscode Stylelint
A Visual Studio Code extension to lint CSS/SCSS/Less with stylelint
Stars: ✭ 260 (+348.28%)
Mutual labels:  sass, postcss
Postcss Interpolate
PostCSS plugin for values interpolation between breakpoints.
Stars: ✭ 9 (-84.48%)
Mutual labels:  postcss, postcss-plugin
Concise.css
A CSS framework that's lightweight and easy-to-use. Give up the bloat. Stop tripping over your classes. Be Concise.
Stars: ✭ 941 (+1522.41%)
Mutual labels:  sass, postcss
Gulp Tutorial
Code examples for my Gulp.js tutorial series
Stars: ✭ 383 (+560.34%)
Mutual labels:  sass, postcss
Postcss Icon
PostCSS plugin that adds `css icons` from icon sets
Stars: ✭ 20 (-65.52%)
Mutual labels:  postcss, postcss-plugin
Postcss Responsive Type
Automagical responsive typography, built on PostCSS
Stars: ✭ 363 (+525.86%)
Mutual labels:  postcss, postcss-plugin
Typescript Plugin Css Modules
A TypeScript language service plugin providing support for CSS Modules.
Stars: ✭ 520 (+796.55%)
Mutual labels:  sass, postcss
Kratos Boilerplate
🔥 A simple boilerplate for creating statics PWA using Webpack, Pug, PostCSS and CSS Modules
Stars: ✭ 308 (+431.03%)
Mutual labels:  sass, postcss
Purgecss
Remove unused CSS
Stars: ✭ 6,566 (+11220.69%)
Mutual labels:  postcss-plugin, postcss
postcss-relaxed-unit
🍮Postcss-relaxed-unit is a postcss plugin for unit tranformation and make write css easier with custom unit.
Stars: ✭ 44 (-24.14%)
Mutual labels:  postcss, postcss-plugin
postcss-momentum-scrolling
PostCSS plugin add 'momentum' style scrolling behavior (-webkit-overflow-scrolling: touch) for elements with overflow (scroll, auto) on iOS
Stars: ✭ 69 (+18.97%)
Mutual labels:  postcss, postcss-plugin
Postcss Position
PostCSS plugin that adds shorthand declarations for position attributes
Stars: ✭ 26 (-55.17%)
Mutual labels:  postcss, postcss-plugin
Postcss Register Custom Props
PostCSS plugin that transforms custom property registration in CSS to JS
Stars: ✭ 20 (-65.52%)
Mutual labels:  postcss, postcss-plugin

postcss-nested-props

NPM version npm license Travis Build Status codecov Dependency Status

npm

PostCSS plugin to unwrap nested properties.

Nested Properties

CSS has quite a few properties that are in “namespaces;” for instance, font-family, font-size, and font-weight are all in the font namespace. In CSS, if you want to set a bunch of properties in the same namespace, you have to type it out each time. This plugin provides a shortcut: just write the namespace once, then nest each of the sub-properties within it. For example:

.funky {
  font: {
    family: fantasy;
    size: 30em;
    weight: bold;
  }
}

is compiled to:

.funky {
  font-family: fantasy;
  font-size: 30em;
  font-weight: bold;
}

The property namespace itself can also have a value. For example:

.funky {
  font: 20px/24px fantasy {
    weight: bold;
  }
}

is compiled to:

.funky {
  font: 20px/24px fantasy;
  font-weight: bold;
}

For nested rules, use the postcss-nested plugin, but make sure to run it after this one.

Installation

$ npm install postcss-nested-props

Usage

JavaScript

postcss([ require('postcss-nested-props') ]);

TypeScript

import * as postcssNestedProps from 'postcss-nested-props';

postcss([ postcssNestedProps ]);

Options

None at this time.

Testing

Run the following command:

$ npm test

This will build scripts, run tests and generate a code coverage report. Anything less than 100% coverage will throw an error.

Watching

For much faster development cycles, run the following commands in 2 separate processes:

$ npm run build:watch

Compiles TypeScript source into the ./dist folder and watches for changes.

$ npm run watch

Runs the tests in the ./dist folder and watches for changes.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].