GitXplorerGitXplorer
k

postcss-content-width-unit

public
2 stars
0 forks
0 issues

Commits

List of commits on branch master.
Verified
5b884344792993663fea122b6a723006ffd6fa5c

1.0.0-5

kkinday committed 8 years ago
Verified
46378b8541f3ce8f6f1045e657bc08099c374f52

Handle nested values

kkinday committed 8 years ago
Unverified
328bd11c329730fd55a3cdbe808afa136d82ee31

1.0.0-4

kkinday committed 8 years ago
Unverified
f88b2c279e5054c8fac6704bd1e10439d8e09407

Refactor to suit code style

kkinday committed 8 years ago
Unverified
320ce08149f743b2d4df6a13bd8ee887d653c714

Fix “Unknown word” error

kkinday committed 8 years ago
Unverified
bcd5c16590fe912ee6b9473a646d6b2e33a26fa3

Fix false positive tests

kkinday committed 8 years ago

README

The README file for this repository.

PostCSS Content Width Unit Build Status Coverage Status

PostCSS plugin which adds limit to vw unit.

.foo {
  padding: 30rpx;
}
/* assuming contentMaxWidth = '1280px' */
.foo {
  padding: 2.3437vw;
}

@media screen and (min-width: 1280px) {
  .foo {
    padding: 30px;
  }
}

Usage

var contentWidthUnit = require('postcss-content-width-unit');

postcss([
  contentWidthUnit({contentMaxWidth: '1280px'})
]);

Options

contentMaxWidth: string, required

The global max-width value. Can be a variable name.

unit: string, optional, default: rpx

Content width unit which would be converted to regular CSS units.


See PostCSS docs for examples for your environment.