Refactor css for 'pre' with modifiers

pull/66/head
Alexey Golub 6 years ago
parent f0cd2dce1b
commit 7ecf90d1cb

@ -9,14 +9,13 @@ a {
color: #0096cf;
}
.pre-multiline {
background-color: #2F3136;
border-color: #282b30;
color: #839496;
.pre {
background-color: #2f3136;
}
.pre-inline {
background-color: #2f3136;
.pre--multiline {
border-color: #282b30;
color: #839496;
}
.mention {

@ -9,13 +9,12 @@ a {
color: #00b0f4;
}
.pre-multiline {
.pre {
background-color: #f9f9f9;
color: #657b83;
}
.pre-inline {
background-color: #f9f9f9;
.pre--multiline {
color: #657b83;
}
/* === INFO === */

@ -17,20 +17,21 @@ img {
object-fit: contain;
}
.pre-multiline {
.pre {
font-family: "Consolas", "Courier New", Courier, Monospace;
white-space: pre-wrap;
}
.pre--multiline {
margin-top: 4px;
padding: 8px;
border: 2px solid;
border-radius: 5px;
font-family: "Consolas", "Courier New", Courier, Monospace;
white-space: pre-wrap;
}
.pre-inline {
.pre--inline {
padding: 2px;
border-radius: 3px;
font-family: "Consolas", "Courier New", Courier, Monospace;
white-space: pre-wrap;
}
.emoji {

@ -146,11 +146,11 @@ namespace DiscordChatExporter.Core.Services
// Decode and process multiline codeblocks
content = Regex.Replace(content, "\x1AM(.*?)\x1AM",
m => $"<div class=\"pre-multiline\">{m.Groups[1].Value.Base64Decode()}</div>");
m => $"<div class=\"pre pre--multiline\">{m.Groups[1].Value.Base64Decode()}</div>");
// Decode and process inline codeblocks
content = Regex.Replace(content, "\x1AI(.*?)\x1AI",
m => $"<span class=\"pre-inline\">{m.Groups[1].Value.Base64Decode()}</span>");
m => $"<span class=\"pre pre--inline\">{m.Groups[1].Value.Base64Decode()}</span>");
// Decode and process links
if (allowLinks)

Loading…
Cancel
Save