Skip to content

Commit edc9408

Browse files
committed
Fix gutter of code block scrollable
1 parent 3aa6fc3 commit edc9408

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

.changeset/silver-lizards-fry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'hexo-theme-cupertino': patch
3+
---
4+
5+
Fix gutter of code block scrollable.

source/css/code-highlighting.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
.gutter {
44
color: var(--color-text-tertiary);
5+
background-color: var(--color-background-secondary);
56
user-select: none;
67
}
78

source/css/post.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ body {
222222
background-color: var(--color-background-secondary);
223223
border-radius: var(--radius-medium);
224224
@include utilities.corner-squircle;
225-
max-width: calc(800px - 16px * 2);
225+
padding: 0;
226+
max-width: 800px;
226227

227228
@media (max-width: 800px) {
228229
border-radius: 0;
@@ -235,7 +236,10 @@ body {
235236
}
236237

237238
.gutter {
238-
padding-right: 16px;
239+
padding-left: 16px;
240+
position: sticky;
241+
left: 0;
242+
text-align: right;
239243
}
240244
}
241245

0 commit comments

Comments
 (0)