author | Olivier Brunel
<jjk@jjacky.com> 2022-12-24 15:53:05 UTC |
committer | Olivier Brunel
<jjk@jjacky.com> 2022-12-24 15:53:05 UTC |
parent | 8c2f72413cbc18fd77dc1ddd54ee2a0ab48b4af8 |
base.htm | +6 | -5 |
diff --git a/base.htm b/base.htm index d99229a..4f595ed 100644 --- a/base.htm +++ b/base.htm @@ -110,11 +110,11 @@ main u { main s { text-decoration: line-through; } -main pre, main tt, main kbd { +main pre, main code, main tt, main kbd { font-family: Monaco,Consolas,Liberation Mono,Courier,monospace; white-space: pre; } -main pre { +main pre, main code { line-height: 16px; overflow: auto; } @@ -127,7 +127,8 @@ main pre.lineno { float: left; overflow: hidden; } -main pre.code { +main code { + display: block; padding: 0; margin: 12px 12px 0px 2px; background: url(data:type/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAgCAYAAADT5RIaAAAAFklEQVQI12NgYGDgZWJgYGCgDkFtAAAWnAAsyj4TxgAAAABJRU5ErkJggg==) 0 0 repeat; @@ -586,7 +587,7 @@ multiple lines</span>. Yep. <p>Oh yeah, we might wanna have "code blocks". Those would be like <tt>pre</tt> ones, only a bit more styled : <pre class="lineno">1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>10</pre> -<pre class="code">#include <stdlib.h> +<code>#include <stdlib.h> int main(int argc, char **argv) { int nb = 3; @@ -595,7 +596,7 @@ int main(int argc, char **argv) printf("%d... ", i<span class="highlighted">, nb</span>); printf("Hello World!\n"); -}</pre></p> +}</code></p> <p>Looking good? And yes, the <tt>highlighted</tt> effect works in there too.</p> </section>