Matthew Wilcox (2012-01-10 09:28):
> The issue in there was that type measures (the margin, padding etc we apply to elements that have text in them) should be adjusted depending on the actual typeface in use. We currently set them as concrete values based on the preferred font, but if that font isn't available then the next in the font stack is unlikely to be suitably close and therefor the measures need adjusting. CSS doesn't have that type of logic or workflow.
Honestly, I donâ€™t think it would be worth it. People who care about typographic details like this will usually provide the preferred font via â€˜@font-faceâ€™ and set â€˜emâ€™-based measures accordingly. With that designers can almost almost pretend that webpages were static media. The fallback fonts, properly adjusted by â€˜font-size-adjustâ€™ and carefully chosen to have similar metrics, are just that, a fallback, which doesnâ€™t need the highest level of fine-tuning.
Anyhow, what would you imagine the syntax to be like?
foo {
font-family: Helvetica, Arial, sans-serif;
bar: 1em;/* fallback */
bar: 1em @ Helvetica, 1.1em @ Arial;
}
baz {
quuz: 2em;
quuz: 2em @ Helvetica, 2.1em @ Arial;
}
foo {
font-family: Helvetica, Arial, sans-serif;
bar: 1em;/* fallback */
bar: 1em !for(Helvetica);
bar: 1.1em !for(Arial);
}