Skip to content

Commit bb44cdc

Browse files
tordansphilipp-spiess
authored andcommitted
Add prose-picture modifiers (#367)
1 parent 9ccbd37 commit bb44cdc

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

CHANGELOG.md

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

88
## [Unreleased]
99

10+
### Added
11+
12+
- Add `prose-picture` modifier ([#367](https://github.com/tailwindlabs/tailwindcss-typography/pull/367))
13+
1014
### Fixed
1115

1216
- Include unit in `hr` border-width value ([#379](https://github.com/tailwindlabs/tailwindcss-typography/pull/379)

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ Here's a complete list of available element modifiers:
190190
| `prose-th:{utility}` | `th` |
191191
| `prose-td:{utility}` | `td` |
192192
| `prose-img:{utility}` | `img` |
193+
| `prose-picture:{utility}` | `picture` |
193194
| `prose-video:{utility}` | `video` |
194195
| `prose-hr:{utility}` | `hr` |
195196

@@ -348,9 +349,9 @@ See our internal [style definitions](https://github.com/tailwindlabs/tailwindcss
348349
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:
349350

350351
```css
351-
@import "tailwindcss";
352+
@import 'tailwindcss';
352353
@plugin "@tailwindcss/typography" {
353-
className: wysiwyg;
354+
classname: wysiwyg;
354355
}
355356
```
356357

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ module.exports = plugin.withOptions(
9999
['th'],
100100
['td'],
101101
['img'],
102+
['picture'],
102103
['video'],
103104
['hr'],
104105
['lead', '[class~="lead"]'],
@@ -135,4 +136,3 @@ module.exports = plugin.withOptions(
135136
}
136137
}
137138
)
138-

src/index.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,7 @@ test('element variants', async () => {
710710
prose-th:text-left
711711
prose-td:align-center
712712
prose-img:rounded-lg
713+
prose-picture:my-8
713714
prose-video:my-12
714715
prose-hr:border-t-2
715716
"
@@ -868,6 +869,11 @@ test('element variants', async () => {
868869
:is(:where(img):not(:where([class~='not-prose'], [class~='not-prose'] *))) {
869870
border-radius: 0.5rem;
870871
}
872+
.prose-picture\:my-8
873+
:is(:where(picture):not(:where([class~='not-prose'], [class~='not-prose'] *))) {
874+
margin-top: 2rem;
875+
margin-bottom: 2rem;
876+
}
871877
.prose-video\:my-12
872878
:is(:where(video):not(:where([class~='not-prose'], [class~='not-prose'] *))) {
873879
margin-top: 3rem;

0 commit comments

Comments
 (0)