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

Re: [Proposal] CSS 'tooltip' Property

From: Patrick Dark <www-style.at.w3.org@patrick.dark.name>
Date: Thu, 20 Apr 2017 12:54:27 -0500
To: Binyamin <7raivis@inbox.lv>
Cc: "www-style@w3.org" <www-style@w3.org>
Message-ID: <34e42f11-7ff3-b0bd-4482-a70466816c92@patrick.dark.name>
Binyamin 於 4/20/2017 2:03 AM 寫道:
> Any progress for ::tooltip pseudo-element proposal? Any spec drafts?
> 2009 discussion 
> http://lists.w3.org/Archives/Public/www-style/2009Apr/0225.html

This feature isn't in CSS4 UI, where I'd expect it: 
https://drafts.csswg.org/css-ui-4/.

While it'd be nice to have, it won't solve all tooltip use cases. For 
example, for abbreviation tooltips, I show all "sub-abbreviations" in 
the tooltip and that is content that belongs in (HTML) markup, not a CSS 
pseudo-element. I think we'd need things like...

<tooltip>Tooltip Text</tooltip> (HTML)

position: cursor;
cursor-box-align: <length> [[[ after | after-before | before | over | 
over-under | under ] center-to-cursor? ] | toward-viewport-center ];

... to address that case. (We have <dialog>Tooltip Text</dialog> which 
has semantics that fit tooltips, but that solution would still require 
JavaScript even with this hypothetical CSS because the element is 
prohibited inside phrasing content elements.)

It also doesn't address the case where you want a stylistic abbreviation 
with a tooltip for consistency with HTML-based abbreviation tooltips. 
We'd need something like...

content: tooltip("Pseudo-Element Abbreviation Text", "Pseudo-Element 
Abbreviation Tooltip Text") " ";

...to address that use case. I've needed this when stylistically 
prefixing ISBN numbers in a table with "ISBN " (with a trailing space).
Received on Thursday, 20 April 2017 17:54:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:07 UTC