W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2019

Re: [csswg-drafts] [css-overflow] It should be detectable whether an element ellipsize text (#4123)

From: Emilio Cobos Álvarez via GitHub <sysbot+gh@w3.org>
Date: Tue, 23 Jul 2019 10:01:47 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-514143056-1563876105-sysbot+gh@w3.org>
FWIW, wpt.fyi solves a very similar problem using just css like:

code:hover {
  width: max-content;

(See the "Subtest" column in a test with long names like [this](https://wpt.fyi/results/css/cssom/CSSStyleSheet-constructable.html?label=master&label=experimental), and hover over them.

You _can_ probably detect this already via script by setting `width: max-content`, measuring it with an API that gives you fractional values like `getBoundingClientRect()`, then comparing it with the non-min-content measurement.

GitHub Notification of comment by emilio
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4123#issuecomment-514143056 using your GitHub account
Received on Tuesday, 23 July 2019 10:01:48 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:50 UTC