From 7ee9c60e38f99773ce6bcef9d0f733661a7304c9 Mon Sep 17 00:00:00 2001 From: danielv Date: Wed, 2 Feb 2022 00:01:34 +0100 Subject: [PATCH] Add syntax highlighting to codeblock --- packages/web_ui/src/index.css | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/packages/web_ui/src/index.css b/packages/web_ui/src/index.css index 1129e846..37f3889b 100644 --- a/packages/web_ui/src/index.css +++ b/packages/web_ui/src/index.css @@ -294,3 +294,23 @@ body { height: 32px; width: 32px; } + +/* + * Render codeblock with options for syntax highlighting + * https://user-images.githubusercontent.com/6792749/152066701-21420461-710b-4fae-a80a-89ef90a0b18f.png +*/ +.codeblock { + background-color: black; + padding: 8px; + line-height: 18px; + font-family: Courier; + position: relative; +} +.codeblock .highlight { + color: yellow; +} +.codeblock .copy-button { + position: absolute; + top: 8px; + right: 8px; +}