W3C home > Mailing lists > Public > www-style@w3.org > August 2009

Re: Shadows vs. layout

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 3 Aug 2009 14:26:56 -0500
Message-ID: <dd0fbad0908031226n310e5acckd3abc17d0b0000a8@mail.gmail.com>
To: David Hyatt <hyatt@apple.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, Brad Kemper <brad.kemper@gmail.com>, W3C style mailing list <www-style@w3.org>
On Mon, Aug 3, 2009 at 1:55 PM, David Hyatt<hyatt@apple.com> wrote:
> Or put another way, imagine an Aqua button with shadows on it near the
> bottom of a page.  Or imagine an iChat balloon done using border images
> (with overflow using that syntax, a similar concept to shadows).  Scrolling
> to the bottom should not "cut off" the shadow portion of those objects.

If done correctly, the important part of the iChat balloon will be
included within bounding box, using (suppressed) borders to push the
text around correctly.  Otherwise it will overflow right onto other
elements, which is not desirable.

I'm fine with a shadow being 'cut off' by being overflow.  It is, in
fact, what I *want* in virtually all cases.  Frex, several sites I've
designed have been fixed-width with shadows on either side of the
content-column.  Unless I can do some hacks with backgrounds on the
body (not always possible), I have to shrink the content area so that
it's guaranteed to fit within 800px width without the shadows
overflowing.  I'd much prefer the shadows (done in CSS, rather than my
current method of doing them in images) don't interact with the box
size at all.

> Please don't overreact to the horizontal scrollbar problem that exists with
> all kinds of overflow and assume you somehow have to special case shadow
> overflow.  This is not an issue that is unique to shadows.  It affects all
> kinds of visual overflow (and for many designs is trivially fixable by just
> putting overflow-x: hidden on the body).

While I could certainly put overflow-x:hidden, I pretty much *never*
would want shadows to trigger overflow behavior.  The rare times when
I want to ensure that shadows don't get 'cut off' from being too close
to the edge, I can set padding on the parent.

On Mon, Aug 3, 2009 at 1:55 PM, David Hyatt<hyatt@apple.com> wrote:
> On Aug 3, 2009, at 1:54 PM, Boris Zbarsky wrote:
>> Note that Gecko is planning to do just that; it's needed anyway to deal
>> with fonts where glyphs don't fit inside their claimed bounding box (unless
>> you think that that situation should also trigger scrollbars, basically any
>> time you have justified text in such a font and such a glyph at end of
>> line?).
> I do think it should trigger scrollbars yes.

I *strongly* object; it should *not* do so.  Horizontal scrollbars are
almost *always* to be avoided, and having it trigger based on certain
glyphs in certain fonts happening to be on the right edge of a
justified line is just ridiculous.  I don't want to defensively put
overflow-x:hidden on everything I justify just to avoid that.

Received on Monday, 3 August 2009 19:28:01 UTC

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