This content originally appeared on CSS-Tricks and was authored by Chris Coyier
Lea Verou made a Web Component for processing Markdown. Looks like there were a couple of others out there already, but I agree with Lea in that this is a good use case for the light DOM (as opposed to the shadow DOM that is normally quite useful for web components), and that’s what Lea’s does. The output is HTML so I can imagine it’s ideal you can style it on the page like any other type rather than have to deal with that shadow DOM. I still feel like the styling stories for shadow DOM all kinda suck.
The story of how it came to be is funny and highly relatable. You just want to build one simple thing and it turns out you have to do 15 other things and it takes the better part of a week.
The demos on the landing page for <md-block>
shoot over to CodePen using the prefill API. Figured I’d embed one here too:
To Shared Link — Permalink on CSS-Tricks
This content originally appeared on CSS-Tricks and was authored by Chris Coyier
Chris Coyier | Sciencx (2021-12-29T16:03:44+00:00) On Yak Shaving and md-block, a new HTML element for Markdown. Retrieved from https://www.scien.cx/2021/12/29/on-yak-shaving-and-md-block-a-new-html-element-for-markdown-2/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.