markdown via css?
Nathan Steiner
nathan at twinsparc.com
Sun Oct 16 18:34:16 EDT 2005
There are really too many problems with this to be practical, but in
case its of any interest I was able to get part-way towards making an
htm2txt simulator using only CSS.
The CSS does all the work via the :before and :after pseudo selectors
and the "content" property. An interesting experiment, but of the
browsers that support before/after/content, I think only Opera
supports it's use with images. And even then, I couldn't get the
rendered text to always have the proper line breaking, so not all
pages I tested actually render 100% correct when copy/pasted back
into the Markdown dingus.
But if you look (use opera if you have it), you can see I did get
fairly close, here's a test page:
http://twinsparc.com/_media/mdcss/index.html
The CSS that's rendering it is here:
http://twinsparc.com/_media/mdcss/md.css
So just to be clear, this isn't functional in any way shape or form.
Please feel free to take it if anyone wants to - but don't expect it
to function without additional work.
-Nate Steiner
More information about the Markdown-Discuss
mailing list