aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/css/common/misc.css
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-07-01 02:57:35 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-07-01 02:57:35 +0300
commit50c1dbeb3af0a0849202ef765c7be2771307856d (patch)
tree0b08f68f185a835d3cf4a23047efc89bd6233677 /css/common/misc.css
parentlighter background-color of <pre> and <code> (diff)
downloadegor-tensin.github.io-50c1dbeb3af0a0849202ef765c7be2771307856d.tar.gz
egor-tensin.github.io-50c1dbeb3af0a0849202ef765c7be2771307856d.zip
css: update common/
Merge css/common/*.css from cpp-notes (my other project). It includes things like horizontal scrollbars inside <pre>s, lighter background inside <pre> and <code>, etc.
Diffstat (limited to 'css/common/misc.css')
-rw-r--r--css/common/misc.css26
1 files changed, 26 insertions, 0 deletions
diff --git a/css/common/misc.css b/css/common/misc.css
index 95b80bf..edca6b0 100644
--- a/css/common/misc.css
+++ b/css/common/misc.css
@@ -5,6 +5,27 @@
.wider {
max-width: 600px;
}
+/* Links become blue inside of <hN> elements otherwise. */
+h1 a,
+h2 a,
+h3 a,
+h4 a,
+h5 a,
+h6 a {
+ color: inherit;
+}
+/* Link captions might become too close to badges on the sidebar. */
+span.badge {
+ margin-left: .5em;
+}
+/* Add horizontal scrollbars to <pre>s and don't wrap the code inside. */
+pre {
+ overflow-x: auto;
+}
+pre code {
+ white-space: pre;
+ word-wrap: normal;
+}
/* Lighter background for <pre> and <code> elements. */
pre {
font-size: inherit;
@@ -18,3 +39,8 @@ code {
background-color: #fbfbfb;
font-size: inherit;
}
+/* Prevent <code> elements from standing out from alerts. */
+.alert code {
+ padding: 0;
+ background-color: inherit;
+}