Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add <picture> styles #314

Merged
merged 2 commits into from
Aug 30, 2023
Merged
Changes from 1 commit
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
Next Next commit
Add <picture> styles
  • Loading branch information
reinink committed Aug 30, 2023
commit 554959caaa5065cbdb85797f8b8b4e0fb1e4c77c
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