From 95664509a000aa032622d2be5364ac83b65e88d4 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Wed, 22 Apr 2026 15:02:30 +0800 Subject: [PATCH] fix(layout): specify selector for comments section in SCSS --- assets/js/utils/common.js | 2 +- assets/scss/core/layouts/_comment.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/utils/common.js b/assets/js/utils/common.js index 94f752fd..b2f19f66 100644 --- a/assets/js/utils/common.js +++ b/assets/js/utils/common.js @@ -38,7 +38,7 @@ export function isMobile() { * @returns {Boolean} whether the TOC should be rendered as static */ export function isTocStatic() { - return document.getElementById('toc-static').dataset.kept === 'true' || window.matchMedia('only screen and (max-width: 960px)').matches; + return document.getElementById('toc-static')?.dataset?.kept === 'true' || window.matchMedia('only screen and (max-width: 960px)').matches; } /** diff --git a/assets/scss/core/layouts/_comment.scss b/assets/scss/core/layouts/_comment.scss index 3215ce41..143d27ad 100644 --- a/assets/scss/core/layouts/_comment.scss +++ b/assets/scss/core/layouts/_comment.scss @@ -1,4 +1,4 @@ -#comments { +body > #comments { padding: 2rem 1rem; display: flex;