88 points · by kevinburke · 15y ago · 23 comments
Because the title makes it sound like it is a CSS file that is somehow able to render markdown directly.
"For the markdown to parse correctly, you need to add the closing <link> tag.
This is not technically correct HTML, but it will parse in any browser."
Why would that be? In HTML the <link> tag has no end tag.
However, if you try to add just <link href="#" rel="stylesheet" />
to the .markdown file, the Markdown preprocessor (at least the one I am using) would not process the rest of the file. I think it only recognizes a subset of HTML tags. You can try it for yourself.I don't think this would work very well if you have multiple levels of bullets.
As far as I can tell, that page (1) doesn't validate at all and (2) throws your browser into quirks mode. Why is that a good outcome?
(Edited for clarity after StavrosK's question.)
But it's only a partial page. There's no doctype, no head, no formal declaration of body. There's HTML and CSS for the browser to render, but it's guaranteed to be in quirks mode (unless I'm confused). That's why I said "full HTML page" above. (Edit: I see now where my first post was unclear. I edited it to make my complaint clearer. Thanks.)
I'm not quite sure where this is useful - I may not be understanding what it's for. I would hate the idea of lots and lots of sites serving this kind of partial page.
I think the original `markdown` utility generated a HTML fragment rather than a standalone page. If so, perhaps the point of this is that adding the CSS link is the Simplest Thing That Can Possibly Work in order to improve the page appearance?