Skip to content

Commit

Permalink
feat: add types for safelist options
Browse files Browse the repository at this point in the history
  • Loading branch information
cossssmin committed Nov 19, 2024
1 parent 0ca8510 commit 6e1610f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
18 changes: 18 additions & 0 deletions types/css/inline.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,4 +233,22 @@ export default interface InlineCSSConfig {
* ```
*/
preferUnitlessValues?: boolean;

/**
* Array of CSS selectors that should be preserved after inlining.
*
* @default [] // array of email-client targeting selectors
*
* @example
* ```
* export default {
* css: {
* inline: {
* safelist: ['.line', '.bg-red-200']
* }
* }
* }
* ```
*/
safelist?: string[];
}
4 changes: 2 additions & 2 deletions types/css/purge.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ export default interface PurgeCSSConfig {
* export default {
* css: {
* purge: {
* whitelist: ['.some-class', '.Mso*', '#*'],
* safelist: ['.some-class', '.Mso*', '#*'],
* }
* }
* }
* ```
*/
whitelist?: Opts['whitelist'];
safelist?: Opts['whitelist'];

/**
* Start and end delimiters for computed classes that you don't want removed.
Expand Down

0 comments on commit 6e1610f

Please sign in to comment.