Skip to content

Commit 386b008

Browse files
committed
even table rows need more care in dark themes
1 parent e7f0e18 commit 386b008

File tree

2 files changed

+49
-2
lines changed

2 files changed

+49
-2
lines changed

src/less/main.less

+10
Original file line numberDiff line numberDiff line change
@@ -289,24 +289,34 @@
289289
}
290290

291291
/* fix for reveal dark themes */
292+
body.rise-enabled.theme-black div.rendered_html tbody tr:nth-child(even),
293+
body.rise-enabled.theme-black div.rendered_html thead th,
292294
body.rise-enabled.theme-black div.input_prompt,
293295
body.rise-enabled.theme-black div.output_text>pre,
294296
body.rise-enabled.theme-black div.rendered_html,
295297
body.rise-enabled.theme-black div.text_cell_render { color: white; }
296298

299+
body.rise-enabled.theme-blood div.rendered_html tbody tr:nth-child(even),
300+
body.rise-enabled.theme-blood div.rendered_html thead th,
297301
body.rise-enabled.theme-blood div.input_prompt,
298302
body.rise-enabled.theme-blood div.output_text>pre,
299303
body.rise-enabled.theme-blood div.rendered_html,
300304
body.rise-enabled.theme-blood div.text_cell_render,
305+
body.rise-enabled.theme-league div.rendered_html tbody tr:nth-child(even),
306+
body.rise-enabled.theme-league div.rendered_html thead th,
301307
body.rise-enabled.theme-league div.input_prompt,
302308
body.rise-enabled.theme-league div.output_text>pre,
303309
body.rise-enabled.theme-league div.rendered_html,
304310
body.rise-enabled.theme-league div.text_cell_render,
311+
body.rise-enabled.theme-night div.rendered_html tbody tr:nth-child(even),
312+
body.rise-enabled.theme-night div.rendered_html thead th,
305313
body.rise-enabled.theme-night div.input_prompt,
306314
body.rise-enabled.theme-night div.output_text>pre,
307315
body.rise-enabled.theme-night div.rendered_html,
308316
body.rise-enabled.theme-night div.text_cell_render { color: rgb(238, 238, 238); }
309317

318+
body.rise-enabled.theme-moon div.rendered_html tbody tr:nth-child(even),
319+
body.rise-enabled.theme-moon div.rendered_html thead th,
310320
body.rise-enabled.theme-moon div.input_prompt,
311321
body.rise-enabled.theme-moon div.output_text>pre,
312322
body.rise-enabled.theme-moon div.rendered_html,

tests/themes/master.ipynb

+39-2
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,54 @@
8686
},
8787
{
8888
"cell_type": "code",
89-
"execution_count": null,
89+
"execution_count": 1,
9090
"metadata": {
9191
"cell_style": "split"
9292
},
93-
"outputs": [],
93+
"outputs": [
94+
{
95+
"ename": "NameError",
96+
"evalue": "name 'np' is not defined",
97+
"output_type": "error",
98+
"traceback": [
99+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
100+
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
101+
"\u001b[0;32m<ipython-input-1-a5ffd6f09e6e>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mX\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlinspace\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m5\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m5\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mY\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexp\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mX\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mplot\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mX\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mY\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m;\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
102+
"\u001b[0;31mNameError\u001b[0m: name 'np' is not defined"
103+
]
104+
}
105+
],
94106
"source": [
95107
"X = np.linspace(-5, 5)\n",
96108
"Y = np.exp(X)\n",
97109
"\n",
98110
"plt.plot(X, Y);"
99111
]
112+
},
113+
{
114+
"cell_type": "markdown",
115+
"metadata": {
116+
"slideshow": {
117+
"slide_type": "slide"
118+
}
119+
},
120+
"source": [
121+
"## and now for a table"
122+
]
123+
},
124+
{
125+
"cell_type": "markdown",
126+
"metadata": {},
127+
"source": [
128+
"prior to 5.6 we were getting very small tables\n",
129+
"\n",
130+
"\n",
131+
"| sample | table |\n",
132+
"|--------|-------|\n",
133+
"| men | 10% |\n",
134+
"| women | 70% |\n",
135+
"| children | 30% |"
136+
]
100137
}
101138
],
102139
"metadata": {

0 commit comments

Comments
 (0)