-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[gatsby-remark-images] Can't specify max-width #15578
Comments
A fixed version of |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contributefor more information about opening PRs, triaging issues, and contributing! Thanks for being a part of the Gatsby community! 💪💜 |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing! Thanks for being a part of the Gatsby community! 💪💜 |
Hey again! It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing! Thanks again for being part of the Gatsby community! |
Description
When using
gatsby-remark-images
, it is impossible to specify a custommax-width
using thewrapperStyle
option. The specified width will always be overwritten by thepresentationWidth
returned bygatsby-plugin-sharp
.This is problematic in cases where you want your
max-width
specified in non-pixel units. One such case is when you want your images to be fluid relative to the viewport height (used in the below examples).A good starting point for debugging is where the style is specified
Steps to reproduce
Add
gatsby-remark-images
to your site, using a config specifying bothmaxWidth
(required) and awrapperStyle
containingmax-width
. An example is:Expected result
The specified
max-width
is used (up for debate whether it should require!important
)Actual result
max-width
is always set to thepresentationWidth
returned bygatsby-plugin-sharp
(in this case1920px
).Environment
Result of
gatsby info
The text was updated successfully, but these errors were encountered: