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

Missing element modifier prose-picture #366

Open
tordans opened this issue Dec 5, 2024 · 1 comment
Open

Missing element modifier prose-picture #366

tordans opened this issue Dec 5, 2024 · 1 comment

Comments

@tordans
Copy link

tordans commented Dec 5, 2024

What version of @tailwindcss/typography are you using?

"@tailwindcss/typography": "^0.5.15",

What version of Node.js are you using?

lts/*

What browser are you using?

Chrome

What operating system are you using?

MacOS

Reproduction repository

Describe your issue

The PR #314 (Issue #144) added default styles to the <picture> but there are is no element modifier defined that would allow us to easily change the default styles via classes

I suggest to add two modfiers

  • prose-picture:* targeting <picture>
  • prose-images:* targeting <img> <picture>

Another question that this brings up is, if the prose-img modifier should target the picture>img element as well. It does ATM https://play.tailwindcss.com/VFWabWBye5 so changing this is likely a breaking change and something to be resolved separately?

@tordans tordans changed the title Missing overwrite prose-picture Missing element modifier prose-picture Dec 5, 2024
@tordans
Copy link
Author

tordans commented Dec 5, 2024

Also, just in case someone comes here after using Astros <Picture> Element, there is an easy overwrite:

      <Picture
        src={image}
        formats={['png', 'avif']}
        class="rounded" // classes on the <img> tag
        pictureAttributes={{ class: 'not-prose' }} // classes on the <picture> tag
        alt=""
      />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant