I've been experimenting with Polymer 2.0 and have utilized the polymer paper-card
element to showcase some text along with an image. My challenge is to style the image that lies within the <iron-image>#shadow-root
.
Here's the code snippet:
<paper-card elevation="1" aria-label="">
<iron-image>
#shadow-root
<img id="img" hidden="" src="/images/image.jpg">
</iron-image>
<div class="card-content">
<h2>Title</h2>
Some text here..
</div>
</paper-card>
I attempted to use a CSS rule mentioned in this Stack Overflow answer:
paper-card iron-image::shadow #shadow img {
display: block;
}
Unfortunately, it didn't work for me. Could there be something incorrect in this code?