683 posts
  • 4 Years of Membership
  • Author Level 5
  • Collector Level 2
  • Exclusive Author
ChapterThemes
says

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…

2280 posts
  • Top Monthly Author
  • Weekly Top Seller
  • Community Superstar
  • Industrious API Inventor
+15 more
revaxarts
says

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;

} 

}
683 posts
  • 4 Years of Membership
  • Author Level 5
  • Collector Level 2
  • Exclusive Author
ChapterThemes
says

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

by
by
by
by
by
by