Skip to content

Commit

Permalink
feat: set important: true
Browse files Browse the repository at this point in the history
  • Loading branch information
cossssmin committed Jul 15, 2024
1 parent ee8f3b6 commit 4fc6e22
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ The plugin is basically a custom Tailwind CSS config that changes utility classe

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

### important

The `important` key is set to `true`.

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`).

### screens

The `screens` config uses a desktop-first approach now:
Expand Down
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const { disabledFilterPlugins, ...filterPlugins } = require('./filters')

/** @type {import('tailwindcss').Config} */
module.exports = {
important: true,
theme: {
screens: {
sm: {max: '600px'},
Expand Down
1 change: 1 addition & 0 deletions src/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function run(config, css = '@tailwind utilities', plugin = tailwindcss) {
config = {
...{
presets: [emailPreset],
important: false,
},
...config,
}
Expand Down

0 comments on commit 4fc6e22

Please sign in to comment.