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 16:08:47 +0000
Message-ID: <CAMCRKiKdAWYw+zsUcraEanKz3tPXZ-7dveav33jTR47=hbAQmg@mail.gmail.com>
To: ACJ <ego@acjs.net>
Cc: www-style@w3.org
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).


On 11 January 2012 16:03, ACJ <ego@acjs.net> wrote:

> Op 11-1-2012 11:45, Matthew Wilcox schreef:
>
>  Can we get a way (or is there already a proposed way) to add a font on
>> top of an existing font stack?
>> It is tedious and a maintenance issue to have to re-declare entire font
>> stacks throughout a stylesheet just because I want to use a different font
>> on one particular element of the page.
>>
>> e.g.,
>>
>> html { font : 125%/1.3 MelbourneRegular, "Helvetica Neue", Helvetica,
>> Arial, sans-serif; }
>>
>> then later on I need to change a font for one particular paragraph and
>> have to write:
>>
>> #special {  font-family : LeagueGothicRegular, MelbourneRegular,
>> "Helvetica Neue", Helvetica, Arial, sans-serif;  }
>>
>> because if I were to write
>>
>> #special { font-family: LeagueGothicRegular; }
>>
>> It replaces the entire font stack instead of just attempting to load that
>> font, and if failing falling back to the inherited font-stack.
>>
>>
> I have been wondering about this, too. I would like to be able to do
> something like this:
>
> html { font-family: 'Helvetiva Neue', Helvetica, Arial, sans-serif }
> h1 { font-family: 'Fancy Header Typeface', inherit }
>
> Greetings,
>
> ACJ
>
>
>
Received on Wednesday, 11 January 2012 16:09:21 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:48 GMT