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

Re: Text metrics with display:none

From: Chris Lilley <chris@w3.org>
Date: Mon, 12 Dec 2011 15:27:24 +0100
Message-ID: <22321204.20111212152724@w3.org>
To: "David Dailey" <ddailey@zoominternet.net>
CC: "'Cameron McCormack'" <cam@mcc.id.au>, "'Brian Birtles'" <bbirtles@mozilla.com>, "'www-svg'" <www-svg@w3.org>
On Sunday, December 11, 2011, 3:31:41 PM, David wrote:

DD> Oftentimes I have found myself drawing stuff invisibly first, so
DD> that I can measure it. Then after knowing how big it will be I position it.

DD> Centering things relative to one another is difficult in SVG
DD> (unlike in HTML/CSS), and CSS doesn't seem to help with this issue
DD> (unless I'm missing something -- and I well may be), so when I
DD> start finding parts of the spec that tell me I cannot measure
DD> things unless they are visible, it makes me nervous. I recall a
DD> similar issue recently with getBBox and leprechaun-nodes. 

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.

 Chris Lilley   Technical Director, Interaction Domain                 
 W3C Graphics Activity Lead, Fonts Activity Lead
 Co-Chair, W3C Hypertext CG
 Member, CSS, WebFonts, SVG Working Groups
Received on Monday, 12 December 2011 14:27:55 UTC

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