I think I can see the advantage of having the ability to embed stylesheets into a markdown document could be handy.
I think the objection is that the aim is to keep the standard as slim as possible, since the most common use case of commonmark is as an embedded module in websites or applications.
care for a dedicated .mdoc format to do more complex commonmark documents?
Perhaps as I mention before, we could proposed an .mdoc
format that would allow for embedded stylesheet using Jekyll style "do not show or parse" sections that would allow for standalone documents.
So you have a short frontmatter, and a style information at the bottom, thus keeping the content in front.
---
layout: post
title: Blogging Like a Hacker
---
content here
--- style ---
.style {color: blue}
--------------
--- style:post ---
.style {color: red}
------------------
note: could have multiple selectable styles. By default the first style without name is chosen. Named style can be selected depending on context E.g. style:print
print friendly style etc…
hope that might spark some ideas. Other alternative is for mdoc to support full html, but that strikes me as as too bloated, and could be a potential security risk.
the most important thing however, is that the user can override the embedded stylesheet and use their own if they prefer.
edit: I’m proposing this an an extension, not core spec. But it should be officially sanctioned for use with .mdoc