Re: [whatwg] A mask= advisory flag for link rel=icon
On 17 June 2015 at 20:23, Maciej Stachowiak m...@apple.com wrote: Using a mask attribute in place of href would solve the compat problem about as well as using rel=“mask-icon”, but it seems kind of weird to me. It doesn’t make sense for an icon link to have both a mask and an href. It makes sense to me, an image element can have a src attribute of image.jpg and have a mask set to mask.svg in the mask CSS property [1]. The equivalents here are the href attribute and the mask attribute, It's just that in your case you want to specify a solid colour to mask instead of an image, so you would omit the href attribute. That said, I'm not opposed to the creation of a new link relation with option A.2 if that's what people would prefer. Ben 1. https://developer.mozilla.org/en-US/docs/Web/CSS/mask
Re: [whatwg] An API for unhandled promise rejections
Yes, see: - https://lists.w3.org/Archives/Public/public-whatwg-archive/2015May/0051.html - https://github.com/domenic/unhandled-rejections-browser-spec - https://codereview.chromium.org/1179113007/ -Original Message- From: Conrad Irwin [mailto:conrad.ir...@gmail.com] Sent: Wednesday, June 17, 2015 14:40 To: wha...@whatwg.org; Domenic Denicola Subject: Re: [whatwg] An API for unhandled promise rejections Hi Domenic, Sorry to re-open an old thread; but this is important to me :). Do you know if there’s been any progress on getting this behavior standardized (or even better, implemented)? Conrad
Re: [whatwg] A mask= advisory flag for link rel=icon
On Jun 17, 2015, at 12:42 PM, Benjamin Francis bfran...@mozilla.com wrote: On 17 June 2015 at 20:23, Maciej Stachowiak m...@apple.com wrote: Using a mask attribute in place of href would solve the compat problem about as well as using rel=“mask-icon”, but it seems kind of weird to me. It doesn’t make sense for an icon link to have both a mask and an href. It makes sense to me, an image element can have a src attribute of image.jpg and have a mask set to mask.svg in the mask CSS property [1]. The equivalents here are the href attribute and the mask attribute, It's just that in your case you want to specify a solid colour to mask instead of an image, so you would omit the href attribute. That makes sense in theory, but I don’t think anyone intends to support combining a full-color image with a mask, so this implies a level of generality that the feature won’t actually have. Also, I don’t think there is any use case for supplying both an image and a mask. Since the site icon can itself have an alpha channel, you could always pre-mask it. And it’s not really a consideration that you’d want to post-process an existing image. Based on that, I think it’s better to use a separate link type rather than to act as if an icon link could have two URLs. - Maciej That said, I'm not opposed to the creation of a new link relation with option A.2 if that's what people would prefer. Ben 1. https://developer.mozilla.org/en-US/docs/Web/CSS/mask
Re: [whatwg] A mask= advisory flag for link rel=icon
On Tue, Jun 16, 2015 at 9:49 PM, Anne van Kesteren ann...@annevk.nl wrote: On Tue, Jun 16, 2015 at 10:42 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: Before we start bikeshedding, can you commit to actually changing your implementation? Safari has already shipped with the exact proposal given in this thread; if you're seeking a rubberstamp rather than a collab, say so. Maciej already clarified this, no? They're perfectly happy to change this before Safari 9 ships, provided, I'm guessing, that we settle this somewhat quickly. Yup, I missed that part of Maciej's email; I just did a quick skim of the rest of the thread after reading Ted's OP. Sounds good, then. ~TJ
Re: [whatwg] A mask= advisory flag for link rel=icon
Out of curiosity, I understand that flat design is fashionable right now and you might want single colour icons to represent web sites in Safari, but what is your fallback for the billion or so web sites which currently only provide a multi-coloured icon? I assume you just display the icon they provide? Details of the UI of the pinned tabs feature are a bit out of scope for this mailing list, but since it might provide useful context to people, here are some facts: - We sometimes display the mask icon in the specified color, and sometimes in a medium grey. - We I meant to say - If no mask icon is provided, we will fall back to a monochrome monogram for the site rather than the full-color icon, in the context where mask icons are currently used. Regards, Maciej
Re: [whatwg] Icon mask and theme color
On Tue, Jun 16, 2015 at 11:51 PM, Smylers smyl...@stripey.com wrote: Maciej Stachowiak writes: We do have a requirement to have the mask icons render with a single color. I don’t think the approach suggested here is very good. Color averaging would not be very predictable in its results and could be unstable to changes in the icon if it’s actually multi-color. No, but colour-averaging would only be a fallback to get _some_ colour in the situation where the developer failed to follow guidelines and put multiple colours in their mask image. Again, consider Twitter: if they have an icon which already is a solid shape of the correct colour (so it can be used as a colour icon, too), why should they have to specify that colour a second time in their HTML? You already know what the colour is, from the icon itself. *If* we detect the color from the icon (which I don't think is a bad idea), using dominant color or first color (as Maciej argued) does seem better than color averaging. Averaging seems like it would rarely produce a reasonable color in any multi-color icon, as it won't produce any of the actual brand colors (and how to average is an open question; many answers, like the obvious naive RGB averaging, give terrible results in lots of cases). Dominant/first color would at least give you one of the brand colors. And for single-color icons, dominant/first gives the same results as averaging, so it's fine there. ~TJ
Re: [whatwg] Icon mask and theme color
Tab, (summary: let's put the information inside the SVG file, more below) Le 18 juin 2015 à 08:41, Tab Atkins Jr. jackalm...@gmail.com a écrit : better than color averaging. Averaging seems like it would rarely produce a reasonable color in any multi-color icon, And we will certainly create rage into Marketing/Communications departments. Dominant/first color would at least give you one of the brand colors. Better, not necessary the best. Because of the following reasons: 1. these icons are specific to the mask system. 2. SVG format is mandatory [1] Why not * giving more power to the designers, * respecting the people in charge of branding, * and reducing the source of confusions (people managing the markup != people designing icons) by including **inside the SVG** the color requirements. metadata iconmask:iconmask xmlns:iconmask=http://www.w3.org/ns/@@@something@@; iconmask:meta name=primary color=#bada55 / iconmask:meta name=secondary color=#505 #123456 / /iconmask:iconmask /metadata (better syntax, naming, unicorns are welcome, but that's not currently the point) [1]: https://developer.apple.com/library/prerelease/mac/releasenotes/General/WhatsNewInSafari/Articles/Safari_9.html#//apple_ref/doc/uid/TP40014305-CH9-SW20 -- Karl Dubost http://www.la-grange.net/karl/
Re: [whatwg] Icon mask and theme color
On Wed, Jun 17, 2015 at 5:16 PM, Karl Dubost k...@la-grange.net wrote: Tab, (summary: let's put the information inside the SVG file, more below) Le 18 juin 2015 à 08:41, Tab Atkins Jr. jackalm...@gmail.com a écrit : better than color averaging. Averaging seems like it would rarely produce a reasonable color in any multi-color icon, And we will certainly create rage into Marketing/Communications departments. Dominant/first color would at least give you one of the brand colors. Better, not necessary the best. Because of the following reasons: 1. these icons are specific to the mask system. 2. SVG format is mandatory [1] Why not * giving more power to the designers, * respecting the people in charge of branding, * and reducing the source of confusions (people managing the markup != people designing icons) by including **inside the SVG** the color requirements. Because having it be determined automatically is simpler and more likely to give good results broadly. (This isn't an argument against having it optionally determined by a specific metadata, of course, just an argument that *in the absence of more specific information* we should default to something reasonable from the outside.) metadata iconmask:iconmask xmlns:iconmask=http://www.w3.org/ns/@@@something@@; iconmask:meta name=primary color=#bada55 / iconmask:meta name=secondary color=#505 #123456 / /iconmask:iconmask /metadata (better syntax, naming, unicorns are welcome, but that's not currently the point) [1]: https://developer.apple.com/library/prerelease/mac/releasenotes/General/WhatsNewInSafari/Articles/Safari_9.html#//apple_ref/doc/uid/TP40014305-CH9-SW20 SVGWG isn't adding any new namespaces to SVG. We've discussed in the WG just adding a meta name content element to SVG; that would be sufficient for this kind of thing. ~TJ
Re: [whatwg] A mask= advisory flag for link rel=icon
On Wed, Jun 17, 2015 at 9:42 PM, Benjamin Francis bfran...@mozilla.com wrote: It makes sense to me, an image element can have a src attribute of image.jpg and have a mask set to mask.svg in the mask CSS property. The equivalents here are the href attribute and the mask attribute, It's just that in your case you want to specify a solid colour to mask instead of an image, so you would omit the href attribute. That said, I'm not opposed to the creation of a new link relation with option A.2 if that's what people would prefer. Not giving link another way to fetch resources seems preferable. Might get tricky with error/load events and future fetching APIs otherwise. -- https://annevankesteren.nl/
Re: [whatwg] A mask= advisory flag for link rel=icon
On Wed, Jun 17, 2015 at 9:23 PM, Maciej Stachowiak m...@apple.com wrote: (A.2) Add an attribute to link specifically for use in specifying the color for that icon, e.g. link rel=mask-icon href=whatever.svg color=lightred. (B.1) If the the color isn’t specified using the A method, use the theme color. My current preference out of these is (A.2)/(B.1). This seems reasonable to me too. Though perhaps color= should share parsing with input type=color? More restrictive, but does not allow transparency either, which CSS/canvas-like parsing would allow for. -- https://annevankesteren.nl/
Re: [whatwg] Icon mask and theme color
Consolidating replies to limit spam. On Jun 16, 2015, at 4:37 AM, Nils Dagsson Moskopp n...@dieweltistgarnichtso.net wrote: Maciej Stachowiak m...@apple.com writes: […] Where do we go from here: (1) We could add mask or something like it to the standard, and change browsers to ignore mask icons in contexts where they are looking for a regular icon. (2) We could change to a new rel type for mask icons, such as rel=mask-icon, but keep theme-color as the source of the color, with the possibility of darkening light colors used to make light colors viable. (3) We could change to a new rel type for mask icons, such as rel=mask-icon, and give it a color attribute to be used specifically for the icon. […] (4) Set a MIME type like application/vnd.apple.svg-mask+xml. This might prevent breakage in other browsers and allow opt-in without introducing new attributes. The source of the theme color could then be in the file or in the theme color meta value. I think inventing a new MIME type or a new file format would be less elegant than a new rel value, and it would be harder for authors to adopt correctly, so I think this is dominated by (2)/(3). At least, I can’t think of a way in which it would be better. (5) Use the shape of the path in the SVG icon as a mask and retain the theme color meta value. Why isn't this done? One could have a properly colored icon for one purpose and use the outline of the same icon for the flat design staff. We could change to considering only the alpha channel of the mask icon instead of both mask and luminance. We did it this way because we already had code to treat SVG as a mask for the mask, and it seemed better to be consistent. Note though, that even if we went alpha-only, it might not be possible to use the same file for a mask icon and a full-color icon and get good results, for certain effects. I believe others on the thread have explained this already, but another obvious example is Facebook’s normal favicon, which is a white lowercase f on a blue rounded rectangle. It’s important in the color version for the white to be white, not transparent, but if both the white and blue are solid, the mask version is just a roundrect. On Jun 16, 2015, at 1:48 PM, Ben Francis bfran...@mozilla.com wrote: On Mon, Jun 15, 2015 at 8:00 PM, Maciej Stachowiak m...@apple.com mailto:m...@apple.com wrote: First: it looks like we neglected to send our proposal for this ahead of our preview release. It’s now been sent belatedly. We regret the error. Second: we’re definitely open to changing this if there’s consensus for a different syntax. Just putting this out there, did you consider using the W3C web manifest [1] for the pinned sites feature? We looked at it, but we didn’t want to require a whole new format for the feature to work at all. I wouldn’t rule out using it in the future as a possible alternate source of metadata for pinned tabs (or for websites saved to the home screen on iOS), but I can’t make any commitments on this. In any case, web manifest would still require us to figure out a way to specify mask icons, and source of color for the mask icon. […] We are still discussing the properties of an icon object in that spec and it already has a background_color member. We could explore adding something there that fits Apple's requirements? Perhaps this could be used to deprecate the proprietary apple-touch-icon as well? If that sounds interesting to you then please feel free to file an issue on GitHub https://github.com/w3c/manifest/issues https://github.com/w3c/manifest/issues The color for the mask icon is a foreground color, not a background color. I’m not yet sure whether it mask icons need a dedicated color or could just use the theme color. On Jun 15, 2015, at 12:53 PM, Kornel Lesiński kor...@geekhood.net wrote: Another suggestion: (4) Don't require the mask icon to be 100% black and read the color from the icon itself. The mask flag would indicate that shape of the icon is distinctive enough, i.e. alpha channel of the icon can be used without the color channels, but wouldn't forbid use of color channels. If in Safari you'd like to enforce use of only a single solid theme color for the icon, then you can compute the theme color by averaging colors of all non-transparent pixels of the mask icon, and use that as the icon's theme color. We do have a requirement to have the mask icons render with a single color. I don’t think the approach suggested here is very good. Color averaging would not be very predictable in its results and could be unstable to changes in the icon if it’s actually multi-color. One thing we could do is move the color specification from the webpage to a meta tag inside the SVG or something, but I’m not sure that’s a huge improvement either. Regards, Maciej
Re: [whatwg] A mask= advisory flag for link rel=icon
On Jun 16, 2015, at 9:49 PM, Anne van Kesteren ann...@annevk.nl wrote: On Tue, Jun 16, 2015 at 10:42 PM, Tab Atkins Jr. jackalm...@gmail.com wrote: Before we start bikeshedding, can you commit to actually changing your implementation? Safari has already shipped with the exact proposal given in this thread; if you're seeking a rubberstamp rather than a collab, say so. Maciej already clarified this, no? They're perfectly happy to change this before Safari 9 ships, provided, I'm guessing, that we settle this somewhat quickly. Yep. Quoting myself from earlier: On Jun 15, 2015, at 12:00 PM, Maciej Stachowiak m...@apple.com wrote: We don’t have a strong principle on this, and it’s not too late to change before shipping the release version of Safari 9. We welcome input on which of these would be best, or whether something else entirely is better. To be even more explicit, we’re willing to change. If there’s a rough consensus soon, we can change it before any final non-beta release of Safari ships with the feature. Even if the discussion continues for a while, we may be able to change after we ship, but we might have to stage it and support two syntaxes for a while. It seems like the current leading candidate is: - Change link rel=icon mask to link rel=mask-icon, but keep using the theme-color meta for the color If anyone feels strongly about sticking with the icon rel value, please speak up. It might also be good to change interpretation of the icon as a mask to consider only alpha. But this probably wouldn’t affect the spec since how any link rel=icon is rendered is implementation-specific. Also, t would not make it practical to use the same icon for mask and non-mask purposes in most cases, so it wouldn’t help with the compat issue. So this aspect seems less urgent. Regards, Maciej
Re: [whatwg] Icon mask and theme color
Maciej Stachowiak writes: On Jun 16, 2015, at 4:37 AM, Nils Dagsson Moskopp n...@dieweltistgarnichtso.net wrote: (5) Use the shape of the path in the SVG icon as a mask and retain the theme color meta value. Why isn't this done? One could have a properly colored icon for one purpose and use the outline of the same icon for the flat design staff. We could change to considering only the alpha channel of the mask icon instead of both mask and luminance. ... Note though, that even if we went alpha-only, it might not be possible to use the same file for a mask icon and a full-color icon and get good results, for certain effects. Sure — for the best results a site may want separate icons. But the recent threads have been largely prompted by sites inadvertently serving suboptimal icons, so we also need to consider the behaviour when they make a mistake, not just the ideal case. And even for the ideal case, a single icon may suffice for some sites. Twitter, for example, with a solid blue bird shape as the colour icon, which could also work as a mask. That _some_ sites would require two icons doesn't seem like a reason to impose that burden on _all_ sites. obvious example is Facebook’s normal favicon, which is a white lowercase f on a blue rounded rectangle. It’s important in the color version for the white to be white, not transparent, but if both the white and blue are solid, the mask version is just a roundrect. Yep, the ideal colour version wouldn't work as a mask. But t'other way round, the mask could work as an acceptable (albeit not ideal) colour icon. Currently when the mask is inadvertently used as the ‘colour’ icon, it has to be all black. But with Nils's suggested change above, the mask could use Facebook blue instead of black; the masking effect would be the same, but if the mask ends up being interpreted as as a colour icon, it then at least has some colour in it. On Jun 15, 2015, at 12:53 PM, Kornel Lesiński kor...@geekhood.net wrote: (4) Don't require the mask icon to be 100% black and read the color from the icon itself. The mask flag would indicate that shape of the icon is distinctive enough, i.e. alpha channel of the icon can be used without the color channels, but wouldn't forbid use of color channels. If in Safari you'd like to enforce use of only a single solid theme color for the icon, then you can compute the theme color by averaging colors of all non-transparent pixels of the mask icon, and use that as the icon's theme color. We do have a requirement to have the mask icons render with a single color. I don’t think the approach suggested here is very good. Color averaging would not be very predictable in its results and could be unstable to changes in the icon if it’s actually multi-color. No, but colour-averaging would only be a fallback to get _some_ colour in the situation where the developer failed to follow guidelines and put multiple colours in their mask image. Again, consider Twitter: if they have an icon which already is a solid shape of the correct colour (so it can be used as a colour icon, too), why should they have to specify that colour a second time in their HTML? You already know what the colour is, from the icon itself. Smylers -- http://twitter.com/Smylers2
Re: [whatwg] A mask= advisory flag for link rel=icon
Kornel Lesiński writes: - Change link rel=icon mask to link rel=mask-icon, but keep using the theme-color meta for the color Please don't use meta theme-color. Financial Times' theme color is salmon pink (#fff1e0), but FT's logo must use black letters. That's another advantage of specifying the mask icon should be a single colour (with transparency), and using that colour as the basis for displaying it: The Pink Un can use black letters and have them actually be black, and Twitter can use a blue bird and have it actually be blue, with nobody having to add or change any existing theme-color. It's also much easier to teach ‘if you want a red house, draw a solid house in the particular share of red you want’ than ‘if you want a red house, draw it in solid black, then specify the shade of red separately in multiple files that you don't necessarily have full control over’. Smylers -- http://twitter.com/Smylers2
Re: [whatwg] A mask= advisory flag for link rel=icon
- Change link rel=icon mask to link rel=mask-icon, but keep using the theme-color meta for the color Please don't use meta theme-color. Financial Times' theme color is salmon pink (#fff1e0), but FT's logo must use black letters. FT's logo is: http://image.webservices.ft.com/v1/images/raw/fticon:brand-ft?format=jpgbgcolor=fff1e0quality=highestsource=example and for Safari's icon it should be: http://image.webservices.ft.com/v1/images/raw/fticon:brand-ft?format=svgsource=example but theme-color makes it look like: http://image.webservices.ft.com/v1/images/raw/fticon:brand-ft?format=svgtint=fff1e0,fff1e0source=example For this case Safari requires theme-color to be changed to black, but that would make the entire UI of Chrome for Android black, which is also unacceptable. -- Kind regards, Kornel Lesiński
[whatwg] Typical LocalBusiness Website Information Architecture
I think my website prototype http://www.schiano-arredamenti.it has a typical LocalBusiness Website Information Architecture: 1. Homepage (Organization Summary) 2. About the Organization 3. Organization Contacts 4. Product/Services categories offered by the Organization 5. Product/Services Brands offered by the Organization Is my microdata structure correct? Can we use it as a tutorial/example on microdata? Thank you -- Regala a tuo figlio *un bel libro (e una app). A misura di bambino* (0-5 anni). Scarica gratis FACCIAMO! http://www.facciamo.eu ** Selezionata su *ADI Design Index 2014*, categoria Design per la comunicazione ** ** Vincitori del Premio *Eccellenze del Design nel Lazio* ** ** Classificata tra le migliori 20 app del *Bologna Ragazzi Digital Award 2014* ** ** Vincitrice del *Digital Experience Award 2014*, categoria Best Mobile Experience ** ** Premiata con l'*Editor's Choice Award* dalla rivista *Children's Technology Review* ** ** Inserita tra le *Best New Apps* nella categoria *0-5 anni* di *App Store* ** ** Inserita nella selezione “*Passatempi con il tuo bimbo. App per divertirsi insieme*” di App Store ** -- Lorenzo De Tomasi ISOTYPE.org. Comunica la qualità http://isotype.org/ Coordinatore Area web design Designer della comunicazione e delle interfacce Professionista ex Legge n. 4 del 14/1/2013 Tel. 06 56 84 834 Mobile 392 59 76 416 Skype lorenzo.detomasi Google Hangout lorenzo.detom...@gmail.com ^^ Rispetta il tuo ambiente, pensa prima di stampare questa e-mail. Grazie. Please consider the environment before printing this email. Thank you.
Re: [whatwg] A mask= advisory flag for link rel=icon
On 17 June 2015 at 07:37, Maciej Stachowiak m...@apple.com wrote: It seems like the current leading candidate is: - Change link rel=icon mask to link rel=mask-icon, but keep using the theme-color meta for the color Using the theme-color meta tag as a foreground colour for icons may cause problems for us in Firefox OS. We have use cases where we display an icon on a toolbar using the theme-color as a background colour for the toolbar. This generally works OK because content authors tend to match the theme-color to their toolbar colour, not their icon colour. Another potential use case might be composing a splash screen from an icon and the theme-color. All the existing use cases I'm aware of for the theme-color meta tag [1] use the colour as a background colour (e.g. Chrome's toolbar). I would suggest that using re-using this meta tag for the purpose of an icon colour is likely to cause problems for browser vendors and content authors alike. Personally I would recommend using the web manifest for your use case, something like this: { name: My Site, scope: /, start_url: /index.html, icons: { { mask: /mask.svg, foreground_color: #00ff00, sizes: all } } } I know you say you didn't want to require a new format for this feature, but really you are requiring a new format, it's just one nobody else uses. Like apple-touch-icon the mask icon is another type of icon browser vendors are going to have to look out for and deal with. The mobile Safari team seemed to be interested in adopting web manifest, I wonder if this is something you could co-ordinate? I can understand if it's too late for you to implement web manifest in Safari 9 because this has been brought up too late in your development cycle, but if that's the case is it possible for you to use something other than theme-color for the icon colour? How about something like: link rel=icon sizes=any mask=/mask.svg foreground-color=#ff The reason I suggest mask instead of href is that whilst your use case for masking just uses a solid colour, a common use case of masking is to use a mask over another image which may have its own src (see the mask property [2] in CSS masking [3]). It's maybe odd to suggest a link relation with an optional href attribute, but this allows for other masking type use cases. It may also make it more backwards compatible because a link relation without an href attribute might be considered invalid by browsers (as an icon object without a src property would be in a web manifest). Out of curiosity, I understand that flat design is fashionable right now and you might want single colour icons to represent web sites in Safari, but what is your fallback for the billion or so web sites which currently only provide a multi-coloured icon? I assume you just display the icon they provide? Thanks Ben 1. https://github.com/whatwg/meta-theme-color 2. https://developer.mozilla.org/en-US/docs/Web/CSS/mask 3. http://www.html5rocks.com/en/tutorials/masking/adobe/