postcss-utilities
Advanced tools
Comparing version 0.4.0 to 0.4.1
# Change Log | ||
# v0.4.2 | ||
- Add text-stroke utility | ||
# v0.4.0 | ||
@@ -4,0 +8,0 @@ |
@@ -32,2 +32,3 @@ var postcss = require('postcss'); | ||
var textHide = require('./lib/text-hide'); | ||
var textStroke = require('./lib/text-stroke'); | ||
var triangle = require('./lib/triangle'); | ||
@@ -66,2 +67,3 @@ var truncate = require('./lib/truncate'); | ||
'text-hide', | ||
'text-stroke', | ||
'triangle', | ||
@@ -254,2 +256,5 @@ 'truncate', | ||
break; | ||
case 'text-stroke': | ||
textStroke(util, args); | ||
break; | ||
case 'triangle': | ||
@@ -256,0 +261,0 @@ if (args.length > 1 && args.length !== 4) { |
@@ -5,10 +5,4 @@ /** | ||
*/ | ||
function unit(x) { | ||
return x.match(/[a-zA-Z]+/g)[0]; | ||
} | ||
var helpers = require('./helpers'); | ||
function value(x) { | ||
return x.match(/[0-9&.]+/g)[0]; | ||
} | ||
module.exports = function (decl, args, postcss) { | ||
@@ -19,5 +13,5 @@ var minResDppx = 1.25; | ||
if (args[1]) { | ||
if (unit(args[1]) === 'dppx') { | ||
minResDppx = value(args[1]); | ||
minResDpi = value(args[1]) * 96; | ||
if (helpers.unit(args[1]) === 'dppx') { | ||
minResDppx = helpers.value(args[1]); | ||
minResDpi = helpers.value(args[1]) * 96; | ||
} | ||
@@ -27,5 +21,5 @@ } | ||
if (args[1]) { | ||
if (unit(args[1]) === 'dpi') { | ||
minResDpi = value(args[1]); | ||
minResDppx = value(args[1]) / 96; | ||
if (helpers.unit(args[1]) === 'dpi') { | ||
minResDpi = helpers.value(args[1]); | ||
minResDppx = helpers.value(args[1]) / 96; | ||
} | ||
@@ -32,0 +26,0 @@ } |
{ | ||
"name": "postcss-utilities", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "PostCSS plugin to add a collection of mixins, shortcuts, helpers and tools for your CSS", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -59,2 +59,3 @@ # PostCSS Utility Library [![Build Status][ci-img]][ci] | ||
- [text-hide](https://ismamz.github.io/postcss-utilities/docs#text-hide) | ||
- [text-stroke](https://ismamz.github.io/postcss-utilities/docs#text-stroke) | ||
- [triangle](https://ismamz.github.io/postcss-utilities/docs#triangle) | ||
@@ -61,0 +62,0 @@ - [truncate](https://ismamz.github.io/postcss-utilities/docs#truncate) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76403
83
2421
127