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

As a proof of concept, I've just made a quick and simple test with MS Word, one of the most used content creation softwares in the world. 

Please find the screenshot attached.

It shows a single list which every single item has been styled differently by selecting the item contents and applying a style.

Note that the list markers inherited the list contents style in all cases.

Ofc we don't pretend to replicate all features available in MS Word (also because they have a much simpler situation and we want to produce quality HTML), but this can be useful for us to simply prove that the concept makes sense and that the problem exists.

Fred


On Monday, December 16, 2013 at 5:44 PM, Frederico Knabben 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.
> 
> # 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 19:55:51 UTC