postcss-overflow-ellipsis
Advanced tools
Comparing version 0.1.0 to 0.1.1
28
index.js
@@ -6,18 +6,20 @@ var postcss = require('postcss'); | ||
return function (css) { | ||
css.walkDecls(propertyMatch, decl => { | ||
if (decl.value !== 'ellipsis') return; | ||
function ruleHandler(decl) { | ||
if (decl.value !== 'ellipsis') return; | ||
decl.cloneBefore({ | ||
prop: 'white-space', | ||
value: 'nowrap' | ||
}); | ||
decl.cloneBefore({ | ||
prop: 'text-overflow', | ||
value: 'ellipsis' | ||
}); | ||
decl.cloneBefore({ | ||
prop: 'white-space', | ||
value: 'nowrap' | ||
}); | ||
decl.cloneBefore({ | ||
prop: 'text-overflow', | ||
value: 'ellipsis' | ||
}); | ||
decl.value = 'hidden'; | ||
}); | ||
decl.value = 'hidden'; | ||
} | ||
return function (css) { | ||
css.walkDecls(propertyMatch, ruleHandler); | ||
}; | ||
}); |
{ | ||
"name": "postcss-overflow-ellipsis", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "PostCSS plugin to convert shorthand 'overflow: ellipsis' into the appropriate rules", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -18,4 +18,4 @@ # PostCSS Overflow Ellipsis [![Build Status][ci-img]][ci] | ||
white-space: nowrap; | ||
text-overflow: ellipsis; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
} | ||
@@ -22,0 +22,0 @@ ``` |
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
19
88794