aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Brattlof <hello@bryanbrattlof.com>2020-04-26 11:49:11 -0400
committerBryan Brattlof <hello@bryanbrattlof.com>2020-04-26 11:49:11 -0400
commitef77456a3e230371651937a6f66f29b0ae6f6e91 (patch)
treedc257fce8aea7ab25c5ebae62493633549e831c4
parenta9725e8ac4c39db8eb435c4f24b9e33713b38928 (diff)
downloadbryanbrattlof.com-ef77456a3e230371651937a6f66f29b0ae6f6e91.tar.gz
bryanbrattlof.com-ef77456a3e230371651937a6f66f29b0ae6f6e91.tar.bz2
allow browsers to manipulate code-block font sizes
a while back I read about how 'monospace, monospace' was a cleaver hack to get browsers, specifically Firefox, to stop messing with the font-size of monospace fonts. However with all the new browsers coming out and the prevalence of chromium, I think it's wise to give browsers more control on how to style my website
-rw-r--r--stylesheets/code.scss7
1 files changed, 2 insertions, 5 deletions
diff --git a/stylesheets/code.scss b/stylesheets/code.scss
index d37addb..a4872c3 100644
--- a/stylesheets/code.scss
+++ b/stylesheets/code.scss
@@ -1,13 +1,11 @@
%code-block {
+ font-family: $code-font;
background-color: $title-font-color;
color: rgb(255, 255, 255);
box-sizing: content-box;
border-radius: 3px;
- white-space: pre-wrap;
-
- font-family: $code-font, $code-font;
}
%code-italic { font-style: italic; }
@@ -15,9 +13,7 @@
code {
@extend %code-block;
-
padding: 3px 5px;
- border-radius: 3px;
}
.highlight {
@@ -34,6 +30,7 @@ code {
@include print {
background: none;
+ border-radius: none;
border-top: 1px solid black;
border-bottom: 1px solid black;