edwardtufte / tufte-css

Style your webpage like Edward Tufte’s handouts.
https://edwardtufte.github.io/tufte-css/
MIT License
5.99k stars 459 forks source link

Correctly format code blocks #145

Closed jcamins closed 5 years ago

jcamins commented 5 years ago

With the change to using the semantically correct <code> tag, pre.code is no longer getting the correct font face set. By specifically addressing pre.code I got everything displaying as I wanted.

daveliepmann commented 5 years ago

Many thanks for noticing that code blocks have been broken! However as far as I can tell, the solution after #102 is to migrate code examples away from pre.code and towards pre > code. I've made a separate commit (https://github.com/edwardtufte/tufte-css/commit/8b350943ea286788228c99e9f3d1d15013c4c86c and v1.7) to do this. I'm closing this PR with thanks and the recommendation to use <pre><code> everywhere and to deprecate all instances of <pre class="code">.

My apologies for the mix-up and thanks again.

jcamins commented 5 years ago

That makes sense, thanks! I took your comment on that PR to mean that I was missing something and pre > code wouldn't work without more extensive revision, whereas pre.code would. Semantically, that seems much more correct, and more consistent with other style guides.