Skip to content

Commit 4df378b

Browse files
committed
fix markdown header margin-top
1 parent 351dfc9 commit 4df378b

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

public/css/gogs.css

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@ footer .container .links > *:first-child {
10971097
word-wrap: break-word;
10981098
}
10991099
.markdown.file-view {
1100-
padding: 5px 2em 2em !important;
1100+
padding: 2em 2em 2em !important;
11011101
}
11021102
.markdown > *:first-child {
11031103
margin-top: 0 !important;
@@ -1136,6 +1136,14 @@ footer .container .links > *:first-child {
11361136
font-weight: bold;
11371137
line-height: 1.4;
11381138
}
1139+
.markdown h1:first-of-type,
1140+
.markdown h2:first-of-type,
1141+
.markdown h3:first-of-type,
1142+
.markdown h4:first-of-type,
1143+
.markdown h5:first-of-type,
1144+
.markdown h6:first-of-type {
1145+
margin-top: 0 !important;
1146+
}
11391147
.markdown h1 .octicon-link,
11401148
.markdown h2 .octicon-link,
11411149
.markdown h3 .octicon-link,
@@ -2310,7 +2318,6 @@ footer .container .links > *:first-child {
23102318
color: #888;
23112319
}
23122320
.repository .diff-file-box .header {
2313-
border-bottom: 1px solid #d8d8d8;
23142321
background-color: #f7f7f7;
23152322
}
23162323
.repository .diff-file-box .file-body.file-code .lines-num {

public/less/_markdown.less

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
word-wrap: break-word;
77

88
&.file-view {
9-
padding: 5px 2em 2em !important;
9+
padding: 2em 2em 2em !important;
1010
}
1111

1212
>*:first-child {
@@ -51,6 +51,10 @@
5151
margin-bottom: 16px;
5252
font-weight: bold;
5353
line-height: 1.4;
54+
55+
&:first-of-type {
56+
margin-top: 0 !important;
57+
}
5458
}
5559

5660
h1 .octicon-link,

0 commit comments

Comments
 (0)