diff --git a/_sass/_code.scss b/_sass/_code.scss index 0f85dc0..115a37e 100644 --- a/_sass/_code.scss +++ b/_sass/_code.scss @@ -1,15 +1,17 @@ -/* Copied from Poole, I have made just a few minor tweaks */ -/* https://github.com/poole/poole/blob/master/_sass/_code.scss */ +/* Heavily inspired by: */ +/* - https://github.com/poole/poole/blob/master/_sass/_code.scss */ code, pre { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + /* https://qwtel.com/posts/software/the-monospaced-system-ui-css-font-stack */ + font-family: ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro", "Fira Mono", "Droid Sans Mono", "Courier New", monospace; } code { - font-size: 85%; + font-size: 0.9em; } +// TODO: where does this usually appear? pre { display: block; margin-top: 0; @@ -21,13 +23,12 @@ pre { article { code:not(pre.highlight code):not(figure.highlight pre code) { background-color: var(--bg-inline-code); - padding: 0.15em; + padding: 0.1em 0.2em; } } .highlight { - padding: 1rem; - margin: 0 0 1rem 0; + padding: 0.5em; background-color: var(--bg-code-block); pre { @@ -40,9 +41,18 @@ article { } } +.highlighter-rouge { + margin-top: 1em; + margin-bottom: 2em; +} + +.highlighter-rouge + .highlighter-rouge { + margin-top: -1em; +} + .rouge-table { margin-bottom: 0; - font-size: 100%; + font-size: 1em; &, td, diff --git a/_sass/_highlight.scss b/_sass/pygments-css-themes/_poole.scss similarity index 98% rename from _sass/_highlight.scss rename to _sass/pygments-css-themes/_poole.scss index da662a5..5c29fda 100644 --- a/_sass/_highlight.scss +++ b/_sass/pygments-css-themes/_poole.scss @@ -17,7 +17,7 @@ .highlight .gi { background-color: #cfc; border: 1px solid #0c0 } /* Generic.Inserted */ .highlight .go { color: #aaa } /* Generic.Output */ .highlight .gp { color: #009; } /* Generic.Prompt */ -// .highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #030; } /* Generic.Subheading */ .highlight .gt { color: #9c6 } /* Generic.Traceback */ .highlight .kc { color: #069; } /* Keyword.Constant */ diff --git a/assets/rouge.scss b/assets/rouge.scss index 773f927..6e034f2 100644 --- a/assets/rouge.scss +++ b/assets/rouge.scss @@ -1,10 +1,9 @@ --- -# Use a comment to ensure Jekyll reads the file to be transformed into CSS later -# only main files contain this front matter, not partials. --- -/* Copied from Poole, I have made just a few minor tweaks */ -/* https://github.com/poole/poole/blob/master/styles.scss */ +// TODO: switch between these two according to the overall color scheme +// @import "pygments-css-themes/base16-tomorrow-light"; +// @import "pygments-css-themes/base16-tomorrow-dark"; -@import "code"; -@import "highlight"; +@import "pygments-css-themes/poole"; +// @import "pygments-css-themes/native"; \ No newline at end of file