W3C home > Mailing lists > Public > www-style@w3.org > April 2000

Styling Attributes (was RE: Cursors)

From: David Wagner <dwagner@kevric.com>
Date: Mon, 3 Apr 2000 09:41:19 -0500
To: <www-style@w3.org>
Message-ID: <C9B23C6D1899D21188F600C00D009F8606EE43@KEVRICSA1>
Matthew Brealey wrote:
> >(BTW: Is there no intention to be able to describe 'Tooltips' in CSS, or
> >will it appear in some other module than the UI one?)

To which Tim Bannister replied:
> I'd hope that a "tooltip" would be just one way of presenting, for
> example, the "title" attribute of an anchor.  Please also bear in mind
> that different operating systems treat these quite differently.
>
> For example, RiscOS can display tool tips as balloons near
> the pointer, or in a separate window.  It would make sense to me for title
> text to be displayed in that window.

This brings up an interesting issue.  Should CSS be used to style
attributes?  Presumably, the default for most HTML attributes would
be {display:none;}, though this need not be so.  There is no general
rule or guideline stating, "element content is displayed to the user
and attribute values hidden," an issue to keep in mind when eXtending
XHTML.  So, especially since XHTML allows DTD authors to define
attributes meant to be displayed, should CSS also style attibutes?

As an example, by very loosely combining XPath and CSS selectors and
making up some stuff as well, this is a way to style attributes to
display as popup tooltips.

@title, @alt {
  display:none ;
  position:fixed ; }

@title {
  bottom:cursor-top ;
  left:cursor-middle ; }

@alt {
  top:cursor-bottom ;
  left:cursor-middle ; }

*:hover/@title, *:hover/@alt {
  display:block ; }

Note as an alternative, perhaps position:cursor would be better,
though I couldn't think of how to assign top, right, bottom, and left
properties with respect to it.  Perhaps I need more coffee.

-David
Received on Monday, 3 April 2000 10:48:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:04 GMT