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

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

From: Frederico Knabben <f.knabben@cksource.com>
Date: Mon, 16 Dec 2013 17:44:46 +0100
To: www-style@w3.org
Message-ID: <F4B4BD57DE584C828A27318B3B5693A8@cksource.com>
This message follows a proposal to the HTML WG: 

# Problem

List item markers (and eventually pseudo-elements created by :before and :after) don't inherit styles present in the list item contents.

# Examples

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

A few examples can be found here:

# Proposal

If any style apply to the *whole content* of list items (or any element defining :marker, :before and :after pseudo-elements), the item numbers and bullets (or related pseudo-elements) should inherit such style.

To avoid breaking the web, a CSS property could be made available for it, enabling this inheritance on all :marker, :before and :after pseudo-elements.

This is a rendering suggestion proposal more than actually a CSS new feature suggestion. In fact, this is far from being a full proposal, but simply an issue show case to start discussion. We prefer leaving the actually spec solution to be proposed by those who know how to do it right.

# Reasoning / Background / tl;dr

This proposal is a follow-up for the following CKEditor issue:

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.

Many times, understanding the user intentions based on his/her behavior is difficult and in some situations, even if the intention is clearly understood, HTML brings limitations hard to both accept by end-users and to workaround by editing tools producers.

The described lists numbers and bullets case is a good example for the above. While it is doable to provide tools to write and style list item contents, transporting styles applied to list items contents to their relative numbers/bullets is very hard in some basic cases (e.g. bold and del) and even impossible in many other situations (e.g. header and classes).

The only real solution for this issue is relying on browsers, expecting that they can handle such situations. All this must, of course, be normalized into well accepted standards, guaranteeing its wider adoption.

Hopefully this proposal can be taken in consideration. 

Thank you.


Frederico Knabben
CKSource Owner - CKEditor Project Lead
Received on Monday, 16 December 2013 16:45:18 UTC

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