W3C home > Mailing lists > Public > www-style@w3.org > January 2012

Re: Adding a font to the current stack (smarter fallbacks)

From: Matthew Wilcox <elvendil@gmail.com>
Date: Wed, 11 Jan 2012 17:09:10 +0000
Message-ID: <CAMCRKi+u1hrOsU=hWch4TJDA75NHjVPUKnbSjMjqSdAWB4f2bQ@mail.gmail.com>
To: Jon Rimmer <jon.rimmer@gmail.com>
Cc: ACJ <ego@acjs.net>, www-style@w3.org
You make a good point. Perhaps we can't just change the way CSS behaves,
and we do need some sort of switch to trigger an inheritance behaviour.

On 11 January 2012 17:02, Jon Rimmer <jon.rimmer@gmail.com> wrote:

> Unfortunately, I think it might degrade some pages, imagine I have
> following markup & CSS:
> <h1>Company Name <span>some kind of company tagline</span></h1>
> h1 { font-family: FancyTitleTypeface, serif; }
> h1 span { font-family: RegularTypeface; }
> The company name displays in a large size with a fancy font that is
> only legible at large sizes. The tagline displays at a smaller size
> using a custom font with better legibility.
> My understanding is that, at present, if the tagline font could not
> loaded, it would fall back to the default browser font, which would
> retain the legibility. However, if this was changed so it fell back to
> the parent's font stack, the tagline would be displayed using the
> illegible font. Unless there's something I've missed?
> I notice the relevant section in the CSS3 Font spec[1] says...
>    "The keywords ‘initial’ and ‘default’ are reserved for future use
> and must also be quoted when used as font names."
> ...which suggests someone may have considered this problem, and
> reserved these keywords as a potential way to address it, e.g.
> font-family: LeagueGothicRegular, initial;
> [1] http://www.w3.org/TR/css3-fonts/#font-family-prop
> On 11 January 2012 16:08, Matthew Wilcox <elvendil@gmail.com> wrote:
> > I'm not sure it even needs a change of syntax or additional trigger. It
> just
> > needs defining as what CSS ought to do when the current font stack has
> been
> > exhausted - fall back to parent elements font stack. In other words, the
> > default action could be inherit without breaking any existing sites
> (because
> > the current default is to just flop over and use whatever the browser's
> got
> > set as a default font, I think).
> >
Received on Wednesday, 11 January 2012 17:09:41 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:54 UTC