Re: CSS3: Suggestion for another list-style-type

On Mon, Apr 5, 2010 at 1:54 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
> On Apr 5, 2010, at 9:51 AM, fantasai <fantasai.lists@inkedblade.net> wrote:
>
>> Cases where one property always overrides the other are messy wrt the
>> cascade, and should be avoided. It's easy to think, "oh, well, we'll
>> just design a new property that, when set, always overrides the old
>> property" because in many languages, that works no problem. But in CSS
>> it royally screws with the cascade, since once you use the new property,
>> higher-specificity rules with the old property no longer have an effect.
>
> I wasn't aware of this wrt list-style-type. I had assumed that the in the
> following, the 'content' would be reset to a disc in the more specific case:
>
> ol li::marker { content:'brad'; }
> ol > li#not-brad{ list-style-type:disc; }
>
> Any reason why it couldn't work like that? Let 'list-style-type' mean
> exactly the same thing as 'content:<Unicode of disc>'? And vice versa?

Because that would be making list-style-type into an alias for content
on a different (pseudo)element, which presumably was considered a lot
weirder than just setting up the current rule.  ^_^  (I agree, btw,
that it would be a lot weirder.  I don't like using indirection when
it can be avoided (in CSS, at least; I love indirection in real
programming!), but this type of redirection is at least simple and
predictable once you see what is going on.  The aliasing thing I
described would be a different story.)

~TJ

Received on Monday, 5 April 2010 20:59:21 UTC