-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[color-adjust]: added support for color-adjust declarations (#1007)
* wip: added hack and test, awaiting for caniuse PR * test(autprefixer): added `color-adjust` property to COMMONS
- Loading branch information
Showing
6 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
const Declaration = require('../declaration'); | ||
|
||
class ColorAdjust extends Declaration { | ||
|
||
static names = ['color-adjust']; | ||
|
||
/** | ||
* Change property name for -webkit browsers | ||
*/ | ||
prefixed(prop, prefix) { | ||
return prefix + 'print-color-adjust'; | ||
} | ||
|
||
/** | ||
* Return property name by spec | ||
*/ | ||
normalize() { | ||
return 'color-adjust'; | ||
} | ||
} | ||
|
||
module.exports = ColorAdjust; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.economy { | ||
color-adjsut: economy; | ||
} | ||
|
||
.exact { | ||
color-adjsut: exact; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.economy { | ||
-webkit-print-color-adjust: economy; | ||
color-adjsut: economy; | ||
} | ||
|
||
.exact { | ||
-webkit-print-color-adjust: exact; | ||
color-adjsut: exact; | ||
} |