77 * as well as other miscellanous tweaks
88 */
99
10+ /* ---------- the left hand side toc */
11+
1012.primary-scrollbar {
11- /* background: var(--jp-border-color3); */
13+
1214 div .w-full {
1315
1416 & [data-state = 'open' ] {
15- border : 1px solid var (--jp-border-color0 );
17+ border : 1px solid var (--jp-border-color0 );
1618 border-radius : 8px ;
1719 padding-top : 0px ;
1820 }
2123 & ::before {
2224 content : '≡ ' ;
2325 }
24- /* font-style: italic; */
2526 }
2627 }
2728
2829 a .p-2 {
29- /* border: 1px solid #000; */
3030 padding : 0.08em 1em ;
3131
3232 & .active {
3333 & ::before {
3434 content : '⌘ ' ;
3535 }
36-
3736 }
3837 }
3938}
4039
41- /* not too much space around lists */
40+ /* ---------- space around lists */
41+
4242/* a paragraph that is just above a list should not have a bottom margin
4343 * thanks SO
4444 * https://stackoverflow.com/questions/1817792/is-there-a-previous-sibling-selector
@@ -47,52 +47,165 @@ article main {
4747 p : has (+ : is (ol , ul )) {
4848 margin-bottom : 0px !important ;
4949 }
50- p + : is (ol , ul ) {
50+
51+ p + : is (ol , ul ) {
5152 margin-top : 0px !important ;
5253 }
5354
54- li > ul {
55+ li > ul {
5556 margin-top : 0px !important ;
5657 }
5758}
5859
59- .article : where (ul ul , ul ol , ol ul , ol ol ): not (: where ([class ~= not-prose ], [class ~= not-prose ] * )) {
60+ .article : where (ul ul , ul ol , ol ul , ol ol ): not (: where ([class ~= not-prose ], [class ~= not-prose ] * )) {
6061 margin-bottom : 0.25em ;
6162}
6263
64+ /* ---------- code */
6365
64- /* @media (min-width: 960px) {
65- .bd-page-width {
66- max- width: initial !important ;
67- }
66+ : root {
67+ --myst-code-border-radius : 0.5 rem ;
68+ --myst-code-border- width: 0.8 px ;
69+ }
6870
69- /* but keep the upper-left logo to grow too much */
70- /* .navbar-brand.logo>img {
71- max-width: 250px;
72- max-height: 170px;
73- } */
74- } * /
71+ /* cell inputs */
72+ html .light {
73+ --myst-input-background-color : rgb (243 , 244 , 245 );
74+ --myst-input-border-color : rgb (209 , 213 , 218 );
75+ --myst-input-left-color : rgb (0 , 128 , 0 );
76+ --myst-input-left-width : 4px ;
77+ }
78+
79+ html .dark {
80+ --myst-input-background-color : rgb (41 , 49 , 61 );
81+ --myst-input-border-color : rgb (206 , 214 , 221 );
82+ --myst-input-left-color : rgb (0 , 128 , 0 );
83+ --myst-input-left-width : 4px ;
84+ }
7585
7686
77- /* :is(.bd-container, .myst) p:has(+ :is(ol, ul)) {
78- margin-bottom: initial !important;
87+ .relative .group\/block > .relative .group : has (> pre ) {
88+ border-radius : var (--myst-code-border-radius );
89+ border : var (--myst-code-border-width ) var (--myst-input-border-color ) solid;
90+ background-color : var (--myst-input-background-color );
91+ border-left-width : var (--myst-input-left-width );
92+ border-left-color : var (--myst-input-left-color );
7993}
8094
81- :is(.bd-container, .myst) li>ul {
82- margin-top: 0.1em !important;
83- } */
8495
96+ /* cell outputs */
97+ html .light {
98+ --myst-output-background-color : rgb (248 , 255 , 248 );
99+ --myst-output-border-color : blue;
100+ }
85101
86- /* execution output cells
87- div.cell div.cell_output .output pre {
88- background-color: #f8fff8 !important;
89- border: 0.3px solid blue !important;
102+ html .dark {
103+ --myst-output-background-color : rgb (6 , 75 , 6 );
104+ --myst-output-border-color : rgb (35 , 182 , 211 );
90105}
91106
92- html[data-theme='dark'] div.cell div.cell_output .output pre {
93- background-color: #064b06 !important;
107+ html article main .relative .group [data-mdast-node-id ] {
108+ border-radius : var (--myst-code-border-radius );
109+ padding : 5px 10px ;
110+ border : var (--myst-code-border-width ) var (--myst-output-border-color ) solid;
111+ background-color : var (--myst-output-background-color );
112+
113+ & > div {
114+ border : 0px solid # 00000000 !important ;
115+ background-color : # 00000000 !important ;
116+
117+ & > code {
118+ border : 0px solid # 00000000 !important ;
119+ }
120+ }
94121}
95- */
122+
123+ /* code blocks */
124+ html .light {
125+ --myst-block-background-color : rgb (243 , 244 , 245 );
126+ --myst-block-border-color : rgb (209 , 213 , 218 );
127+ --myst-block-left-color : rgb (0 , 0 , 128 );
128+ --myst-block-left-width : 2px ;
129+ }
130+
131+ html .dark {
132+ --myst-block-background-color : rgb (41 , 49 , 61 );
133+ --myst-block-border-color : rgb (72 , 86 , 107 );
134+ --myst-block-left-color : rgb (0 , 0 , 128 );
135+ --myst-block-left-width : 2px ;
136+ }
137+
138+ html body article main div .group .relative : has (> pre > code ) {
139+ padding : .1rem .25rem !important ;
140+ border-radius : var (--myst-code-border-radius );
141+ background-color : var (--myst-block-background-color );
142+ border : var (--myst-code-border-width ) var (--myst-block-border-color ) solid;
143+ border-left-width : var (--myst-block-left-width );
144+ border-left-color : var (--myst-block-left-color );
145+
146+ & > pre .hljs .block {
147+ background-color : # 00000000 !important ;
148+ }
149+ }
150+
151+ /* inline code : use same style as blocks */
152+ p > code {
153+ background-color : var (--myst-block-background-color );
154+ border : var (--myst-code-border-width ) var (--myst-block-border-color ) solid;
155+ padding : 0.1rem 0.20rem ;
156+ margin-left : 0.20rem ;
157+ margin-right : 0.20rem ;
158+ border-radius : 3px ;
159+ }
160+
161+ /* ---------- use page width more effectively */
162+ @media (min-width : 1536px ) {
163+ html {
164+ .article-grid , .xl\:article-grid {
165+ grid-template-columns :
166+ /* [screen-start] .5rem [screen-inset-start] 1fr [page-start] 3rem [page-inset-start] minmax(4rem, 9rem) [body-outset-start] 3rem [body-start gutter-left-start] 1rem [body-inset-start] minmax(8ch, 10ch) [middle-start] minmax(8ch, 10ch) [gutter-left-end] minmax(8ch, 10ch) minmax(8ch, 10ch) [gutter-right-start] minmax(8ch, 10ch) [middle-end] minmax(8ch, 10ch) [body-inset-end] 1rem [body-end gutter-right-end] 3rem [body-outset-end] minmax(5rem, 13rem) [page-inset-end] 3rem [page-end] 1fr [screen-inset-end] .5rem [screen-end]; */
167+ [screen-start] .5rem
168+ [screen-inset-start] 1fr
169+ [page-start] 3rem
170+ [page-inset-start] minmax (4rem , 9rem )
171+ [body-outset-start] 3rem
172+ [body-start gutter- left-start] 1rem
173+ [body-inset-start] minmax (8ch , 10ch )
174+ [middle-start] minmax (8ch , 10ch )
175+ [gutter-left-end] minmax (8ch , 10ch )
176+ /* this is the one we increase */
177+ minmax (20ch , 40ch )
178+ [gutter-right-start] minmax (8ch , 10ch )
179+ [middle-end] minmax (8ch , 10ch )
180+ [body-inset-end] 1rem
181+ [body-end gutter- right-end] 3rem
182+ [body-outset-end] minmax (5rem , 13rem )
183+ [page-inset-end] 3rem
184+ [page-end] 1fr
185+ [screen-inset-end] .5rem
186+ [screen-end] !important ;
187+ }
188+ /*
189+ the left hand side toc has this in a min-width: 1280px media clause
190+ .xl\:col-margin-left {
191+ grid-column: page / body-start;
192+ }
193+ }
194+ */
195+ }
196+
197+ /* @media (min-width: 960px) {
198+ .bd-page-width {
199+ max-width: initial !important;
200+ }
201+
202+ >>/* but keep the upper-left logo to grow too much */
203+ /* .navbar-brand.logo>img {
204+ max-width: 250px;
205+ max-height: 170px;
206+ } */
207+
208+ * /
96209/* div.prompt.input_prompt, div.prompt.output_prompt {
97210 opacity: 0.6;
98211} */
@@ -134,7 +247,7 @@ html[data-theme='dark'] {
134247}
135248 */
136249
137- /* standard admonition classes */
250+ /* standard admonition classes */
138251.admonition-smaller {
139252 font-size : smaller;
140253 line-height : 1.2 ;
0 commit comments