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,232 @@ 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+ }
85103
86- /* execution output cells
87- div.cell div.cell_output . output pre {
88- background- color: #f8fff8 !important ;
89- border: 0.3px solid blue !important ;
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 ) ;
90108}
91109
92- html[data-theme='dark'] div.cell div.cell_output .output pre {
93- background-color: #064b06 !important;
110+ html article main .relative .group [data-mdast-node-id ] {
111+ & : empty {
112+ & ::before {
113+ content : ' ∅ no output ∅ ' ;
114+ }
115+ font-size : xx-small;
116+ padding : 0px 1em ;
117+
118+ border-color : var (--myst-output-empty-border-color );
119+ margin-bottom : 1rem ;
120+ }
121+
122+ border-radius : var (--myst-code-border-radius );
123+ margin-top : 0px ;
124+ padding : 0.25em 1em ;
125+ border-width : var (--myst-code-border-width );
126+ border-color : var (--myst-output-border-color );
127+ background-color : var (--myst-output-background-color );
128+
129+ & > div {
130+ border : 0px solid # 00000000 !important ;
131+ background-color : # 00000000 !important ;
132+
133+ & > code {
134+ border : 0px solid # 00000000 !important ;
135+ }
136+ }
137+ }
138+ html article main .relative .group : has (+ [data-mdast-node-id ]) {
139+ margin-bottom : 0.7em ;
94140}
95- */
96- /* div.prompt.input_prompt, div.prompt.output_prompt {
97- opacity: 0.6;
98- } */
99141
100- /* jupyterlab-myst and tables */
101- /* :is(.bd-container, .myst) table td {
102- padding: initial !important;
142+ /* code blocks */
143+ html .light {
144+ --myst-block-background-color : rgb (243 , 244 , 245 );
145+ --myst-block-border-color : rgb (209 , 213 , 218 );
146+ --myst-block-left-color : rgb (0 , 0 , 128 );
147+ --myst-block-left-width : 2px ;
103148}
104149
105- :is(.bd-container, .myst) table tbody tr:nth-child(odd) {
106- background-color: #fdfdfd;
150+ html .dark {
151+ --myst-block-background-color : rgb (41 , 49 , 61 );
152+ --myst-block-border-color : rgb (72 , 86 , 107 );
153+ --myst-block-left-color : rgb (0 , 0 , 128 );
154+ --myst-block-left-width : 2px ;
107155}
108156
109- :is(.bd-container, .myst) table tbody tr:nth-child(even) {
110- background-color: #fbfbfb;
157+ html body article main div .group .relative : has (> pre > code ) {
158+ padding : .1rem .25rem !important ;
159+ border-radius : var (--myst-code-border-radius );
160+ background-color : var (--myst-block-background-color );
161+ border-width : var (--myst-code-border-width );
162+ border-color : var (--myst-block-border-color );
163+ border-left-width : var (--myst-block-left-width );
164+ border-left-color : var (--myst-block-left-color );
165+
166+ & > pre .hljs .block {
167+ background-color : # 00000000 !important ;
168+ }
111169}
112170
113- :is(.bd-container, .myst) table :is(thead, tfoot) tr {
114- background-color: #f8f8f8;
171+ /* inline code : use same style as blocks */
172+ p > code {
173+ background-color : var (--myst-block-background-color );
174+ border-width : var (--myst-code-border-width );
175+ border-color : var (--myst-block-border-color );
176+ padding : 0.1rem 0.20rem ;
177+ margin-left : 0.20rem ;
178+ margin-right : 0.20rem ;
179+ border-radius : 3px ;
115180}
116181
117- html[data-theme='dark'] {
118- & :is(.bd-container, .myst) table tbody tr:nth-child(odd) {
119- background-color: #020202;
182+ /* ---------- use page width more effectively */
183+ @media (min-width : 1536px ) {
184+ html {
185+ .article-grid , .xl\:article-grid {
186+ grid-template-columns :
187+ /* [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]; */
188+ [screen-start] .5rem
189+ [screen-inset-start] 1fr
190+ [page-start] 3rem
191+ [page-inset-start] minmax (4rem , 9rem )
192+ [body-outset-start] 3rem
193+ [body-start gutter- left-start] 1rem
194+ [body-inset-start] minmax (8ch , 10ch )
195+ [middle-start] minmax (8ch , 10ch )
196+ [gutter-left-end] minmax (8ch , 10ch )
197+ /* this is the one we increase from minmax(8ch, 10ch)*/
198+ 10fr
199+ [gutter-right-start] minmax (8ch , 10ch )
200+ [middle-end] minmax (8ch , 10ch )
201+ [body-inset-end] 1rem
202+ [body-end gutter- right-end] 3rem
203+ [body-outset-end] minmax (5rem , 13rem )
204+ [page-inset-end] 3rem
205+ [page-end] 1fr
206+ [screen-inset-end] .5rem
207+ [screen-end] !important ;
208+ }
120209 }
210+ }
121211
122- & :is(.bd-container, .myst) table tbody tr:nth-child(even) {
123- background-color: #040404 ;
124- }
212+ . full-width {
213+ grid-column : body / page ;
214+ }
125215
126- & :is(.bd-container, .myst) table :is(thead, tfoot) tr {
127- background-color: #080808;
216+ /* here's the settings for the medium size screens
217+ * it's hard to do much better,
218+ * ideally the right had side toc could take a little less space
219+ */
220+ /* @media (min-width: 1024px) and (max-width: 1535px) {
221+ html {
222+ .article-grid, .xl\:article-grid {
223+ grid-template-columns:
224+ [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]
225+ }
128226 }
129227} */
130228
229+
230+ /* ---------- tables */
231+ html .light {
232+ --myst-table-background-color-header : # f8f8f8 ;
233+ --myst-table-bottom-color-header : rgb (90 , 175 , 211 );
234+ --myst-table-background-color-even : # fbfbfb ;
235+ --myst-table-background-color-odd : # fdfdfd ;
236+ }
237+
238+ html .dark {
239+ --myst-table-background-color-header : # 080808 ;
240+ --myst-table-bottom-color-header : rgb (11 , 128 , 137 );
241+ --myst-table-background-color-even : # 020202 ;
242+ --myst-table-background-color-odd : # 040404 ;
243+ }
244+
245+ article main table {
246+ thead , tfoot {
247+ tr {
248+ background-color : var (--myst-table-background-color-header );
249+ }
250+ }
251+ tbody {
252+ th {
253+ background-color : var (--myst-table-background-color-header );
254+ padding : 0.65rem ;
255+ font-size : larger;
256+ border-bottom-color : var (--myst-table-bottom-color-header );
257+ border-bottom-width : 2px ;
258+ }
259+ tr : nth-child (even) {
260+ background-color : var (--myst-table-background-color-even );
261+ }
262+
263+ tr : nth-child (odd) {
264+ background-color : var (--myst-table-background-color-odd )
265+ }
266+ }
267+ }
268+
131269/* space before admonitions */
132270/* :is(.bd-container, .myst) div.admonition>.admonition-title+* {
133271 margin-top: 0px !important;
134272}
135273 */
136274
137- /* standard admonition classes */
275+ /* standard admonition classes */
138276.admonition-smaller {
139277 font-size : smaller;
140278 line-height : 1.2 ;
0 commit comments