Skip to content

Commit 3fc9564

Browse files
kevinten10claude
andcommitted
fix: 恢复各 section 自身的 padding — 避免 Docsy 覆盖冲突
移除全局 section padding:0 覆盖,改用 !important 在各 section 自己的 CSS 中声明 padding,避免与 Docsy 的 td-block-padding 冲突。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0b531b4 commit 3fc9564

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

layouts/partials/hooks/head-end.html

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,9 @@
4040
padding-top: 0 !important;
4141
padding-bottom: 0 !important;
4242
}
43-
/* Remove Docsy's td-block-padding and first-section padding from homepage sections */
43+
/* Override Docsy's td-block-padding on homepage sections — each section sets its own padding */
4444
body.td-home .td-default main > section:first-of-type {
4545
padding-top: 0 !important;
46-
}
47-
body.td-home .td-default main section {
48-
padding-top: 0 !important;
4946
padding-bottom: 0 !important;
5047
}
5148
body.td-home .td-outer { padding-top: 0 !important; }
@@ -336,7 +333,7 @@
336333

337334
/* ---------- Architecture ---------- */
338335
.capa-arch {
339-
padding: 100px 24px 60px;
336+
padding: 100px 24px 60px !important;
340337
background: var(--apple-bg);
341338
text-align: center;
342339
}
@@ -362,7 +359,7 @@
362359

363360
/* ---------- Video ---------- */
364361
.capa-video {
365-
padding: 100px 24px 60px;
362+
padding: 100px 24px 60px !important;
366363
background: #fff;
367364
text-align: center;
368365
}
@@ -423,7 +420,7 @@
423420

424421
/* ---------- Features ---------- */
425422
.capa-features {
426-
padding: 40px 24px 100px;
423+
padding: 40px 24px 100px !important;
427424
background: var(--apple-bg);
428425
}
429426

@@ -475,7 +472,7 @@
475472

476473
/* ---------- Article ---------- */
477474
.capa-article {
478-
padding: 100px 24px;
475+
padding: 100px 24px !important;
479476
background: var(--apple-dark);
480477
position: relative;
481478
overflow: hidden;
@@ -548,7 +545,7 @@
548545

549546
/* ---------- Code Section ---------- */
550547
.capa-code {
551-
padding: 100px 24px;
548+
padding: 100px 24px !important;
552549
background: #fff;
553550
}
554551

@@ -634,7 +631,7 @@
634631

635632
/* ---------- Community ---------- */
636633
.capa-community {
637-
padding: 100px 24px;
634+
padding: 100px 24px !important;
638635
background: var(--apple-bg);
639636
text-align: center;
640637
}

0 commit comments

Comments
 (0)