Skip to content

Commit 0339c42

Browse files
authored
Fix prose-invert when used with colors in light mode (#315)
* Fix `prose-invert` when used with colors in light mode * Update changelog
1 parent 5e8c4a9 commit 0339c42

File tree

2 files changed

+23
-22
lines changed

2 files changed

+23
-22
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Fix space between `<figcaption>` and `<pre>` ([#313](https://github.com/tailwindlabs/tailwindcss-typography/pull/313))
1313
- Remove typography styles from `not-prose` elements in addition to their children ([#301](https://github.com/tailwindlabs/tailwindcss-typography/pull/301))
1414
- Add `<picture>` styles ([#314](https://github.com/tailwindlabs/tailwindcss-typography/pull/314))
15+
- Fix `prose-invert` when used with colors in light mode ([#315](https://github.com/tailwindlabs/tailwindcss-typography/pull/315))
1516

1617
## [0.5.9] - 2023-01-10
1718

src/styles.js

+22-22
Original file line numberDiff line numberDiff line change
@@ -940,28 +940,6 @@ let defaultModifiers = {
940940
],
941941
},
942942

943-
// Invert (for dark mode)
944-
invert: {
945-
css: {
946-
'--tw-prose-body': 'var(--tw-prose-invert-body)',
947-
'--tw-prose-headings': 'var(--tw-prose-invert-headings)',
948-
'--tw-prose-lead': 'var(--tw-prose-invert-lead)',
949-
'--tw-prose-links': 'var(--tw-prose-invert-links)',
950-
'--tw-prose-bold': 'var(--tw-prose-invert-bold)',
951-
'--tw-prose-counters': 'var(--tw-prose-invert-counters)',
952-
'--tw-prose-bullets': 'var(--tw-prose-invert-bullets)',
953-
'--tw-prose-hr': 'var(--tw-prose-invert-hr)',
954-
'--tw-prose-quotes': 'var(--tw-prose-invert-quotes)',
955-
'--tw-prose-quote-borders': 'var(--tw-prose-invert-quote-borders)',
956-
'--tw-prose-captions': 'var(--tw-prose-invert-captions)',
957-
'--tw-prose-code': 'var(--tw-prose-invert-code)',
958-
'--tw-prose-pre-code': 'var(--tw-prose-invert-pre-code)',
959-
'--tw-prose-pre-bg': 'var(--tw-prose-invert-pre-bg)',
960-
'--tw-prose-th-borders': 'var(--tw-prose-invert-th-borders)',
961-
'--tw-prose-td-borders': 'var(--tw-prose-invert-td-borders)',
962-
},
963-
},
964-
965943
// Gray color themes
966944

967945
slate: {
@@ -1269,6 +1247,28 @@ let defaultModifiers = {
12691247
'--tw-prose-invert-links': colors.rose[500],
12701248
},
12711249
},
1250+
1251+
// Invert (for dark mode)
1252+
invert: {
1253+
css: {
1254+
'--tw-prose-body': 'var(--tw-prose-invert-body)',
1255+
'--tw-prose-headings': 'var(--tw-prose-invert-headings)',
1256+
'--tw-prose-lead': 'var(--tw-prose-invert-lead)',
1257+
'--tw-prose-links': 'var(--tw-prose-invert-links)',
1258+
'--tw-prose-bold': 'var(--tw-prose-invert-bold)',
1259+
'--tw-prose-counters': 'var(--tw-prose-invert-counters)',
1260+
'--tw-prose-bullets': 'var(--tw-prose-invert-bullets)',
1261+
'--tw-prose-hr': 'var(--tw-prose-invert-hr)',
1262+
'--tw-prose-quotes': 'var(--tw-prose-invert-quotes)',
1263+
'--tw-prose-quote-borders': 'var(--tw-prose-invert-quote-borders)',
1264+
'--tw-prose-captions': 'var(--tw-prose-invert-captions)',
1265+
'--tw-prose-code': 'var(--tw-prose-invert-code)',
1266+
'--tw-prose-pre-code': 'var(--tw-prose-invert-pre-code)',
1267+
'--tw-prose-pre-bg': 'var(--tw-prose-invert-pre-bg)',
1268+
'--tw-prose-th-borders': 'var(--tw-prose-invert-th-borders)',
1269+
'--tw-prose-td-borders': 'var(--tw-prose-invert-td-borders)',
1270+
},
1271+
},
12721272
}
12731273

12741274
module.exports = {

0 commit comments

Comments
 (0)