Skip to content

Commit

Permalink
fix(postcss-colormin): don't minify colors in src declarations
Browse files Browse the repository at this point in the history
Fixes #1463
  • Loading branch information
Invizory authored and ludofischer committed Feb 11, 2023
1 parent a32df1a commit 773cfb6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/postcss-colormin/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function pluginCreator(config = {}) {
OnceExit(css) {
css.walkDecls((decl) => {
if (
/^(composes|font|filter|-webkit-tap-highlight-color)/i.test(
/^(composes|font|src$|filter|-webkit-tap-highlight-color)/i.test(
decl.prop
)
) {
Expand Down
6 changes: 6 additions & 0 deletions packages/postcss-colormin/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,4 +245,10 @@ test(
env: 'chrome62',
})
);

test(
'should not attempt to convert font names',
passthroughCSS('@font-face{src:local(Noto Sans Black)}')
);

test.run();

0 comments on commit 773cfb6

Please sign in to comment.