Gatsby: [gatsby-image] Position prop not being used

Created on 22 Mar 2018  路  7Comments  路  Source: gatsbyjs/gatsby

I need the .gatsby-image-outer-wrapper element to have absolute positioning. By default, it's positioned as relative. According to that line, you can change it by using the styles object.

But there's also an optional position props for the component that is not being used at all. Is this a missing functionality? If so, I would be more than willing to provide my first PR in here!

As a side note, can you explain me why it's not just using the value being sent by props than setting position: initial?

Most helpful comment

I've messing around with this too. At least remove it from the docs https://www.gatsbyjs.org/packages/gatsby-image/

All 7 comments

Oh weird, yeah that position prop isn't used. Don't remember how it showed up there. Would you like to remove that for us in a PR?

position: initial is only set if there's not something set in the style object right?

@KyleAMathews yup, I can definitely do that. Regarding position: initial, if you look in here, it's set if absolute is being passed, which is completely weird. Would you like for me to also include a fix for that on the PR?

would love to be able to position the outer wrapper to absolute :+1:

@mbavio - are you working on a fix for this? I'm using !important in my CSS for now but I would be nice to remove it.

I've messing around with this too. At least remove it from the docs https://www.gatsbyjs.org/packages/gatsby-image/

Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rossPatton picture rossPatton  路  3Comments

timbrandin picture timbrandin  路  3Comments

ghost picture ghost  路  3Comments

benstr picture benstr  路  3Comments

dustinhorton picture dustinhorton  路  3Comments