Skip to content

Commit

Permalink
Fix print-color-adjust in FF
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed May 2, 2022
1 parent 0a82431 commit 8fe5b66
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/hacks/print-color-adjust.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ class PrintColorAdjust extends Declaration {
* Change property name for WebKit-based browsers
*/
prefixed(prop, prefix) {
return prefix + 'print-color-adjust'
if (prefix === '-moz-') {
return 'color-adjust'
} else {
return prefix + 'print-color-adjust'
}
}

/**
Expand Down
6 changes: 5 additions & 1 deletion test/autoprefixer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,11 @@ function prefixer(name) {
return selectorer
} else if (name === 'selectors' || name === 'file-selector-button') {
return fileSelectorButtoner
} else if (name === 'selectors' || name === 'autofill') {
} else if (
name === 'selectors' ||
name === 'autofill' ||
name === 'print-color-adjust'
) {
return autofiller
} else if (name === 'placeholder-shown') {
return placeholderShowner
Expand Down
1 change: 1 addition & 0 deletions test/cases/print-color-adjust.out.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@

.b {
-webkit-print-color-adjust: exact;
color-adjust: exact;
print-color-adjust: exact;
}

1 comment on commit 8fe5b66

@ai
Copy link
Member Author

@ai ai commented on 8fe5b66 May 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@web2033 send PR to Tailwind to fix the color-adjust

Please sign in to comment.