Skip to content

Commit

Permalink
Add <picture> styles (#314)
Browse files Browse the repository at this point in the history
* Add `<picture>` styles

* Update changelog
  • Loading branch information
reinink committed Aug 30, 2023
1 parent 1cdc770 commit 5e8c4a9
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

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

## [0.5.9] - 2023-01-10

Expand Down
43 changes: 43 additions & 0 deletions src/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ let defaultModifiers = {
marginTop: em(24, 14),
marginBottom: em(24, 14),
},
picture: {
marginTop: em(24, 14),
marginBottom: em(24, 14),
},
'picture > img': {
marginTop: '0',
marginBottom: '0',
},
video: {
marginTop: em(24, 14),
marginBottom: em(24, 14),
Expand Down Expand Up @@ -234,6 +242,14 @@ let defaultModifiers = {
marginTop: em(32, 16),
marginBottom: em(32, 16),
},
picture: {
marginTop: em(32, 16),
marginBottom: em(32, 16),
},
'picture > img': {
marginTop: '0',
marginBottom: '0',
},
video: {
marginTop: em(32, 16),
marginBottom: em(32, 16),
Expand Down Expand Up @@ -412,6 +428,14 @@ let defaultModifiers = {
marginTop: em(32, 18),
marginBottom: em(32, 18),
},
picture: {
marginTop: em(32, 18),
marginBottom: em(32, 18),
},
'picture > img': {
marginTop: '0',
marginBottom: '0',
},
video: {
marginTop: em(32, 18),
marginBottom: em(32, 18),
Expand Down Expand Up @@ -590,6 +614,14 @@ let defaultModifiers = {
marginTop: em(40, 20),
marginBottom: em(40, 20),
},
picture: {
marginTop: em(40, 20),
marginBottom: em(40, 20),
},
'picture > img': {
marginTop: '0',
marginBottom: '0',
},
video: {
marginTop: em(40, 20),
marginBottom: em(40, 20),
Expand Down Expand Up @@ -768,6 +800,14 @@ let defaultModifiers = {
marginTop: em(48, 24),
marginBottom: em(48, 24),
},
picture: {
marginTop: em(48, 24),
marginBottom: em(48, 24),
},
'picture > img': {
marginTop: '0',
marginBottom: '0',
},
video: {
marginTop: em(48, 24),
marginBottom: em(48, 24),
Expand Down Expand Up @@ -1350,6 +1390,9 @@ module.exports = {
color: 'inherit',
},
img: {}, // Required to maintain correct order when merging
picture: {
display: 'block',
},
code: {
color: 'var(--tw-prose-code)',
fontWeight: '600',
Expand Down

1 comment on commit 5e8c4a9

@vercel
Copy link

@vercel vercel bot commented on 5e8c4a9 Aug 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.