Skip to content

Commit 4fc6e22

Browse files
committed
feat: set important: true
1 parent ee8f3b6 commit 4fc6e22

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ The plugin is basically a custom Tailwind CSS config that changes utility classe
5050

5151
Following is a list of the changes made to the default Tailwind CSS config.
5252

53+
### important
54+
55+
The `important` key is set to `true`.
56+
57+
HTML emails often use inline CSS, so this ensures that any CSS generated by Tailwind uses `!important` to override inline styles (unless the inline styles themselves use `!important`).
58+
5359
### screens
5460

5561
The `screens` config uses a desktop-first approach now:

src/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const { disabledFilterPlugins, ...filterPlugins } = require('./filters')
33

44
/** @type {import('tailwindcss').Config} */
55
module.exports = {
6+
important: true,
67
theme: {
78
screens: {
89
sm: {max: '600px'},

src/index.test.js

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ function run(config, css = '@tailwind utilities', plugin = tailwindcss) {
3333
config = {
3434
...{
3535
presets: [emailPreset],
36+
important: false,
3637
},
3738
...config,
3839
}

0 commit comments

Comments
 (0)