Skip to content

Commit 48f1be1

Browse files
committed
color and full width example pre; change way to do max width
Color pre blocks light yellow so they stand out from background. The white background wasn't enough contrast to make them scannable. Also try to make pre blocks full bleed to the right to use all available screen space without overflowing the screen. This makes viewing, cut/paste etc. the examples easier. When pre extends past edge of screen, pre will overflow and scrolling will kick in. I still have an issue with pre inside tables. They cause the table to overflow. Hence the page needs to be x-scrolled. I can change the restructured text to insert a div/container and set the conteiner to scroll on overflow, but I don't have another good answer at the moment.
1 parent f06e75b commit 48f1be1

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

doc/_static/style.css

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,15 @@ body > .content
108108
body > .header > #searchbox { position: absolute; right: 1em; top: 1em;}
109109
body > .content > #subnav { position: absolute; right: 1.5em; top: 6em;}
110110

111-
/* limit width of main column to 65 characters. On wider screens can
112-
be 100+ chars: too wide */
113111
main {
114-
max-width: 65ch;
115112
line-height: calc(1.5 * 1em);
116113
}
117114

115+
/* limit width of items in main column to 65 characters. On
116+
wider screens can be 100+ chars: too wide */
117+
main p, main:is(H1, H2, H3, H4, H5, H6), {max-width: 65ch;}
118+
main table { width: 65ch; }
119+
118120
/* style */
119121

120122
:link { color: rgb(220,0,0); text-decoration: none;}
@@ -361,8 +363,8 @@ div.highlight > pre {
361363
/* Shadows */
362364
background-image:
363365
/* Shadow covers */
364-
linear-gradient(to right, white, white),
365-
linear-gradient(to right, white, white),
366+
linear-gradient(to right, #f5f4d8, #f5f4d8),
367+
linear-gradient(to right, #f5f4d8, #f5f4d8),
366368
/* Shadow */
367369
radial-gradient(farthest-side at 0px 50%,
368370
rgba(0, 0, 20, 0.5), rgba(255, 255, 255, 0)),
@@ -376,7 +378,7 @@ div.highlight > pre {
376378
background-position: left center, right center,
377379
left center, right center;
378380
background-repeat: no-repeat;
379-
background-color: white;
381+
background-color: #f5f4d8;
380382
background-size: 20px 100%, 20px 100%, 16px 100%, 16px 100%;
381383
background-attachment: local, local, scroll, scroll;
382384
}

website/www/_static/style.css

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,15 @@ body > .content
108108
body > .header > #searchbox { position: absolute; right: 1em; top: 1em;}
109109
body > .content > #subnav { position: absolute; right: 1.5em; top: 6em;}
110110

111-
/* limit width of main column to 65 characters. On wider screens can
112-
be 100+ chars: too wide */
113111
main {
114-
max-width: 65ch;
115112
line-height: calc(1.5 * 1em);
116113
}
117114

115+
/* limit width of items in main column to 65 characters. On
116+
wider screens can be 100+ chars: too wide */
117+
main p, main:is(H1, H2, H3, H4, H5, H6), {max-width: 65ch;}
118+
main table { width: 65ch; }
119+
118120
/* style */
119121

120122
:link { color: rgb(220,0,0); text-decoration: none;}
@@ -361,8 +363,8 @@ div.highlight > pre {
361363
/* Shadows */
362364
background-image:
363365
/* Shadow covers */
364-
linear-gradient(to right, white, white),
365-
linear-gradient(to right, white, white),
366+
linear-gradient(to right, #f5f4d8, #f5f4d8),
367+
linear-gradient(to right, #f5f4d8, #f5f4d8),
366368
/* Shadow */
367369
radial-gradient(farthest-side at 0px 50%,
368370
rgba(0, 0, 20, 0.5), rgba(255, 255, 255, 0)),
@@ -376,7 +378,7 @@ div.highlight > pre {
376378
background-position: left center, right center,
377379
left center, right center;
378380
background-repeat: no-repeat;
379-
background-color: white;
381+
background-color: #f5f4d8;
380382
background-size: 20px 100%, 20px 100%, 16px 100%, 16px 100%;
381383
background-attachment: local, local, scroll, scroll;
382384
}

0 commit comments

Comments
 (0)