Conversation
|
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
size-limit report 📦
|
delucis
left a comment
There was a problem hiding this comment.
Thanks @kevinzunigacuellar!
Not 100% sure if this approach will work or not. For example, not super obvious with the test example of 100px, but shrink the viewport narrow enough and you’ll see this distortion:
This would be more obvious for larger image sizes.
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
|
I am not very happy with this solution either 😓 |
Could we move this to a rehype plugin? |
Yeah I also considered this. I’d honestly love it if Starlight added zero custom rehype plugins to give users a clean slate for their own customisations. Maybe a good opportunity for a third-party plugin that we could recommend? Similar to Edit: Definitely not exactly that — it’s using |
I think that is a valid point and wise idea 👍 Tried quickly right now to see if something like that already existed, I'm a bit surprised it is not (or I did not find it easily) but would be fairly easy to setup and publish for someone (and yeah, definitely without cheerio). |
|
I think a rehype plugin it's a good idea but what about the support for markdoc files? |
Does Markdoc even allow HTML in markup? I think users would need a custom Markdoc tag for an iframe so the tag could also handle this case at the same time I guess? |
|
To get the ball rolling I added a small section to the end of the authoring content page about plugins. |
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
delucis
left a comment
There was a problem hiding this comment.
I think this looks good to me! Do you want to do anything else in this PR @kevinzunigacuellar?
ElianCodes
left a comment
There was a problem hiding this comment.
Love it! Thanks for adding this @kevinzunigacuellar!
|
(Pressing the green big button...) |

What kind of changes does this PR include?
Description
height: autoto elements (iframe, img, ...) when height its not set.height: autoto showcase card