Merge pull request #6320 from SimonBrandner/feature/proper-codeblock-colors

This commit is contained in:
Germain 2021-07-08 09:07:21 +01:00 committed by GitHub
commit bda83e8140
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 59 deletions

View file

@ -477,8 +477,7 @@ $hover-select-border: 4px;
pre, code { pre, code {
font-family: $monospace-font-family !important; font-family: $monospace-font-family !important;
// deliberate constants as we're behind an invert filter background-color: $header-panel-bg-color;
color: #333;
} }
pre { pre {
@ -488,11 +487,6 @@ $hover-select-border: 4px;
overflow-x: overlay; overflow-x: overlay;
overflow-y: visible; overflow-y: visible;
} }
code {
// deliberate constants as we're behind an invert filter
background-color: #f8f8f8;
}
} }
.mx_EventTile_lineNumbers { .mx_EventTile_lineNumbers {

View file

@ -119,8 +119,6 @@ $voipcall-plinth-color: #394049;
$theme-button-bg-color: #e3e8f0; $theme-button-bg-color: #e3e8f0;
$dialpad-button-bg-color: #6F7882; $dialpad-button-bg-color: #6F7882;
;
$roomlist-button-bg-color: rgba(141, 151, 165, 0.2); // Buttons include the filter box, explore button, and sublist buttons $roomlist-button-bg-color: rgba(141, 151, 165, 0.2); // Buttons include the filter box, explore button, and sublist buttons
$roomlist-filter-active-bg-color: $bg-color; $roomlist-filter-active-bg-color: $bg-color;
@ -274,24 +272,7 @@ $composer-shadow-color: rgba(0, 0, 0, 0.28);
} }
// markdown overrides: // markdown overrides:
.mx_EventTile_content .markdown-body pre:hover {
border-color: #808080 !important; // inverted due to rules below
scrollbar-color: rgba(0, 0, 0, 0.2) transparent; // copied from light theme due to inversion below
// the code above works only in Firefox, this is for other browsers
// see https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-color
&::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.2); // copied from light theme due to inversion below
}
}
.mx_EventTile_content .markdown-body { .mx_EventTile_content .markdown-body {
pre, code {
filter: invert(1);
}
pre code {
filter: none;
}
table { table {
tr { tr {
background-color: #000000; background-color: #000000;
@ -301,18 +282,9 @@ $composer-shadow-color: rgba(0, 0, 0, 0.28);
background-color: #080808; background-color: #080808;
} }
} }
blockquote {
color: #919191;
}
} }
// diff highlight colors // highlight.js overrides
// intentionally swapped to avoid inversion .hljs-tag {
.hljs-addition { color: inherit; // Without this they'd be weirdly blue which doesn't match the theme
background: #fdd;
}
.hljs-deletion {
background: #dfd;
} }

View file

@ -9,3 +9,4 @@
@import "_dark.scss"; @import "_dark.scss";
@import "../../light/css/_mods.scss"; @import "../../light/css/_mods.scss";
@import "../../../../res/css/_components.scss"; @import "../../../../res/css/_components.scss";
@import url("highlight.js/styles/atom-one-dark.css");

View file

@ -118,7 +118,7 @@ $voipcall-plinth-color: #394049;
$theme-button-bg-color: #e3e8f0; $theme-button-bg-color: #e3e8f0;
$dialpad-button-bg-color: #6F7882; $dialpad-button-bg-color: #6F7882;
;
$roomlist-button-bg-color: #1A1D23; // Buttons include the filter box, explore button, and sublist buttons $roomlist-button-bg-color: #1A1D23; // Buttons include the filter box, explore button, and sublist buttons
$roomlist-filter-active-bg-color: $roomlist-button-bg-color; $roomlist-filter-active-bg-color: $roomlist-button-bg-color;
@ -249,7 +249,7 @@ $composer-shadow-color: tranparent;
@define-mixin mx_DialogButton_secondary { @define-mixin mx_DialogButton_secondary {
// flip colours for the secondary ones // flip colours for the secondary ones
font-weight: 600; font-weight: 600;
border: 1px solid $accent-color ! important; border: 1px solid $accent-color !important;
color: $accent-color; color: $accent-color;
background-color: $button-secondary-bg-color; background-color: $button-secondary-bg-color;
} }
@ -267,18 +267,7 @@ $composer-shadow-color: tranparent;
} }
// markdown overrides: // markdown overrides:
.mx_EventTile_content .markdown-body pre:hover {
border-color: #808080 !important; // inverted due to rules below
}
.mx_EventTile_content .markdown-body { .mx_EventTile_content .markdown-body {
pre, code {
filter: invert(1);
}
pre code {
filter: none;
}
table { table {
tr { tr {
background-color: #000000; background-color: #000000;
@ -290,12 +279,7 @@ $composer-shadow-color: tranparent;
} }
} }
// diff highlight colors // highlight.js overrides:
// intentionally swapped to avoid inversion .hljs-tag {
.hljs-addition { color: inherit; // Without this they'd be weirdly blue which doesn't match the theme
background: #fdd;
}
.hljs-deletion {
background: #dfd;
} }

View file

@ -4,3 +4,4 @@
@import "../../legacy-light/css/_legacy-light.scss"; @import "../../legacy-light/css/_legacy-light.scss";
@import "_legacy-dark.scss"; @import "_legacy-dark.scss";
@import "../../../../res/css/_components.scss"; @import "../../../../res/css/_components.scss";
@import url("highlight.js/styles/atom-one-dark.css");

View file

@ -3,3 +3,4 @@
@import "_fonts.scss"; @import "_fonts.scss";
@import "_legacy-light.scss"; @import "_legacy-light.scss";
@import "../../../../res/css/_components.scss"; @import "../../../../res/css/_components.scss";
@import url("highlight.js/styles/atom-one-light.css");

View file

@ -4,3 +4,4 @@
@import "_light.scss"; @import "_light.scss";
@import "_mods.scss"; @import "_mods.scss";
@import "../../../../res/css/_components.scss"; @import "../../../../res/css/_components.scss";
@import url("highlight.js/styles/atom-one-light.css");