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

postcss-utilities

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-utilities

PostCSS plugin to add a collection of mixins, shortcuts, helpers and tools for yout CSS

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.4K
decreased by-20.76%
Maintainers
1
Weekly downloads
 
Created
Source

PostCSS Utility Library Build Status

PostCSS Utility Library

postcss-utilities is a PostCSS plugin that have the most used mixins, shortcuts and helpers to use as @util rules in yours stylesheets.

See Documentation

List of Utilities

What is the difference with preprocessor’s mixins libraries?

  • You don’t need extra files for mixins.
  • You don’t need mixins for vendor prefixes (use autoprefixer plugin for that)
  • You can use with LESS, SASS, pure CSS or whatever you want.

Examples

Input

.truncate {
    @util truncate;
    width: 500px;
}

.cfx {
    @util clearfix;
}

.box-16-9 {
    background-color: #ccc;
    margin-bottom: 20px;
    @util aspect-ratio(16:9);
}

.circle {
    @util circle(200px, red);
}

Output

.truncate {
    width: 500px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cfx:after {
    content: '';
    display: block;
    clear: both;
}

.box-16-9 {
    background-color: #ccc;
    margin-bottom: 20px;
    position: relative;
    display: block;
    height: 0;
    padding: 0;
    overflow: hidden;
    padding-bottom: 56.25%;
}

.circle {
    border-radius: 50%;
    width: 200px;
    height: 200px;
    background-color: red;
}

Usage

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

See PostCSS docs for examples for your environment.

Contributing

The list of utilities is open to new mixins, shortcuts and helpers.

Keywords

FAQs

Package last updated on 07 Jun 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