The style for .code uses white-space: nowrap; which causes all line breaks in e.g., preformated code blocks to be ignored. It seems almost any other value than nowrap would have made sense. This makes this style unusable for code blocks.
In below example the code block is displayed on a single line.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="dist/canvas.css" type="text/css" />
</head>
<body>
<pre><code>#include <cstdio>
int main() {
printf("Hello, world!\n");
}</code></pre>
</body>
</html>
The style for
.codeuseswhite-space: nowrap;which causes all line breaks in e.g., preformated code blocks to be ignored. It seems almost any other value thannowrapwould have made sense. This makes this style unusable for code blocks.In below example the code block is displayed on a single line.