baldur
baldur

“Custom Elements Without JavaScript? - Jim Nielsen’s Blog”

I’ve done this quite a bit in the past. The benefit over using classes or attributes for hooking styles is lower specificity so it won’t conflict with component styles.

|
Embed
Progress spinner
pkra@mathstodon.xyz
pkra@mathstodon.xyz

@baldur a while back I did some experiments around custom elements for writing, basically as templating-on-steroids or perhaps as "all those markdown extensions done as elements". One idea was that the JS part of the custom elements was meant to only provide authoring convenience and could be removed once the document was rendered (e.g., then stored in epub). One day I'll finish those blog posts...

|
Embed
Progress spinner
In reply to
baldur
baldur

@pkra Ooh, that’s an interesting idea.

|
Embed
Progress spinner