Skip to content

Commit 1cdc770

Browse files
jonnittoreinink
andauthored
Remove typography styles from not-prose elements in addition to their children (#301)
* Ignore not-prose also on the element itself * Update tests * Update changelog --------- Co-authored-by: Jonathan Reinink <jonathan@reinink.ca>
1 parent ee884f3 commit 1cdc770

File tree

3 files changed

+209
-119
lines changed

3 files changed

+209
-119
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Fixed
1111

1212
- Fix space between `<figcaption>` and `<pre>` ([#313](https://github.com/tailwindlabs/tailwindcss-typography/pull/313))
13+
- Remove typography styles from `not-prose` elements in addition to their children ([#301](https://github.com/tailwindlabs/tailwindcss-typography/pull/301))
1314

1415
## [0.5.9] - 2023-01-10
1516

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ function inWhere(selector, { className, modifier, prefix }) {
1919
let [trailingPseudo, rebuiltSelector] = commonTrailingPseudos(selector)
2020

2121
if (trailingPseudo) {
22-
return `:where(${selectorPrefix}${rebuiltSelector}):not(:where([class~="${prefixedNot}"] *))${trailingPseudo}`
22+
return `:where(${selectorPrefix}${rebuiltSelector}):not(:where([class~="${prefixedNot}"],[class~="${prefixedNot}"] *))${trailingPseudo}`
2323
}
2424

25-
return `:where(${selectorPrefix}${selector}):not(:where([class~="${prefixedNot}"] *))`
25+
return `:where(${selectorPrefix}${selector}):not(:where([class~="${prefixedNot}"],[class~="${prefixedNot}"] *))`
2626
}
2727

2828
function isObject(value) {

0 commit comments

Comments
 (0)