Post

Quick Embedded CSS with LESS (2016)

Harianto van Insulinde

Use Less instead of CSS for a quick markup

Make sure type="text/less" is in your style attribute and followed with the LESS.js script tag within

html
<style type="text/less">
</style>
<script src="//cdnjs.cloudflare.com/ajax/libs/less.js/2.7.1/less.min.js"></script>

GitHub script: src/lib/ghostApi.js

fetch('/content/images/files/quickpage.html') .then(response => response.text()) .then(text => { document.getElementById('code').innerHTML = Prism.highlight(text, Prism.languages.html, 'html') }) .catch(console.error.bind(console))