This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24111 - (Rendering) Proposal for styles inheritance on lists numbers and bullets (actually :before and :after pseudo-elements)
Summary: (Rendering) Proposal for styles inheritance on lists numbers and bullets (act...
Status: RESOLVED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: CR HTML5 spec (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Robin Berjon
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-16 12:13 UTC by Frederico Caldeira Knabben
Modified: 2014-01-23 15:38 UTC (History)
1 user (show)

See Also:


Attachments

Description Frederico Caldeira Knabben 2013-12-16 12:13:19 UTC
# Problem

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

# Examples

A few examples can be found here:
http://jsfiddle.net/P3vRJ/1/

# Proposal

If any style apply to the whole contents of list items (or any element defining :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 pseudo-elements created by :before and :after (touching <li> at this point, I assume).

This is a rendering suggestion proposal, eventually touching this:
http://www.w3.org/TR/html5/rendering.html

# 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.
Comment 1 Robin Berjon 2013-12-16 14:17:18 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are
satisfied with this response, please change the state of this bug to CLOSED. If
you have additional information and would like the Editor to reconsider, please
reopen this bug. If you would like to escalate the issue to the full HTML
Working Group, please add the TrackerRequest keyword to this bug, and suggest
title and text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this document:

   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: none
Rationale: The issue you describe is a real one (as easily exemplified by the stream of duplicated issues on CKEditor, and several other places) but it's not a problem for HTML to solve. Also, the proposed solution (as I infer it from your fiddle) would cause existing content to change styling, most likely in ways not desired by the authors.

The good news for you is that there is work on addressing this, most notably through a ::marker pseudo-element that will make styling (and more) of the list markers easy. See http://dev.w3.org/csswg/css-lists/ for further details. I encourage you to engage with the CSS WG if you wish to help push this further, and to discuss with browser vendors if you need its implementation prioritised.
Comment 2 Frederico Caldeira Knabben 2013-12-16 15:36:57 UTC
Thanks for the feedback, Robin.

Unfortunately the :marker pseudo-element is not a solution for this as the root of the problem is that we don't know how to style the marker at CSS design time and in some instances (like the header sample in the reported fiddler), it is impossible even at CSS design time to do so (I mean, making the marker styled like a header).

Since the very beginning I considered that this may not be a HTML issue, but I had mixed feelings when I saw the "Rendering" chapter at the HTML5 CR. 

On that chapter we have recommendations for rendering of lists, which in good part fit this proposal well. In fact, the proposal has nothing to do with adding features to HTML nor to CSS. It's all about rendering specs, specifying that :before and :after (and now :marker) pseudo-elements must inherit the styles of the source element contents.

Then we understood that this would change the current rendering behavior out there, which is not good. So we proposed a CSS way to control whether to enable this new rendering way or not.

So I still have a big question mark on where a rendering recommendation should land. I would appreciate if you could guide me on this.

Meanwhile I'll start the same talk with the CSS WG.
Comment 3 Frederico Caldeira Knabben 2013-12-16 16:46:57 UTC
CSS WG talk (through mailing-list this time):
http://lists.w3.org/Archives/Public/www-style/2013Dec/0322.html
Comment 4 Robin Berjon 2014-01-23 15:38:58 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are
satisfied with this response, please change the state of this bug to CLOSED. If
you have additional information and would like the Editor to reconsider, please
reopen this bug. If you would like to escalate the issue to the full HTML
Working Group, please add the TrackerRequest keyword to this bug, and suggest
title and text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this document:

   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: none
Rationale: I appreciate that this is a problematic issue, but the change really is best handled in CSS. If CSS does produce a solution, then we can certainly refer to it from the Rendering section in HTML.