aboutsummaryrefslogtreecommitdiff
path: root/client/src/components/prism-themes/prism-line-numbers.css
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/components/prism-themes/prism-line-numbers.css')
-rw-r--r--client/src/components/prism-themes/prism-line-numbers.css60
1 files changed, 60 insertions, 0 deletions
diff --git a/client/src/components/prism-themes/prism-line-numbers.css b/client/src/components/prism-themes/prism-line-numbers.css
new file mode 100644
index 0000000..14c91b9
--- /dev/null
+++ b/client/src/components/prism-themes/prism-line-numbers.css
@@ -0,0 +1,60 @@
+pre {
+ background: transparent !important;
+ height: 100%;
+ width: 100%;
+ padding-top: 0 !important;
+ margin-top: 0 !important;
+ padding-right: 0 !important;
+ padding-bottom: 0 !important;
+ margin-bottom: 0 !important;
+ overflow: hidden;
+}
+
+pre[class*="language-"],
+code[class*="language-"] {
+ /* there might be some slight offsets,
+ depending on what font you select */
+ font-family: "Roboto Mono", monospace;
+}
+
+/* from Prism */
+pre[class*="language-"].line-numbers {
+ padding-left: 3.8em;
+ counter-reset: linenumber;
+ white-space: pre-wrap;
+}
+
+pre[class*="language-"].line-numbers > code {
+ position: relative;
+ white-space: inherit;
+}
+
+.line-numbers .line-numbers-rows {
+ position: absolute;
+ pointer-events: none;
+ top: 0;
+ font-size: 100%;
+ left: -3.8em;
+ width: 3em; /* works for line-numbers below 1000 lines */
+ letter-spacing: -1px;
+ border-right: 1px solid #999;
+
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.line-numbers-rows > span {
+ pointer-events: none;
+ display: block;
+ counter-increment: linenumber;
+}
+
+.line-numbers-rows > span:before {
+ content: counter(linenumber);
+ color: #999;
+ display: block;
+ padding-right: 0.8em;
+ text-align: right;
+}