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

Adding a font to the current stack (smarter fallbacks)

From: Matthew Wilcox <elvendil@gmail.com>
Date: Wed, 11 Jan 2012 10:45:02 +0000
Message-ID: <CAMCRKiJAaDorevVJYbbf4AcYp6tqnpvZOj_GF0VXOBrHZsuQLg@mail.gmail.com>
To: www-style@w3.org
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.


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.
Received on Wednesday, 11 January 2012 15:57:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:09 UTC