W3C home > Mailing lists > Public > www-style@w3.org > February 2012

Consider adding content(html) to display html source

From: Charles Pritchard <chuck@jumis.com>
Date: Sun, 19 Feb 2012 21:03:26 -0800
Message-ID: <4F41D41E.7070801@jumis.com>
To: WWW Style <www-style@w3.org>
A CSS generated and replaced content semantic, something like 
content(html) could be helpful with the <code> tag as well as 
@contentEditable.
The idea is for innerHTML to be made visible to the user.

Examples:
<code><p>I am abusing the code tag</p></code>
<div contentEditable><em>I know basic html</em></div>

Something in CSS would it easier to flip on and off HTML source code 
examples.

Something more heavy could display syntax highlighting, if it's not 
being set to a string.
code { content: html(); }


-Charles
Received on Monday, 20 February 2012 05:03:50 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:50 GMT