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

Hello Florian,

(replying to original post but yes, I have read the thread)
Thursday, March 12, 2015, 6:39:47 PM, you 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.

In general, required file formats are a good thing. The lack of them
was the major reason why @font-face took years to get traction, for
example.

The SVG spec has always mandated support for PNG for cursors, while
allowing other formats. (It also originally added a cursor element,
just to hold hotspot info and a pointer to the PNG file, because the
CSS cursor property at that time lacked hotspot info).

So I support mandating some formats.

> It would be nice for authors to be able to depend on something, and
> for test writing, having no format mandated makes things tricky.
Agreed on both counts.

> 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).

Hotspots and a slightly different header, yes. I support requiring cur
and ico, including the later version which wraps an RGBA PNG rather
than a BMP and mask.

(Note that only RGBA PNG is supported inside cur/ico - nor RGB or
indexed with tRNS for example).

> 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?

Not that I have found. Thorough testing would require some sort of
decent spec rather than some blog entries.

> 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.

I agree that (PNG, and SVG in secure static integration mode) is a
good starter set. Or we could mandate the lot and then trim back by
making each of them at-risk in CR, and see where we end up.

I'm putting together tests for various formats; the tests assume all
the above (and ani) are mandated. Its easy to delete tests for any
formats we decide not to mandate.

@Microsoft - a W3C Member submission would be one way to document the
cur/ico/ani formats. If that is of interest, feel free to contact me
offlist (since I would likely be writing the staff comment on the
submission anyway).

-- 
Best regards,
 Chris Lilley, Technical Director, W3C Interaction Domain

Received on Monday, 16 March 2015 15:13:34 UTC