Re: [css3-lists][css3-content] Proposal for styles inheritance on list markers (actually on :marker, :before and :after pseudo-elements)

On Mon, Dec 16, 2013 at 8:44 AM, Frederico Knabben
<f.knabben@cksource.com> wrote:
> This message follows a proposal to the HTML WG:
> https://www.w3.org/Bugs/Public/show_bug.cgi?id=24111
>
> # Problem
>
> List item markers (and eventually pseudo-elements created by :before and
> :after) don't inherit styles present in the list item contents.

No, because they're siblings of the contents.  They *do* inherit the
styles specified *on the <li> itself*, since the <li> is the marker's
parent.

> # Examples
>
> In short, the marker in the following item should be both bold and italics:
> <li><b><i>Item text</i></b></li>

Rather than using styling elements, use CSS itself.

> # Reasoning / Background / tl;dr
>
> This proposal is a follow-up for the following CKEditor issue:
> http://dev.ckeditor.com/ticket/8741
>
> While HTML and CSS provide some control for web developers to style lists
> and their numbers/bullets, more and more HTML content (actually the great
> majority of it) is produced by non-technical people, using web-based tools
> like CKEditor.

Given that the user's intentions are indeed hard to divine, I'm not
sure why it would be a good idea to unilaterally change the behavior
of inheritance.

If the behavior change is gated by a property as you suggest, then it
requires an explicit user-indication to occur.  When that happens,
editors like CKEditor can simply move the styles around themselves.
This certainly isn't trivial, but it's definitely possible, and
doesn't require any new additions to the language, or layering
violations like having a property affect the way the cascade works.

~TJ

Received on Monday, 16 December 2013 18:29:57 UTC