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

On Wed, Jan 11, 2012 at 12:10 PM, David Singer <singer@apple.com> wrote:
> On Jan 11, 2012, at 9:49 , Oliver St. John wrote:
>> This is a common problem for *all* list-valued properties in CSS; right now, they're always atomic, and you must re-specify the entire list if you want to change one part of it.
>>
>> We'd like to fix it, but no one's figured out how to do so yet.
>> Suggestions welcome.  ^_^
>
>
> well, additions could be handled generally by having syntax to say list now should contain "this that <<and all the list that this would have had if this rule hadn't been here>>"
>
> subtractions and re-orderings are harder, but then, should you be removing stuff from other people's style sheets?

Who said anything about "other people's" stylesheets?  This is useful
for a single stylesheet controlled by a single person.

Even simple additions are hard.  What do you do if three different
rules are attempting to add to a declaration?

The best approach I know of so far is to, somehow, add syntax to all
list-valued properties effectively turning them into shorthands with
numbered longhands, where the numbers correspond to each entry in the
list.  This doesn't make it easy to compose multiple things "in front"
of each other, but if you explicitly carve out "holes" in the list,
you can then have different rules target different holes and not
interfere with each other.


On Wed, Jan 11, 2012 at 12:23 PM, Charles Pritchard <chuck@jumis.com> wrote:
> Perhaps some special use of inherit?
> #special { font-family: LeagueGothicRegular, inherit; }

No, this is a completely different concept than 'inherit'.  You're not
attempting to alter the value you received from your parent, you're
trying to alter the value "behind you" in the cascade.

~TJ

Received on Wednesday, 11 January 2012 20:51:15 UTC