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

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.

# 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:
http://jsfiddle.net/P3vRJ/1/

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

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.

Fred

-- 
Frederico Knabben
CKSource Owner - CKEditor Project Lead
--
http://cksource.com
http://ckeditor.com

Received on Monday, 16 December 2013 16:45:18 UTC