-
Notifications
You must be signed in to change notification settings - Fork 62
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
Expose iron-image position and sizing properties #60
Comments
Check out the comments in #50. The iron-image in paper-card is meant to cover a pretty basic use case: full width with the aspect ratio maintained. The |
Hey @bicknellr, adding a custom However using the From a developer's POV, I'd prefer to either have the entire This current middle ground stance might be useful for specific use cases, but for those with other requirements, the inclusion of the Let me know what you think, and feel free to close this issue and PR #62. |
Have you looked at paper-material? It's used by paper-card to match up with the Material Design spec for container elements (just box-shadow, lul). I think you're right about the image's defaults - centered + 'cover' sounds like a good idea. |
Oh, we already expose a ton of other properties of the image... That's what you were getting at. Yeah, this feels kind of weird to provide access to only about half of the iron-image API through proxy properties. I remember overhearing some discussion about exposing whole wrapped components when we want them to be highly customizable. (I believe iron/paper-input was what brought this up; paper-input contains iron-input and has to expose a ton of random properties with weird behaviors.) This would preclude using the data-binding system to work with the exposed component though, but it might be a reasonable tradeoff so that changes to the API of a lower-level component don't have to be made in every component that doesn't actually use it and just happens to transitively depend on / expose it. What are your thoughts on something like that? |
Exposing the entire component sounds good. Can't really envision how it would be done without data-bindings, a proposal would be awesome, but the customization option is regardless very welcome. |
I have an issue where trying to use HiDPI images in a paper-card. Since I can't set the height/width properly, I have to downsize my images which ruins the ideal HiDPI look. Ideally I would just need a image sizing percentage or scale (33% or 0.33) property exposed to size the image properly for the various HiDPI screens. Though Ideally i'd just be able to set height or width or both, and let the iron-image do the remainder of the scaling automatically. |
+1 to exposing more iron-image properties. Looking into paper-cards source, there is no way of setting the placeholder image property in the iron-image through the paper-card. Polymer somehow treats an iron-image wrapped in the paper-card different to non-wrapped ones.
Aditionally, the property "sizing="cover"" isn't exposed and if set manually in paper-card breaks the whole image, so it displays nothing. So the either the docs should get updated or |
+1 It's impossible to set the sizing of the placeholder to cover for example, so the placeholder is displayed as a background-repeat. |
There is currently no means of styling the position of image in the card due to iron-image properties not exposed.
These properties should be exposed to give developers better control of the content presented to the user.
The text was updated successfully, but these errors were encountered: