Skip to content

Commit 5e8c4a9

Browse files
authored
Add <picture> styles (tailwindlabs#314)
* Add `<picture>` styles * Update changelog
1 parent 1cdc770 commit 5e8c4a9

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

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))
14+
- Add `<picture>` styles ([#314](https://github.com/tailwindlabs/tailwindcss-typography/pull/314))
1415

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

src/styles.js

+43
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ let defaultModifiers = {
5656
marginTop: em(24, 14),
5757
marginBottom: em(24, 14),
5858
},
59+
picture: {
60+
marginTop: em(24, 14),
61+
marginBottom: em(24, 14),
62+
},
63+
'picture > img': {
64+
marginTop: '0',
65+
marginBottom: '0',
66+
},
5967
video: {
6068
marginTop: em(24, 14),
6169
marginBottom: em(24, 14),
@@ -234,6 +242,14 @@ let defaultModifiers = {
234242
marginTop: em(32, 16),
235243
marginBottom: em(32, 16),
236244
},
245+
picture: {
246+
marginTop: em(32, 16),
247+
marginBottom: em(32, 16),
248+
},
249+
'picture > img': {
250+
marginTop: '0',
251+
marginBottom: '0',
252+
},
237253
video: {
238254
marginTop: em(32, 16),
239255
marginBottom: em(32, 16),
@@ -412,6 +428,14 @@ let defaultModifiers = {
412428
marginTop: em(32, 18),
413429
marginBottom: em(32, 18),
414430
},
431+
picture: {
432+
marginTop: em(32, 18),
433+
marginBottom: em(32, 18),
434+
},
435+
'picture > img': {
436+
marginTop: '0',
437+
marginBottom: '0',
438+
},
415439
video: {
416440
marginTop: em(32, 18),
417441
marginBottom: em(32, 18),
@@ -590,6 +614,14 @@ let defaultModifiers = {
590614
marginTop: em(40, 20),
591615
marginBottom: em(40, 20),
592616
},
617+
picture: {
618+
marginTop: em(40, 20),
619+
marginBottom: em(40, 20),
620+
},
621+
'picture > img': {
622+
marginTop: '0',
623+
marginBottom: '0',
624+
},
593625
video: {
594626
marginTop: em(40, 20),
595627
marginBottom: em(40, 20),
@@ -768,6 +800,14 @@ let defaultModifiers = {
768800
marginTop: em(48, 24),
769801
marginBottom: em(48, 24),
770802
},
803+
picture: {
804+
marginTop: em(48, 24),
805+
marginBottom: em(48, 24),
806+
},
807+
'picture > img': {
808+
marginTop: '0',
809+
marginBottom: '0',
810+
},
771811
video: {
772812
marginTop: em(48, 24),
773813
marginBottom: em(48, 24),
@@ -1350,6 +1390,9 @@ module.exports = {
13501390
color: 'inherit',
13511391
},
13521392
img: {}, // Required to maintain correct order when merging
1393+
picture: {
1394+
display: 'block',
1395+
},
13531396
code: {
13541397
color: 'var(--tw-prose-code)',
13551398
fontWeight: '600',

0 commit comments

Comments
 (0)