icon density should be supported #118

Closed
marcoscaceres opened this Issue Jan 2, 2014 · 9 comments

Comments

Projects
None yet
4 participants
Member

marcoscaceres commented Jan 2, 2014

Although discriminating on pixel density plays a big role in determining which icon to choose for a particular context, there are other factors that could come into play. In HTML, this is solved by the link element's media attribute.

I'm going to drop density and in a future version we can add a media attribute to the icon member to allow discrimination using media queries. It's possible to determine which icon to use solely by using the sizes attribute - though it does not handle more advanced use cases where one has the same size icons created for different DPRs.

marcoscaceres was assigned Jan 2, 2014

Collaborator

kenchris commented Jan 2, 2014

Sounds good to me... I wasn't a big fan of it anyway

@marcoscaceres marcoscaceres pushed a commit that referenced this issue Jan 3, 2014

Marcos Caceres Merge pull request #119 from w3c/remove_density
removed mention of icon density (closes #118)
1676469

@marcoscaceres marcoscaceres pushed a commit that referenced this issue Feb 14, 2014

Marcos Caceres removed mention of icon density (closes #118) dbfc645

@marcoscaceres marcoscaceres pushed a commit that referenced this issue Feb 15, 2014

Marcos Caceres removed mention of icon density (closes #118) 0d32a7f

@marcoscaceres marcoscaceres pushed a commit that referenced this issue Feb 15, 2014

Marcos Caceres removed mention of icon density (closes #118) c003ee6

@marcoscaceres marcoscaceres pushed a commit that referenced this issue Feb 15, 2014

Marcos Caceres removed mention of icon density (closes #118) a3a23df

@marcoscaceres marcoscaceres pushed a commit that referenced this issue Feb 15, 2014

Marcos Caceres removed mention of icon density (closes #118) 03bc0b2

mrdewitt commented May 6, 2014

I'm surprised that this has been dropped. What's the motivation for explicitly not supporting known use cases? Icons are one of those things that are important to get pixel-perfect for a polished app and that's not possible without specifying the scale factor at which an icon was designed (or at least a particular representation for an icon). In particular, a representation designed for 1x at 100x100 may not be the same pixels as one designed for 2x at 50x50dip.

marcoscaceres reopened this May 6, 2014

Member

marcoscaceres commented May 6, 2014

@mrdewitt I strongly agree. We just dropped it from V1 to try to make sure we could get more support from implementers. Simpler spec seemed easier to sell. We also need this on the Moz side. I'm happy to add it back, but want an ok from other implementers.

Member

marcoscaceres commented May 6, 2014

(Marking as V2 feature for now)

sicking commented May 6, 2014

Is this something that's supported by the <meta> icon features? If so I think we can safely assume that implementations are willing to implement.

I wouldn't want any implementations or any web authors avoid implementing/using the manifest and instead to go with due to lack of support for high-density icons.

Member

marcoscaceres commented May 6, 2014

The HTML spec uses sizes and media attributes and says sizes represent absolute pixel values (meaning that the UA has to divide by the DRP to find the right icon).

So, something like:

<link rel="icon" href="hi-def.ico" sizes="32x32 64x64" media="all and (min-device-pixel-ratio: 2)">
<link rel="icon" href="lo-def.ico" sizes="16x16 32x32">

However, no one implements support for media on icons, so in reality this doesn't actually work.

Member

marcoscaceres commented May 6, 2014

I have also documented what different UAs do with icons here (bit rough, but good enough):
http://w3c-webmob.github.io/installable-webapps/#icons

marcoscaceres changed the title from icon density should be dropped to icon density should be supported May 26, 2014

mrdewitt commented Jun 3, 2014

Are there any known use cases in which media queries would be necessary to achieve good results? "density" seems like the simple/straightforward approach.

Member

marcoscaceres commented Jun 3, 2014

Not that I can think of. I think resurrecting the density member should be sufficient.

@marcoscaceres marcoscaceres added a commit that referenced this issue Jun 16, 2014

@marcoscaceres marcoscaceres Merge pull request #222 from w3c/density
Brought back icon density member (closes #118)
63d015e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment