I created some admin menu icons for a custom post type and all works fine. Also i wanted to have retina versions, and also that works fine – except for the 32×32 page icon.
On a normal display it shows fine but when i check on my iphone for the retina version i get a big grey dark square instead of the image icon.
The image is there i checked.
I use the following CSS styling:
@media
only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and ( min--moz-device-pixel-ratio: 1.5),
only screen and ( -o-min-device-pixel-ratio: 3/2),
only screen and ( min-device-pixel-ratio: 1.5),
only screen and ( min-resolution: 1.5dppx) {
.icon32-posts-mycustonpostype {
background: url('images/mycustonpostype_icon32_2x.png') no-repeat left top !important;
background-size: 32px 32px;
}
}
Can it be the image? The basic icons from posts and pages show correct…
edit: can’t get readable breaklines inside this code block…
- Microlancer Beta Tester
- Author had a Free File of the Month
- Has been a member for 3-4 years
- Item was Featured
- Author was Featured
- Austria
- Exclusive Author
- Referred between 200 and 499 users
Check this page: http://kremalicious.com/wp-icons-template/
to format your code use “pre” tags:
@media
only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and ( min--moz-device-pixel-ratio: 1.5),
only screen and ( -o-min-device-pixel-ratio: 3/2),
only screen and ( min-device-pixel-ratio: 1.5),
only screen and ( min-resolution: 1.5dppx) {
.icon32-posts-mycustonpostype {
background: url('images/mycustonpostype_icon32_2x.png') no-repeat left top !important;
background-size: 32px 32px;
}
}
That’s exactly the code i’m using, but you couldn’t see ( thx for the pre tag tip )
Anyway, it is this code from kremalicious which i had problems with, but i got it working now.
Turns out if you put an extra !important behind the background-size it shows good!
Don’t know if the problem i had was only on an iphone though…
Thanks
