gucong3000 / postcss-markdown

PostCSS Syntax for parsing Markdown
MIT License
21 stars 10 forks source link

Why PostCSS #4

Closed henryruhs closed 6 years ago

henryruhs commented 6 years ago

Hello,

do I understand this correct that you are creating markdown here? So from my understanding, this should be a PostHTML plugin and not PostCSS?

gucong3000 commented 6 years ago

The main use case of this plugin is apply PostCSS transformations to CSS (and CSS-like) code blocks in markdown file.

gucong3000 commented 6 years ago

I'm sorry, the document hasn't been updated, and a new version will be released by this weekend.

henryruhs commented 6 years ago

Then it should be a PostHTML plugin that is named markdown-css-autoprefix or something. It actually does not matter that you add CSS related content. What matters is that you are manipulating HTML like files and not CSS files.

Same for your other project here on GitHub that seems to be the base of this one.

This is just my opinion according to the separation of concerns pattern.

gucong3000 commented 6 years ago

It is is parser & stringifier for PostCSS to parsing CSS code blocks in *.md, It is about CSS, not HTML. AST of PostHTML not work with CSS. PostHTML will catch CSS just as a string.

main useage for this plugin is let stylelint check CSS blocks. https://github.com/stylelint/stylelint/pull/3261

gucong3000 commented 6 years ago

It is not work for run time, It is work for static code lint and fix.

henryruhs commented 6 years ago

Okay, thank you for the explanation.