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,94 +47,223 @@ 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-width : var (--myst-code-border-width );
90+ border-color : var (--myst-input-border-color );
91+ background-color : var (--myst-input-background-color );
92+ border-left-width : var (--myst-input-left-width );
93+ border-left-color : var (--myst-input-left-color );
7994}
8095
81- :is(.bd-container, .myst) li>ul {
82- margin-top: 0.1em !important;
83- } */
8496
97+ /* cell outputs */
98+ html .light {
99+ --myst-output-background-color : rgb (248 , 255 , 248 );
100+ --myst-output-border-color : blue;
101+ --myst-output-empty-border-color : red;
102+ }
103+
104+ html .dark {
105+ --myst-output-background-color : rgb (6 , 75 , 6 );
106+ --myst-output-border-color : rgb (35 , 182 , 211 );
107+ --myst-output-empty-border-color : rgb (128 , 0 , 0 );
108+ }
109+
110+ html article main .relative .group [data-mdast-node-id ] {
111+ & : empty {
112+ & ::before {
113+ content : ' ∅ no output ∅ ' ;
114+ }
115+ font-size : x-small;
116+
117+ border-color : var (--myst-output-empty-border-color );
118+ margin-bottom : 1rem ;
119+ }
120+
121+ border-radius : var (--myst-code-border-radius );
122+ padding : 5px 10px ;
123+ border-width : var (--myst-code-border-width );
124+ border-color : var (--myst-output-border-color );
125+ background-color : var (--myst-output-background-color );
126+
127+ & > div {
128+ border : 0px solid # 00000000 !important ;
129+ background-color : # 00000000 !important ;
85130
86- /* execution output cells
87- div.cell div.cell_output .output pre {
88- background-color: #f8fff8 !important;
89- border: 0.3px solid blue !important;
131+ & > code {
132+ border : 0 px solid # 00000000 !important ;
133+ }
134+ }
90135}
91136
92- html[data-theme='dark'] div.cell div.cell_output .output pre {
93- background-color: #064b06 !important;
137+ /* code blocks */
138+ html .light {
139+ --myst-block-background-color : rgb (243 , 244 , 245 );
140+ --myst-block-border-color : rgb (209 , 213 , 218 );
141+ --myst-block-left-color : rgb (0 , 0 , 128 );
142+ --myst-block-left-width : 2px ;
94143}
95- */
96- /* div.prompt.input_prompt, div.prompt.output_prompt {
97- opacity: 0.6;
98- } */
99144
100- /* jupyterlab-myst and tables */
101- /* :is(.bd-container, .myst) table td {
102- padding: initial !important;
145+ html .dark {
146+ --myst-block-background-color : rgb (41 , 49 , 61 );
147+ --myst-block-border-color : rgb (72 , 86 , 107 );
148+ --myst-block-left-color : rgb (0 , 0 , 128 );
149+ --myst-block-left-width : 2px ;
103150}
104151
105- :is(.bd-container, .myst) table tbody tr:nth-child(odd) {
106- background-color: #fdfdfd;
152+ html body article main div .group .relative : has (> pre > code ) {
153+ padding : .1rem .25rem !important ;
154+ border-radius : var (--myst-code-border-radius );
155+ background-color : var (--myst-block-background-color );
156+ border-width : var (--myst-code-border-width );
157+ border-color : var (--myst-block-border-color );
158+ border-left-width : var (--myst-block-left-width );
159+ border-left-color : var (--myst-block-left-color );
160+
161+ & > pre .hljs .block {
162+ background-color : # 00000000 !important ;
163+ }
107164}
108165
109- :is(.bd-container, .myst) table tbody tr:nth-child(even) {
110- background-color: #fbfbfb;
166+ /* inline code : use same style as blocks */
167+ p > code {
168+ background-color : var (--myst-block-background-color );
169+ border-width : var (--myst-code-border-width );
170+ border-color : var (--myst-block-border-color );
171+ padding : 0.1rem 0.20rem ;
172+ margin-left : 0.20rem ;
173+ margin-right : 0.20rem ;
174+ border-radius : 3px ;
111175}
112176
113- :is(.bd-container, .myst) table :is(thead, tfoot) tr {
114- background-color: #f8f8f8;
177+ /* ---------- use page width more effectively */
178+ @media (min-width : 1536px ) {
179+ html {
180+ .article-grid , .xl\:article-grid {
181+ grid-template-columns :
182+ /* [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]; */
183+ [screen-start] .5rem
184+ [screen-inset-start] 1fr
185+ [page-start] 3rem
186+ [page-inset-start] minmax (4rem , 9rem )
187+ [body-outset-start] 3rem
188+ [body-start gutter- left-start] 1rem
189+ [body-inset-start] minmax (8ch , 10ch )
190+ [middle-start] minmax (8ch , 10ch )
191+ [gutter-left-end] minmax (8ch , 10ch )
192+ /* this is the one we increase from minmax(8ch, 10ch)*/
193+ 10fr
194+ [gutter-right-start] minmax (8ch , 10ch )
195+ [middle-end] minmax (8ch , 10ch )
196+ [body-inset-end] 1rem
197+ [body-end gutter- right-end] 3rem
198+ [body-outset-end] minmax (5rem , 13rem )
199+ [page-inset-end] 3rem
200+ [page-end] 1fr
201+ [screen-inset-end] .5rem
202+ [screen-end] !important ;
203+ }
204+ }
115205}
116206
117- html[data-theme='dark'] {
118- & :is(.bd-container, .myst) table tbody tr:nth-child(odd) {
119- background-color: #020202;
207+ /* here's the settings for the medium size screens
208+ * it's hard to do much better,
209+ * ideally the right had side toc could take a little less space
210+ */
211+ /* @media (min-width: 1024px) and (max-width: 1535px) {
212+ html {
213+ .article-grid, .xl\:article-grid {
214+ grid-template-columns:
215+ [screen-start] .25rem [screen-inset-start page-start] 1rem [page-inset-start body-outset-start] 1fr [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] .25rem [screen-end]
216+ }
120217 }
218+ } */
219+
121220
122- & :is(.bd-container, .myst) table tbody tr:nth-child(even) {
123- background-color: #040404;
221+ /* ---------- tables */
222+ html .light {
223+ --myst-table-background-color-header : # f8f8f8 ;
224+ --myst-table-bottom-color-header : rgb (90 , 175 , 211 );
225+ --myst-table-background-color-even : # fbfbfb ;
226+ --myst-table-background-color-odd : # fdfdfd ;
227+ }
228+
229+ html .dark {
230+ --myst-table-background-color-header : # 080808 ;
231+ --myst-table-bottom-color-header : rgb (11 , 128 , 137 );
232+ --myst-table-background-color-even : # 020202 ;
233+ --myst-table-background-color-odd : # 040404 ;
234+ }
235+
236+ article main table {
237+ thead , tfoot {
238+ tr {
239+ background-color : var (--myst-table-background-color-header );
240+ }
124241 }
242+ tbody {
243+ th {
244+ background-color : var (--myst-table-background-color-header );
245+ padding : 0.65rem ;
246+ font-size : larger;
247+ border-bottom-color : var (--myst-table-bottom-color-header );
248+ border-bottom-width : 2px ;
249+ }
250+ tr : nth-child (even) {
251+ background-color : var (--myst-table-background-color-even );
252+ }
125253
126- & :is(.bd-container, .myst) table :is(thead, tfoot) tr {
127- background-color: #080808;
254+ tr : nth-child (odd) {
255+ background-color : var (--myst-table-background-color-odd )
256+ }
128257 }
129- } */
258+ }
130259
131260/* space before admonitions */
132261/* :is(.bd-container, .myst) div.admonition>.admonition-title+* {
133262 margin-top: 0px !important;
134263}
135264 */
136265
137- /* standard admonition classes */
266+ /* standard admonition classes */
138267.admonition-smaller {
139268 font-size : smaller;
140269 line-height : 1.2 ;
0 commit comments