observablehq / stdlib

The Observable standard library.
https://observablehq.com/@observablehq/standard-library
ISC License
966 stars 83 forks source link

Differentiate marked-generated pre elements by adding a class to them. #76

Closed tmcw closed 5 years ago

tmcw commented 5 years ago

Upstream, I want to help out mobile / smallscreen users by allowing code blocks to scroll horizontally. Right now any wide code block on a mobile phone is simply cut off.

But I want to do this in a way that's unlikely to break existing notebooks - for example, if someone is using a pre element in the output from a html tagged template. So this change attaches a class name to the pre element in Markdown output only.