W3C home > Mailing lists > Public > www-style@w3.org > March 2015

Re: [css3-ui] file formats for the cursor property

From: Florian Rivoal <florian@rivoal.net>
Date: Fri, 13 Mar 2015 22:09:22 +0100
Cc: www-style list <www-style@w3.org>, Tantek Çelik <tantek@cs.stanford.edu>
Message-Id: <6AB208AA-B008-485A-BB94-9068FA939D54@rivoal.net>
To: "Tab Atkins Jr." <jackalmage@gmail.com>

> On 13 Mar 2015, at 21:46, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Thu, Mar 12, 2015 at 10:39 AM, Florian Rivoal <florian@rivoal.net> wrote:
>> In addition to a predefined list of values, the cursor property allows authors to provide the cursor as an external file, indicated by the url() function.
>> Unfortunately, the spec makes no mention of which file format must or should be supported. It would be nice for authors to be able to depend on something, and for test writing, having no format mandated makes things tricky.
>> As far as I can tell, all browsers that support this notation accept the Microsoft .ico and .cur formats (.cur being essentially the same as .ico, with the addition of pointer hotspot coordinates).
>> Given the interop, I think we should include a MUST requirement for this file format. However, this raise the question of a spec for that file format. There's this[1], but it describes an older (1995) version, and then there's a series of blog posts on "the old new thing" [2][3][4][5]. Is there anything better out there?
>> In addition, all browsers other than IE support the usual image formats: PNG, JPG, GIF, BMP as well as SVG. I think it would be useful to push (at least with a should, preferably with a must) for at least some of these in css3-ui. I'd favor PNG and SVG, but I'm happy to include more if there's consensus.
>> Thoughts?
> Assuming that all current major browsers do support .ico and .cur, I
> support requiring it with a MUST.

I don't have a large library of .ico and .cur files to check that everyone supports every possible variation of the format, but for the few files I've tried, they all word, and MDN concurs that everyone supports .cur (it doesn't speak about .ico, but that's almost exactly the same format, and in my testing the results were the same.

IE also supports .ani, which is an animated version of the same thing, but it is alone in doing so.

> I also support requiring with a MUST the use of all image formats
> generally accepted for the <image> type (that is, if you can use it in
> 'background-image', you MUST be able to use it in 'cursor' as well).

AFAIK, everybody but IE does that for the static image formats.
Animated GIFs and APNG are rendered in Safari/Chrome/Firefox, but only animated in Safari

> For SVG, I recommend only requiring the secure static integration mode
> <https://svgwg.org/specs/integration/#secure-static-mode>, but
> allowing with a SHOULD for them to support the secure animated mode.

FF/Chrome/Safari all render secure-static-mode SVG 

Chrome/Safari apply animations as well SVG

Nobody renders external references (PNG/APNG): the file is accepted and rendred, but without the image being loaded.

You can try all of this for yourself using this test case from presto testo (except .ico which is not in the TC, but in my experience has the same support as .cur):

All in all, I think we can go with your recommendation, nuanced by the fact that animated images, like animated SVG, should be a should rather than a must.

As for external references in SVG, may or must not?

 - Florian
Received on Friday, 13 March 2015 21:09:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:52 UTC