Closed derfel closed 7 years ago
You can just style the paper-icon-button
itself: http://jsbin.com/sifoxe/edit?html,output
The paper-icon-button is round, but the image inside it's not. I've modified your example: http://jsbin.com/saxulizegu/edit?html,output
But if I use dev tools in your example, and explicitly add the border-radius to the iron-icon
, it doesn't become round either, so the mixin wouldn't help.
You're right, it needs to be applied to the img
element. Using shadow dom, I cannot use ::content and cannot apply border-radius directly to the img
element. So I can't find a way to get a round image inside paper-icon-button.
I've prepared 2 examples: Round: http://jsbin.com/sagemubira/edit?html,output Square: http://jsbin.com/ligabipaxo/edit?html,output
@derfel I have not been able to apply a border-radius to the img inside of a paper-icon-button. I looked at your examples, and tried doing paper-icon-button::content img { border-radius: 50%; }
but that doesn't work.
Description
Using the src attribute of paper-icon-button and shadow-dom there's no way to apply border-radius. How can I workaround this?
Expected outcome
The img inside the paper-icon-button has border-radius applied.
Actual outcome
The img is square and boring.
Live Demo
Steps to reproduce
Browsers Affected