Reading time:

Prism Code Highlighter

Possibly outdated content: This article was published on 02. August 2012 and may contain outdated or inaccurate information. Please keep this in mind when reading.
code[class*="language-"],
pre[class*="language-"] {
	color: black;
	text-shadow: 0 1px white;
	font-family: Consolas, Monaco, 'Andale Mono', monospace;
	direction: ltr;
	text-align: left;
	white-space: pre;
	word-spacing: normal;

	-moz-tab-size: 4;
	-o-tab-size: 4;
	tab-size: 4;

	-webkit-hyphens: none;
	-moz-hyphens: none;
	-ms-hyphens: none;
	hyphens: none;
}

/* Code blocks */
pre[class*="language-"] {
	padding: 1em;
	margin: .5em 0;
	overflow: auto;
}

Bisher habe ich Prettify genutzt, in Zukunft werde ich mir wohl Prism von Lea Verou genauer anschauen. Wie praktisch das der Name "Prism" für ein Webprojekt wieder frei war, nachdem MozillaLabs das alte Prism-Project eingestellt und als WebRunner wieder aktiviert hat.

Prism is a new lightweight, extensible syntax highlighter, built with modern web standards in mind. It’s a spin-off from Dabblet and is tested there daily by thousands

Beispiele ansehen und Download zusammenstellen ›

Categories Technik