W3C home > Mailing lists > Public > www-svg@w3.org > December 2011

Re: Text metrics with display:none

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 12 Dec 2011 08:34:01 -0800
Message-ID: <CAAWBYDCRuUpuMyTRaLXY_zKXs__sfUfFs70g_uJbF2_GX-z_7g@mail.gmail.com>
To: Charles Pritchard <chuck@jumis.com>
Cc: Chris Lilley <chris@w3.org>, David Dailey <ddailey@zoominternet.net>, Cameron McCormack <cam@mcc.id.au>, Brian Birtles <bbirtles@mozilla.com>, www-svg <www-svg@w3.org>
On Mon, Dec 12, 2011 at 8:04 AM, Charles Pritchard <chuck@jumis.com> wrote:
> On Dec 12, 2011, at 6:27 AM, Chris Lilley <chris@w3.org> wrote:
>> If you want things to be rendered (but invisible) - as opposed to not being in the rendering tree at all, which is what display: none does - then visibility: hidden is what you want.
> In HTML it's also position: absolute and top/left offset off screen. It's not an elegant solution but it's been the method for a long time.
> It'd be nice to have an elegant solution in the future. These feel like work-arounds for an API that wasn't designed for these use cases.

visibility:hidden is the correct solution for the use-case presented
(measuring things that aren't visible).

HTML/CSS has a further use-case in-between visibility:hidden and
display:none where you want something to not be visible or affect
layout in any way but still generate boxes and run general
house-keeping, like incrementing counters and keeping animations
going.  As far as I can tell this isn't necessary in SVG, as it's
trivial to make the layout algorithm ignore a box, and so just using
visibility:hidden is fine.

Received on Monday, 12 December 2011 17:04:03 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:33 UTC