From 24624a43daf26086e6e61ac56d29cab5933e3233 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 12 Sep 2019 21:04:19 +0200 Subject: [PATCH] css: deduplicate block/inline styling. --- css/m-components.css | 40 ++++++++++++-------------- css/m-dark+documentation.compiled.css | 36 ++++++++++------------- css/m-dark.compiled.css | 36 ++++++++++------------- css/m-light+documentation.compiled.css | 36 ++++++++++------------- css/m-light.compiled.css | 36 ++++++++++------------- 5 files changed, 78 insertions(+), 106 deletions(-) diff --git a/css/m-components.css b/css/m-components.css index 335ee72f..bb2dfe16 100644 --- a/css/m-components.css +++ b/css/m-components.css @@ -79,24 +79,6 @@ hr { blockquote, hr { border-color: var(--line-color); } -pre { - font-family: var(--code-font), monospace, monospace; /* https://en.wikipedia.org/wiki/User:Davidgothberg/Test59 */ - font-size: var(--code-font-size); - padding: 0.5rem 1rem; - color: var(--code-color); - background-color: var(--code-background-color); - border-radius: var(--border-radius); - overflow-x: auto; - margin-top: 0; /* stupid defaults */ -} -pre.m-console-wrap { - white-space: pre-wrap; - word-break: break-all; -} -pre.m-console { - color: var(--console-color); - background-color: var(--console-background-color); -} /* Inline elements */ strong, .m-text.m-strong { font-weight: bold; } @@ -131,17 +113,31 @@ mark { background-color: var(--mark-background-color); color: var(--mark-color); } -code { - font-family: var(--code-font), monospace, monospace; + +/* Block/inline code */ +pre, code { + font-family: var(--code-font), monospace, monospace; /* https://en.wikipedia.org/wiki/User:Davidgothberg/Test59 */ font-size: var(--code-font-size); - padding: 0.125rem; color: var(--code-color); background-color: var(--code-background-color); } -code.m-console { +pre.m-console, code.m-console { color: var(--console-color); background-color: var(--console-background-color); } +pre { + padding: 0.5rem 1rem; + border-radius: var(--border-radius); + overflow-x: auto; + margin-top: 0; /* stupid defaults */ +} +pre.m-console-wrap { + white-space: pre-wrap; + word-break: break-all; +} +code { + padding: 0.125rem; +} /* Focus outline on link, canvas and input: match the focused header item. */ *:focus { outline-color: var(--header-link-current-color); } diff --git a/css/m-dark+documentation.compiled.css b/css/m-dark+documentation.compiled.css index 440f1523..65935bc2 100644 --- a/css/m-dark+documentation.compiled.css +++ b/css/m-dark+documentation.compiled.css @@ -391,24 +391,6 @@ hr { blockquote, hr { border-color: #405363; } -pre { - font-family: 'Source Code Pro', monospace, monospace, monospace; - font-size: 0.9em; - padding: 0.5rem 1rem; - color: #e6e6e6; - background-color: #282e36; - border-radius: 0.2rem; - overflow-x: auto; - margin-top: 0; -} -pre.m-console-wrap { - white-space: pre-wrap; - word-break: break-all; -} -pre.m-console { - color: #e6e6e6; - background-color: #161616; -} strong, .m-text.m-strong { font-weight: bold; } em, .m-text.m-em { font-style: italic; } s, .m-text.m-s { text-decoration: line-through; } @@ -440,17 +422,29 @@ mark { background-color: #c7cf2f; color: #2f83cc; } -code { +pre, code { font-family: 'Source Code Pro', monospace, monospace, monospace; font-size: 0.9em; - padding: 0.125rem; color: #e6e6e6; background-color: #282e36; } -code.m-console { +pre.m-console, code.m-console { color: #e6e6e6; background-color: #161616; } +pre { + padding: 0.5rem 1rem; + border-radius: 0.2rem; + overflow-x: auto; + margin-top: 0; +} +pre.m-console-wrap { + white-space: pre-wrap; + word-break: break-all; +} +code { + padding: 0.125rem; +} *:focus { outline-color: #5b9dd9; } div.m-scroll { max-width: 100%; diff --git a/css/m-dark.compiled.css b/css/m-dark.compiled.css index 05cf12a2..c3641866 100644 --- a/css/m-dark.compiled.css +++ b/css/m-dark.compiled.css @@ -391,24 +391,6 @@ hr { blockquote, hr { border-color: #405363; } -pre { - font-family: 'Source Code Pro', monospace, monospace, monospace; - font-size: 0.9em; - padding: 0.5rem 1rem; - color: #e6e6e6; - background-color: #282e36; - border-radius: 0.2rem; - overflow-x: auto; - margin-top: 0; -} -pre.m-console-wrap { - white-space: pre-wrap; - word-break: break-all; -} -pre.m-console { - color: #e6e6e6; - background-color: #161616; -} strong, .m-text.m-strong { font-weight: bold; } em, .m-text.m-em { font-style: italic; } s, .m-text.m-s { text-decoration: line-through; } @@ -440,17 +422,29 @@ mark { background-color: #c7cf2f; color: #2f83cc; } -code { +pre, code { font-family: 'Source Code Pro', monospace, monospace, monospace; font-size: 0.9em; - padding: 0.125rem; color: #e6e6e6; background-color: #282e36; } -code.m-console { +pre.m-console, code.m-console { color: #e6e6e6; background-color: #161616; } +pre { + padding: 0.5rem 1rem; + border-radius: 0.2rem; + overflow-x: auto; + margin-top: 0; +} +pre.m-console-wrap { + white-space: pre-wrap; + word-break: break-all; +} +code { + padding: 0.125rem; +} *:focus { outline-color: #5b9dd9; } div.m-scroll { max-width: 100%; diff --git a/css/m-light+documentation.compiled.css b/css/m-light+documentation.compiled.css index 9812b0fc..2f7fa5bf 100644 --- a/css/m-light+documentation.compiled.css +++ b/css/m-light+documentation.compiled.css @@ -391,24 +391,6 @@ hr { blockquote, hr { border-color: #f7e3db; } -pre { - font-family: 'Source Code Pro', monospace, monospace, monospace; - font-size: 1em; - padding: 0.5rem 1rem; - color: #5b5b5b; - background-color: #fbf0ec; - border-radius: 0.2rem; - overflow-x: auto; - margin-top: 0; -} -pre.m-console-wrap { - white-space: pre-wrap; - word-break: break-all; -} -pre.m-console { - color: #5b5b5b; - background-color: #000000; -} strong, .m-text.m-strong { font-weight: bold; } em, .m-text.m-em { font-style: italic; } s, .m-text.m-s { text-decoration: line-through; } @@ -440,17 +422,29 @@ mark { background-color: #e6e69c; color: #4c93d3; } -code { +pre, code { font-family: 'Source Code Pro', monospace, monospace, monospace; font-size: 1em; - padding: 0.125rem; color: #5b5b5b; background-color: #fbf0ec; } -code.m-console { +pre.m-console, code.m-console { color: #5b5b5b; background-color: #000000; } +pre { + padding: 0.5rem 1rem; + border-radius: 0.2rem; + overflow-x: auto; + margin-top: 0; +} +pre.m-console-wrap { + white-space: pre-wrap; + word-break: break-all; +} +code { + padding: 0.125rem; +} *:focus { outline-color: #ea7944; } div.m-scroll { max-width: 100%; diff --git a/css/m-light.compiled.css b/css/m-light.compiled.css index ec4916bf..81c3754d 100644 --- a/css/m-light.compiled.css +++ b/css/m-light.compiled.css @@ -391,24 +391,6 @@ hr { blockquote, hr { border-color: #f7e3db; } -pre { - font-family: 'Source Code Pro', monospace, monospace, monospace; - font-size: 1em; - padding: 0.5rem 1rem; - color: #5b5b5b; - background-color: #fbf0ec; - border-radius: 0.2rem; - overflow-x: auto; - margin-top: 0; -} -pre.m-console-wrap { - white-space: pre-wrap; - word-break: break-all; -} -pre.m-console { - color: #5b5b5b; - background-color: #000000; -} strong, .m-text.m-strong { font-weight: bold; } em, .m-text.m-em { font-style: italic; } s, .m-text.m-s { text-decoration: line-through; } @@ -440,17 +422,29 @@ mark { background-color: #e6e69c; color: #4c93d3; } -code { +pre, code { font-family: 'Source Code Pro', monospace, monospace, monospace; font-size: 1em; - padding: 0.125rem; color: #5b5b5b; background-color: #fbf0ec; } -code.m-console { +pre.m-console, code.m-console { color: #5b5b5b; background-color: #000000; } +pre { + padding: 0.5rem 1rem; + border-radius: 0.2rem; + overflow-x: auto; + margin-top: 0; +} +pre.m-console-wrap { + white-space: pre-wrap; + word-break: break-all; +} +code { + padding: 0.125rem; +} *:focus { outline-color: #ea7944; } div.m-scroll { max-width: 100%; -- 2.30.2