[whatwg] Reading spec without boxes

On Thu, 6 Aug 2009, Smylers wrote:
> 
> I experienced this recently with a minimum font size set (in Firefox). I 
> tracked it down to something like this (sorry, that was on another 
> computer, so this is from memory):
> 
> * The main content's left margin, in which the boxes have to fit, is
>   specified relative to the main content's text size.
> 
> * The boxes' font size is specified as a proportion of the main
>   content's font size.
> 
> * The boxes' width is specified relative to the boxes' font size.  And
>   because of the previous two points this is relative to the main
>   content's left margin, so is always less than that margin regardless
>   of the main font size.
> 
> * But with a minimum font size set in the UI, the actual box font size
>   can end up larger than that computed above.  The boxes' width are then
>   correspondingly bigger, and may now be wider than the main content's
>   left margin.
> 
> I prototyped a fix for this, which went something like:
> 
> Instead of setting the smaller font on the boxes, set it on all their
> children (.box > * -- or whatever the class name is).  This still makes
> the text smaller.  But that leaves the width of the box being specified
> relative to the main content font -- the same as the margin it needs to
> fit in.  As such it's trivial to pick a size that always fits.
> 
> I hadn't yet submitted this because I first planned to try it in more
> browsers.  In particular I'm concerned that the child selector isn't
> support in some IE versions.

I applied the above suggestions.


On Thu, 6 Aug 2009, Justin Lebar wrote:
>
> Unbeknownst to me, I had a minimum font size of 12pt set.  FWIW, I don't 
> remember setting this, so it may have been a default.

On Mon, 10 Aug 2009, Elliotte Rusty Harold wrote:
> 
> Yes, I have a 16 point minimum font size set; and removing that moved 
> the boxes out of the way. It also made the text in the boxes so small as 
> to be noticeably more difficult to read. The spec text is still 
> comfortably legible though. (Many other sites aren't so legible of 
> course.)

Hopefully the boxes no longer overlap the text.


On Mon, 10 Aug 2009, Nils Dagsson Moskopp wrote:
> 
> Or, the stylesheet could just properly depend on the fontsize, eg. by 
> using EM units.

It actually did (and still does), the problem was that it was going below 
the minimum font-size threshold.

HTH,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 10 August 2009 12:51:32 UTC