From 823e1f19d5f3ac438ac4d8c23a8308a13702ca49 Mon Sep 17 00:00:00 2001 From: Ondrej Date: Mon, 12 Jun 2017 15:59:39 +0200 Subject: [PATCH 1/2] Changes single ` markdown highlighting Changes highlighting of text surrounded by single ` in markdown cells by adding gray background under the text. Highlighting should resemble the stack-overflow highlighting. Signed-off-by: Ondrej --- notebook/static/notebook/less/renderedhtml.less | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/notebook/static/notebook/less/renderedhtml.less b/notebook/static/notebook/less/renderedhtml.less index 4b535c7f9..60e87eab3 100644 --- a/notebook/static/notebook/less/renderedhtml.less +++ b/notebook/static/notebook/less/renderedhtml.less @@ -44,11 +44,17 @@ background-color: @rendered_html_border_color; } - pre {margin: 1em 2em;} + pre { + margin: 1em 2em; + background-color: @body-bg; + } + + code {background-color: #eff0f1;} + + pre code {background-color: @body-bg;} pre, code { border: 0; - background-color: @body-bg; color: @text-color; font-size: 100%; padding: 0px; From 533aea11fdcb3a358add0ae4cbe41c97dac2cf2c Mon Sep 17 00:00:00 2001 From: Ondrej Date: Mon, 12 Jun 2017 22:11:46 +0200 Subject: [PATCH 2/2] Added padding around gray box of ` markdown Added padding of 1px from top and bottom and 5px from left and right around gray box of single ` markdown. Signed-off-by: Ondrej --- notebook/static/notebook/less/renderedhtml.less | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/notebook/static/notebook/less/renderedhtml.less b/notebook/static/notebook/less/renderedhtml.less index 60e87eab3..7a465d707 100644 --- a/notebook/static/notebook/less/renderedhtml.less +++ b/notebook/static/notebook/less/renderedhtml.less @@ -46,10 +46,14 @@ pre { margin: 1em 2em; + padding: 0px; background-color: @body-bg; } - code {background-color: #eff0f1;} + code { + background-color: #eff0f1; + padding: 1px 5px; + } pre code {background-color: @body-bg;} @@ -57,7 +61,6 @@ border: 0; color: @text-color; font-size: 100%; - padding: 0px; } blockquote {margin: 1em 2em;}