make codeblock folding has a larger clickable area

pull/1072/head
Yuxin Wu 2022-05-07 14:07:26 -07:00
parent 30efe838c5
commit 9f25b62e8c
2 changed files with 10 additions and 2 deletions

View File

@ -13,7 +13,7 @@ figure.highlight
&.folded
.highlight-body
height: 0
.copy
opacity: .7
@ -90,6 +90,14 @@ figure.highlight
min-width: inherit
border-radius: inherit
figure.highlight.folded
figcaption
cursor: pointer
figure.highlight.unfolded
figcaption
cursor: pointer
/* ---------------------------------
* Fix Gist Snippet
* --------------------------------- */

View File

@ -111,7 +111,7 @@
toggleFold(this, fold === 'folded');
});
$('figure.highlight figcaption .fold').click(function() {
$('figure.highlight figcaption').click(function() {
const $code = $(this).closest('figure.highlight');
toggleFold($code.eq(0), !$code.hasClass('folded'));
});