Browse Source

chore(less): Move background and font colour of pre and code css definitions (#32238)

Alberto Leal 3 years ago
parent
commit
d0a4c67689

+ 13 - 5
static/app/styles/global.tsx

@@ -32,6 +32,19 @@ const styles = (theme: Theme, isDark: boolean) => css`
     border-top-color: ${theme.border};
   }
 
+  pre,
+  code {
+    background-color: ${theme.backgroundSecondary};
+  }
+
+  pre {
+    color: ${theme.textColor};
+  }
+
+  code {
+    background-color: transparent;
+  }
+
   /**
    * See https://web.dev/prefers-reduced-motion/
    */
@@ -163,11 +176,6 @@ const styles = (theme: Theme, isDark: boolean) => css`
         .nav-header span.help-link a {
           color: ${theme.subText};
         }
-        pre,
-        code {
-          background-color: ${theme.backgroundSecondary};
-          color: ${theme.textColor};
-        }
         .search .search-input {
           background: ${theme.background};
           color: ${theme.formText};

+ 0 - 4
static/less/base.less

@@ -400,11 +400,9 @@ pre {
   padding: ((@line-height-computed - 1) / 2);
   font-size: (@font-size-base - 1); // 14px to 13px
   line-height: @line-height-base;
-  color: @pre-color;
   word-break: break-all;
   white-space: pre-wrap;
   word-wrap: break-word;
-  background-color: @pre-bg;
   border-radius: @border-radius-base;
   overflow: auto;
 
@@ -412,9 +410,7 @@ pre {
   code {
     padding: 0;
     font-size: inherit;
-    color: inherit;
     white-space: pre-wrap;
-    background-color: transparent;
     border-radius: 0;
   }
 }

+ 0 - 4
static/less/includes/bootstrap/variables.less

@@ -686,10 +686,6 @@
 @kbd-color: #fff;
 @kbd-bg: #333;
 
-@pre-bg: #f7f8f9;
-@pre-color: #1d1127;
-@pre-border-color: #ccc;
-
 //== Type
 //
 //##