]> git.proxmox.com Git - pve-eslint.git/blobdiff - eslint/docs/src/assets/scss/syntax-highlighter.scss
import 8.41.0 source
[pve-eslint.git] / eslint / docs / src / assets / scss / syntax-highlighter.scss
index b0160f7e614cc7a5597c3c7f32b9cb3082703d5d..cb744db0e38125b3253aaf6b71b3fd1848abc9ef 100644 (file)
@@ -1,9 +1,11 @@
 code[class*="language-"],
 pre[class*="language-"] {
-    font-family: var(--mono-font), Consolas,
+    font-family:
+        var(--mono-font),
+        Consolas,
         Monaco,
-        'Andale Mono',
-        'Ubuntu Mono',
+        "Andale Mono",
+        "Ubuntu Mono",
         monospace;
     font-size: 1em;
     text-align: left;
@@ -13,19 +15,11 @@ pre[class*="language-"] {
     word-wrap: normal;
     line-height: 1.5;
     font-variant-ligatures: none;
-
-    -moz-tab-size: 4;
-    -o-tab-size: 4;
     tab-size: 4;
-
-    -webkit-hyphens: none;
-    -moz-hyphens: none;
-    -ms-hyphens: none;
     hyphens: none;
 }
 
 @media print {
-
     code[class*="language-"],
     pre[class*="language-"] {
         text-shadow: none;
@@ -37,26 +31,28 @@ pre[class*="language-"] {
     padding: 1.5rem;
     margin: 1.5rem 0;
     overflow: auto;
-    background-color: var(--color-neutral-50);
     border-radius: var(--border-radius);
-
     background-color: var(--lightest-background-color);
     color: var(--color-neutral-900);
 
     [data-theme="dark"] & {
         color: var(--color-neutral-100);
     }
+
+    &.line-numbers-mode {
+        padding-left: calc(1.5rem + 2.4em + 1.2rem);
+    }
 }
 
-:not(pre)>code[class*="language-"],
+:not(pre) > code[class*="language-"],
 pre[class*="language-"] {
     background-color: var(--lightest-background-color);
 }
 
 /* Inline code */
-:not(pre)>code[class*="language-"] {
-    padding: .1em;
-    border-radius: .3em;
+:not(pre) > code[class*="language-"] {
+    padding: 0.1em;
+    border-radius: 0.3em;
     white-space: normal;
 }
 
@@ -64,19 +60,17 @@ pre[class*="language-"] {
 .token.prolog,
 .token.doctype,
 .token.cdata {
-    color: #6E7F8E;
+    color: #6e7f8e;
 
     [data-theme="dark"] & {
-        color: #8E9FAE;
+        color: #8e9fae;
     }
 }
 
-
 .token.namespace {
-    opacity: .7;
+    opacity: 0.7;
 }
 
-
 .token.selector,
 .token.attr-name,
 .token.string,
@@ -86,7 +80,6 @@ pre[class*="language-"] {
     color: var(--link-color);
 }
 
-
 .token.atrule,
 .token.attr-value,
 .token.keyword {
@@ -106,25 +99,24 @@ pre[class*="language-"] {
     cursor: help;
 }
 
-pre {
-    counter-reset: lineNumber;
-}
-
-code .highlight-line { 
+.line-numbers-wrapper {
+    position: absolute;
+    top: 0;
+    left: 1.5rem;
+    text-align: right;
+    padding-top: 1.5rem;
+    font-size: 1em;
+    font-family: var(--mono-font), Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
+    line-height: 1.5;
+    color: var(--icon-color);
     font-variant-ligatures: none;
-} 
 
-code .highlight-line:before {
-    -webkit-user-select: none;
-    color: var(--icon-color);
-    content: counter(lineNumber);
-    counter-increment: lineNumber;
-    display: inline-block;
-    font-variant-numeric: tabular-nums;
-    margin-right: 1.2em;
-    padding-right: 1.2em;
-    margin-inline-end: 1.2em;
-    padding-inline-end: 1.2em;
-    text-align: right;
-    width: 2.4em;
+    .line-number {
+        user-select: none;
+        color: var(--icon-color);
+        display: inline-block;
+        font-variant-numeric: tabular-nums;
+        text-align: right;
+        width: 1.2em;
+    }
 }