Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Add `prose-picture` modifier ([#367](https://github.com/tailwindlabs/tailwindcss-typography/pull/367))

### Fixed

- Include unit in `hr` border-width value ([#379](https://github.com/tailwindlabs/tailwindcss-typography/pull/379)
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ Here's a complete list of available element modifiers:
| `prose-th:{utility}` | `th` |
| `prose-td:{utility}` | `td` |
| `prose-img:{utility}` | `img` |
| `prose-picture:{utility}` | `picture` |
| `prose-video:{utility}` | `video` |
| `prose-hr:{utility}` | `hr` |

Expand Down Expand Up @@ -345,9 +346,9 @@ See our internal [style definitions](https://github.com/tailwindlabs/tailwindcss
If you need to use a class name other than `prose` for any reason, you can do so using the `className` option when registering the plugin:

```css
@import "tailwindcss";
@import 'tailwindcss';
@plugin "@tailwindcss/typography" {
className: wysiwyg;
classname: wysiwyg;
}
```

Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ module.exports = plugin.withOptions(
['th'],
['td'],
['img'],
['picture'],
['video'],
['hr'],
['lead', '[class~="lead"]'],
Expand Down Expand Up @@ -132,4 +133,3 @@ module.exports = plugin.withOptions(
}
}
)

6 changes: 6 additions & 0 deletions src/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,7 @@ test('element variants', async () => {
prose-th:text-left
prose-td:align-center
prose-img:rounded-lg
prose-picture:my-8
prose-video:my-12
prose-hr:border-t-2
"
Expand Down Expand Up @@ -855,6 +856,11 @@ test('element variants', async () => {
:is(:where(img):not(:where([class~='not-prose'], [class~='not-prose'] *))) {
border-radius: 0.5rem;
}
.prose-picture\:my-8
:is(:where(picture):not(:where([class~='not-prose'], [class~='not-prose'] *))) {
margin-top: 2rem;
margin-bottom: 2rem;
}
.prose-video\:my-12
:is(:where(video):not(:where([class~='not-prose'], [class~='not-prose'] *))) {
margin-top: 3rem;
Expand Down