Menu

Chris’ Corner: Processing
📰
0

Chris’ Corner: Processing

CodePen·@HashtagPLUS·about 1 month ago
#nmzVwb9d
#docs#no#code#tools#html#lang
Reading 0:00
15s threshold

The other week when I was talking about Web Components in the Corner , I mentioned zero-md , a nice little Web Component for doing exactly that. I had to bite my tongue a little bit though, as the 2.0 public beta hadn’t quite made it out of the door yet. See,  the new compiler , among its many powers, has a cool trick up its sleeve we call  Inline Block Processing . When you’re in any HTML-ish language, you’ve got the lang attribute you can put on elements. Our compiler sees those, and if the language matches a file extension that we currently support via Blocks, we’ll process the content of that element with that block. Meaning you could write HTML like this: < p > Blah blah just hanging out. </ p > < div lang = "md" > - I'm a list - in Markdown format - cool, right? </ div > < style lang = "scss" > $listColor: red; ul { color: $listColor; } </ style > Code language: HTML, XML ( xml ) And that will… work. As you might be able to guess, it does.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More