Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

When used with src attribute, don't repeat background image #16

Open
miztroh-zz opened this issue Aug 12, 2014 · 4 comments
Open

When used with src attribute, don't repeat background image #16

miztroh-zz opened this issue Aug 12, 2014 · 4 comments
Labels

Comments

@miztroh-zz
Copy link

I've had occasion to use core-icon with some wide aspect ratio images. In such a scenario, the image is repeated to fill the size of the core-icon. Looks like the default style of the containing div is "background-size: 100%; background-position: 50% 50%;". I recommend adding "background-repeat: no-repeat;".

@sorvell sorvell self-assigned this Aug 12, 2014
@sorvell
Copy link
Contributor

sorvell commented Aug 12, 2014

Seems reasonable, thanks.

@sorvell sorvell added the p1 label Aug 15, 2014
@kbenjamin
Copy link

I just ran into this and fixed it. Here's the code to add to core-icon.css:

html /deep/ core-icon[src] div { background-repeat: no-repeat; }

@atdotslashdot
Copy link

when I was searching for the problem, i was led here...
Polymer/polymer#784
this issue may be related.
I initially tried to add

background-repeat: no-repeat;

to core-icon.css but this was unsuccessful for the svg file so I modified the code as described instead.

I have to say the code fix feels wrong. Shouldn't the user be able to style in either repeat or not depending on their particular use?

@Sinjins
Copy link

Sinjins commented Mar 10, 2015

I was able to use kbenjamin's suggestion in my polymer 0.5.4 site in order to avoid making code changes to core-icon.html itself. That said, can we expect an update for this issue or a version of core-icon with an attribute to control this repeating behaviour?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants