Skip to content

Commit

Permalink
hljs class seems fine without it 🦢
Browse files Browse the repository at this point in the history
  • Loading branch information
CoralPink committed Nov 5, 2023
1 parent 39237b7 commit 2bd71ea
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 26 deletions.
2 changes: 0 additions & 2 deletions js/book.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ const initCodeBlock = () => {
clip.innerHTML = '<i class="tooltiptext"></i>';

for (const code of document.querySelector('.content main').querySelectorAll('pre code')) {
code.classList.add('hljs');

if (code.classList.contains('language-txt')) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion js/serviceworker.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const CACHE_VERSION = 'v0.10.0';
const CACHE_VERSION = 'v0.10.1';
const CACHE_LIST = [
'/commentary/book.js',
'/commentary/elasticlunr.min.js',
Expand Down
16 changes: 0 additions & 16 deletions scss/_catppuccin.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.mocha.hljs {
color: #cdd6f4;
background: #1e1e2e;
}
.mocha .hljs-keyword {
color: #cba6f7;
}
Expand Down Expand Up @@ -153,10 +149,6 @@
color: #585b70;
}

.macchiato.hljs {
color: #cad3f5;
background: #24273a;
}
.macchiato .hljs-keyword {
color: #c6a0f6;
}
Expand Down Expand Up @@ -308,10 +300,6 @@
color: #5b6078;
}

.frappe.hljs {
color: #c6d0f5;
background: #303446;
}
.frappe .hljs-keyword {
color: #ca9ee6;
}
Expand Down Expand Up @@ -463,10 +451,6 @@
color: #626880;
}

.latte.hljs {
color: #4c4f69;
background: #eff1f5;
}
.latte .hljs-keyword {
color: #8839ef;
}
Expand Down
8 changes: 1 addition & 7 deletions scss/theme/chrome.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
@use '../variables' as var;

.hljs {
display: block;
overflow-x: auto;
}

.page {
// For the style attribute, display: grid or block is added from the JS code.
// (Specify an initial value to prevent layout shift on PC.)
Expand Down Expand Up @@ -86,8 +81,7 @@

#searchresults a,
.content main a:link,
a:visited,
a > .hljs {
a:visited {
color: var(--links);
}

Expand Down
3 changes: 3 additions & 0 deletions scss/theme/general.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ pre {
}

& > code {
display: block;
overflow-x: auto;

padding: 0.7rem;
}

Expand Down

0 comments on commit 2bd71ea

Please sign in to comment.