Refactor css for 'pre' with modifiers

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

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

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

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

@ -146,11 +146,11 @@ namespace DiscordChatExporter.Core.Services
// Decode and process multiline codeblocks // Decode and process multiline codeblocks
content = Regex.Replace(content, "\x1AM(.*?)\x1AM", 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 // Decode and process inline codeblocks
content = Regex.Replace(content, "\x1AI(.*?)\x1AI", 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 // Decode and process links
if (allowLinks) if (allowLinks)

Loading…
Cancel
Save