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,182 @@ 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 */
65+
66+ : root {
67+ --myst-code-border-radius : 0.5rem ;
68+ --myst-code-border-width : 0.8px ;
69+ }
70+
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+ }
85+
6386
64- /* @media (min-width: 960px) {
65- .bd-page-width {
66- max-width: 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 );
94+ }
95+
96+
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+ border-color : var (--myst-output-empty-border-color );
116+ margin-bottom : 1rem ;
67117 }
118+ border-radius : var (--myst-code-border-radius );
119+ padding : 5px 10px ;
120+ border-width : var (--myst-code-border-width );
121+ border-color : var (--myst-output-border-color );
122+ background-color : var (--myst-output-background-color );
68123
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- } * /
124+ & > div {
125+ border : 0px solid # 00000000 !important ;
126+ background-color : # 00000000 !important ;
75127
128+ & > code {
129+ border : 0px solid # 00000000 !important ;
130+ }
131+ }
132+ }
76133
77- /* :is(.bd-container, .myst) p:has(+ :is(ol, ul)) {
78- margin-bottom: initial !important;
134+ /* code blocks */
135+ html .light {
136+ --myst-block-background-color : rgb (243 , 244 , 245 );
137+ --myst-block-border-color : rgb (209 , 213 , 218 );
138+ --myst-block-left-color : rgb (0 , 0 , 128 );
139+ --myst-block-left-width : 2px ;
79140}
80141
81- :is(.bd-container, .myst) li>ul {
82- margin-top: 0.1em !important;
83- } */
142+ html .dark {
143+ --myst-block-background-color : rgb (41 , 49 , 61 );
144+ --myst-block-border-color : rgb (72 , 86 , 107 );
145+ --myst-block-left-color : rgb (0 , 0 , 128 );
146+ --myst-block-left-width : 2px ;
147+ }
84148
149+ html body article main div .group .relative : has (> pre > code ) {
150+ padding : .1rem .25rem !important ;
151+ border-radius : var (--myst-code-border-radius );
152+ background-color : var (--myst-block-background-color );
153+ border-width : var (--myst-code-border-width );
154+ border-color : var (--myst-block-border-color );
155+ border-left-width : var (--myst-block-left-width );
156+ border-left-color : var (--myst-block-left-color );
85157
86- /* execution output cells
87- div.cell div.cell_output .output pre {
88- background-color: #f8fff8 !important;
89- border: 0.3px solid blue !important;
158+ & > pre .hljs .block {
159+ background-color : # 00000000 !important ;
160+ }
90161}
91162
92- html[data-theme='dark'] div.cell div.cell_output .output pre {
93- background-color: #064b06 !important;
163+ /* inline code : use same style as blocks */
164+ p > code {
165+ background-color : var (--myst-block-background-color );
166+ border-width : var (--myst-code-border-width );
167+ border-color : var (--myst-block-border-color );
168+ padding : 0.1rem 0.20rem ;
169+ margin-left : 0.20rem ;
170+ margin-right : 0.20rem ;
171+ border-radius : 3px ;
94172}
95- */
173+
174+ /* ---------- use page width more effectively */
175+ @media (min-width : 1536px ) {
176+ html {
177+ .article-grid , .xl\:article-grid {
178+ grid-template-columns :
179+ /* [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]; */
180+ [screen-start] .5rem
181+ [screen-inset-start] 1fr
182+ [page-start] 3rem
183+ [page-inset-start] minmax (4rem , 9rem )
184+ [body-outset-start] 3rem
185+ [body-start gutter- left-start] 1rem
186+ [body-inset-start] minmax (8ch , 10ch )
187+ [middle-start] minmax (8ch , 10ch )
188+ [gutter-left-end] minmax (8ch , 10ch )
189+ /* this is the one we increase from minmax(8ch, 10ch)*/
190+ 10fr
191+ [gutter-right-start] minmax (8ch , 10ch )
192+ [middle-end] minmax (8ch , 10ch )
193+ [body-inset-end] 1rem
194+ [body-end gutter- right-end] 3rem
195+ [body-outset-end] minmax (5rem , 13rem )
196+ [page-inset-end] 3rem
197+ [page-end] 1fr
198+ [screen-inset-end] .5rem
199+ [screen-end] !important ;
200+ }
201+ }
202+ }
203+
204+ /* here's the settings for the medium size screens
205+ * it's hard to do much better,
206+ * ideally the right had side toc could take a little less space
207+ */
208+ /* @media (min-width: 1024px) and (max-width: 1535px) {
209+ html {
210+ .article-grid, .xl\:article-grid {
211+ grid-template-columns:
212+ [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]
213+ }
214+ }
215+ } */
216+
217+
218+
219+ > > /* but keep the upper-left logo to grow too much */
220+ /* .navbar-brand.logo>img {
221+ max-width: 250px;
222+ max-height: 170px;
223+ } */
224+
225+ * /
96226/* div.prompt.input_prompt, div.prompt.output_prompt {
97227 opacity: 0.6;
98228} */
@@ -134,7 +264,7 @@ html[data-theme='dark'] {
134264}
135265 */
136266
137- /* standard admonition classes */
267+ /* standard admonition classes */
138268.admonition-smaller {
139269 font-size : smaller;
140270 line-height : 1.2 ;
0 commit comments