Re: position: pointer

On 10/9/2012 1:32 AM, Jussi Kalliokoski wrote:
> On Mon, Oct 8, 2012 at 8:25 PM, Tab Atkins Jr. <jackalmage@gmail.com
> <mailto:jackalmage@gmail.com>> wrote:
>
>     On Mon, Oct 8, 2012 at 10:08 AM, Jussi Kalliokoski
>     <jussi.kalliokoski@gmail.com <mailto:jussi.kalliokoski@gmail.com>>
>     wrote:
>      > Hi everyone,
>      >
>      > I wanted to discuss the possibility of adding a new `position`
>     type called
>      > `pointer`. I came up with the idea as I was thinking about how
>     limited
>      > `title` attribute tooltips are, which made me check out the JS
>     libraries for
>      > the purpose, which are crappy as well, and I think JS shouldn't
>     be needed
>      > for "simple" positioning of elements like this (there may be a
>     few cycles to
>      > save here as well). The idea is pretty simple, it works kinda
>     like absolute
>      > or fixed position (in that the element is floating), but the given
>      > coordinates are relative to the main pointer position.
>      >
>      > This would let you make tooltips in pure CSS and HTML (not to
>     mention that
>      > you could recreate those stars flying around the mouse from the
>     90s with
>      > just CSS and HTML ;). I made a small demo [1] [2] to give a
>     better picture
>      > of what I mean. The actual demo uses a silly JS shim, and I think the
>      > smoothness speaks for itself about how unsuitable JS is for this
>     kind of
>      > functionality.
>      >
>      > Looking forward to feedback!
>      >
>      > Cheers,
>      > Jussi
>      >
>      > [1] (code) https://gist.github.com/3853601
>      > [2] (result) http://labs.avd.io/position-pointer/
>
>     This is pretty reasonable, I think.  You can already achieve some
>     variant of this effect with custom 'cursor' images, just in a *much*
>     more cumbersome manner.
>
>     It seems really simple to define and understand, and I see some
>     definite use-cases, especially for games which often display complex
>     information on hover.
>
>
> FWIW, you just described the use case I was being frustrated enough with
> to come up with this. :) And quite right, in games you often have even
> multiple pages of tooltips for a single UI element.
>
> Cheers,
> Jussi

I honestly prefer this over something like a ::tooltip pseudo-element. 
In fact, in the discussion suggesting using a pseudo-element[1], there 
was a bit on introducing a new value to display called 'tooltip' 
instead. 'pointer' is more general, but the same use cases apply, and it 
allows for more sophisticated formatting than a pseudo-element could 
possibly offer.

[1]: http://lists.w3.org/Archives/Public/www-style/2012Apr/0246.html

-- 
Daniel Tan/BoltClock
NOVALISTIC • Stellar Software Development & Design
<http://NOVALISTIC.com>

Received on Monday, 8 October 2012 17:39:13 UTC