W3C home > Mailing lists > Public > www-style@w3.org > November 2014

[css3-ui] out of bounds x and y on cursor (Issue 46)

From: Florian Rivoal <florian@rivoal.net>
Date: Tue, 25 Nov 2014 17:50:41 +0100
Cc: Tantek Çelik <tantek@cs.stanford.edu>, kennyluck@csail.mit.edu
Message-Id: <9ADBAD73-F11E-45E7-9504-B3CBAAA14352@rivoal.net>
To: www-style list <www-style@w3.org>
This has been raised a couple of times, and is recorded as issue 46: https://wiki.csswg.org/spec/css3-ui#issue46

Tab wrote a good summary a while back:

> On 16 Nov 2012, at 20:22, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> 
> The 'cursor' property lets you specify the 'hotspot' for the cursor:
> the offset into the image that the actual click emanates from
> (defaulting to 0,0).
> 
> The spec makes no special mention of what to do if either offset is
> negative, or larger than the corresponding dimension in the image.
> It's technically okay to have either of these, it just means that the
> "active" part of the cursor is outside the cursor image, which might
> be confusing.
> 
> However, no browser implements this.  The behaviors they *do*
> implement are wildly varying.  The list below gives the behavior in
> several browsers of an explicit out-of-bounds hotspot (specified in
> CSS) and an implicit one (specified in a .cur file):
> 
> Chrome pre r134149
>  * In CSS: Clamped
>  * In .cur: N/A
> Chrome post r134149
>  * In CSS: Ignored (hotspot set to 0,0)
>  * In .cur: N/A
> Chrome w/ patch from  bug 100059
>  * In CSS: Ignored
>  * In .cur: Ignored
> FireFox 16.0.2
>  * In CSS: Clamped
>  * In .cur: Skipped image as bad
> IE 10
>  * In CSS: N/A
>  * In .cur: Clamped
> Safari (6.0)
>  * In CSS: Ignored
>  * In .cur: Ignored
> 
> (This list was taken from a webkit bug about Chrome behavior, thus the
> Chrome focus.)
> 
> It appears obvious that we should change the spec, since nobody obeys
> it currently and afaik no one plans to.  However, which behavior
> should we switch to?
> 
> It seems good for the behavior of explicit and implicit hotspots to be
> the same.  I don't have a strong opinion on whether it's better to
> ignore or clamp.  I slightly lean towards clamping, because it seems
> to preserve the authors intent better, and I presume the IE behavior
> is the generic Windows behavior, so if there are badly-authored .cur
> files in the wild, they likely depend on that behavior.
> 
> Thoughts?

As far as I can tell, browsers still disagree with each other and the behaviours described above are still accurate.

I agree that both behaviors should be the same, that that clamping is preferable, for the reason Tab said.

 - Florian
Received on Tuesday, 25 November 2014 16:51:10 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:26 UTC