3 ms·
The treatment of <samp> in mvp.css is incorrect. It’s treating <code> as inline monospace, <samp> as block monospace, and completely ignoring <pre>, which is ac
by chrismorgan 7y ago
The treatment of <samp> in mvp.css is incorrect. It’s treating <code> as inline monospace, <samp> as block monospace, and completely ignoring <pre>, which is actually block monospace (with no defined semantics). Rather, <code> and <samp> should both be inline, and placed inside <pre> for block usage. This matters because it’ll mess things up if the stylesheet doesn’t load, as your blocks of code won’t be formatted properly.
(I’ve filed https://github.com/andybrewer/mvp/issues/1 https://github.com/andybrewer/mvp/issues/1 about this now.)
https://chrismorgan.info/blog/rust-fizzbuzz/ https://chrismorgan.info/blog/rust-fizzbuzz/ demonstrates use of <pre><code>, <pre><samp> and <code>, though not just <samp> or <pre>. (I use bare <pre> elsewhere on my site, but haven’t had cause to use bare <samp> yet.) What can I say? I’m a snob. Also there are subtle differences in style between the two. (I have <samp> be truly monospaced, because terminal output is more typically visually aligned, but <code> be only mostly monospaced, because it’s seldom visually aligned and I find Triplicate’s Poly variant generally nicer for code reading.)
Also potentially of interest to you: <output>. Plenty of other interesting semantic tags to use or not, as well. I like to use <var> carefully.
- kohtatsu 7y agoThanks for working to correct that. Do you have a go-to reference for tags and their meaning? This blog post is actually a great intro to rust too :)
- qw 7y agoI find that MDN often has good descriptions. One example is this "hidden" gem. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ma...
- awb 7y ago> I’ve filed https://github.com/andybrewer/mvp/issues/1 https://github.com/andybrewer/mvp/issues/1 about this now. Thank you! I'll take a look today. And pull requests are always welcome.