on master help sign in
Merge pull request #608 from urbit/docswidth

allow code blocks in docs to expand wider

commit2beef32790e2d597f4add9129057355409586250 authorpoprox <51337059+drbeefsupreme@users.noreply.github.com> dateMon 7 Jun 2021, 16:16 (5 years ago) parent6e08e1c4ef2e5c
4 files changed+18−3
sass/_main.scss+15 templates/doc.html+1−1 templates/sections/docs.html+1−1 templates/sections/docs/chapters.html+1−1
sass/_main.scss+15
@@ -314,6 +314,15 @@ nav ul.docs {
314314 line-height: 30px;
315315}
316316
317+.doc {
318+ > *:not(pre) {
319+ @extend .measure-wide;
320+ }
321+ pre {
322+ max-width: 60em;
323+ }
324+}
325+
317326 // pagination
318327nav.previous, nav.next {
319328 max-width: 40% !important;
@@ -452,6 +461,12 @@ pre {
452461 padding: 1.25rem;
453462 overflow-x: scroll;
454463 @extend .bg-gray5;
464+
465+ code {
466+ overflow: scroll;
467+ white-space: pre;
468+ padding: 0;
469+ }
455470}
456471
457472code, .code, .mono {
templates/doc.html+1−1
@@ -17,7 +17,7 @@
1717<!-- header -->
1818<!-- content -->
1919{% include "partials/navigation-docs.html" %}
20−<article class="mt4 mb6 full c4-12-lg measure-wide">
20+<article class="mt4 mb6 full c4-12-lg doc">
2121 <!-- header -->
2222 <h1>{{ page.title }}</h1>
2323 <!-- body -->
templates/sections/docs.html+1−1
@@ -17,7 +17,7 @@
1717<!-- header -->
1818<!-- content -->
1919{% include "partials/navigation-docs.html" %}
20−<article class="mt4 mb6 full c4-12-lg measure-wide">
20+<article class="mt4 mb6 full c4-12-lg doc">
2121 <!-- header -->
2222 <h1>{{ section.title }}</h1>
2323 <!-- body -->
templates/sections/docs/chapters.html+1−1
@@ -17,7 +17,7 @@
1717<!-- header -->
1818<!-- content -->
1919{% include "partials/navigation-docs.html" %}
20−<article class="mt4 mb6 full c4-12-lg measure-wide">
20+<article class="mt4 mb6 full c4-12-lg doc">
2121<!-- header -->
2222<h1>{{ section.title }}</h1>
2323<!-- body -->