Skip to content

Instantly share code, notes, and snippets.

@ahomu
Created January 5, 2013 05:17
Show Gist options
  • Save ahomu/4459905 to your computer and use it in GitHub Desktop.
Save ahomu/4459905 to your computer and use it in GitHub Desktop.
JS BinのHTMLにこれを貼り付ければ、CSSのLive Editorになるよくん。Stylus/LESSのいずれか。簡易デモ用。 ※Stylusのクライアントサイド実行は、Try Stylusを含め@extend(s?)に対応していないので注意
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
<script src="http://aho.mu/demo/jsbin_live/highlight.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var style = document.querySelector('style'),
output = document.getElementById('output'),
cssTxt = style.textContent;
style.textContent = '';
output.textContent = cssTxt;
hljs.highlightBlock(output, ' ');
}, false);
</script>
<link href="http://aho.mu/demo/jsbin_live/highlight.css" rel="stylesheet">
</head>
<body>
<pre id="output">
</pre>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment