W3C home > Mailing lists > Public > www-style@w3.org > December 2013

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 16 Dec 2013 10:29:10 -0800
Message-ID: <CAAWBYDCVLoydrP2FnWvX_A9Q4W90KzRrgHBG--sGHso+PsNtgg@mail.gmail.com>
To: Frederico Knabben <f.knabben@cksource.com>
Cc: www-style list <www-style@w3.org>
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

> # 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.

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

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