Skip to content

Commit 8cad44f

Browse files
authored
Remove the negative margin from .page-content (#29922)
The negative margin was suboptimal and presents a few unnecessary challenges while styling the page. Remove it and add custom margin values, which slightly changes the height a few things near the top of the page as well: 15px less height of explore and login navbar: <img width="899" alt="Screenshot 2024-03-20 at 00 52 34" src="https://github.com/go-gitea/gitea/assets/115237/72a01ca4-5d17-4a0f-b915-61f95054fcb1"> 15px reduced padding-top height of "user bar" and equal 4px padding added: <img width="484" alt="Screenshot 2024-03-20 at 00 52 50" src="https://github.com/go-gitea/gitea/assets/115237/a8507e6d-372d-4a8b-9048-66fcf8a5facd"> 3px less padding on top of repo: <img width="552" alt="Screenshot 2024-03-20 at 00 53 49" src="https://github.com/go-gitea/gitea/assets/115237/dede6e44-7688-440f-a1b6-13532638ae03">
1 parent b25eec4 commit 8cad44f

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

templates/user/dashboard/navbar.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,4 @@
105105
{{end}}
106106
</div>
107107
</div>
108-
<div class="divider"></div>
108+
<div class="divider tw-mt-0"></div>

web_src/css/base.css

+5-10
Original file line numberDiff line numberDiff line change
@@ -227,16 +227,6 @@ a.label,
227227
border-bottom-color: var(--color-secondary);
228228
}
229229

230-
.page-content {
231-
margin-top: 15px;
232-
}
233-
234-
.page-content .header-wrapper,
235-
.page-content overflow-menu {
236-
margin-top: -15px !important;
237-
padding-top: 15px !important;
238-
}
239-
240230
/* fix Fomantic's line-height cutting off "g" on Windows Chrome with Segoe UI */
241231
.ui.input > input {
242232
line-height: var(--line-height-default);
@@ -678,6 +668,11 @@ img.ui.avatar,
678668
padding-bottom: 80px;
679669
}
680670

671+
.page-content.new:is(.repo,.migrate,.org),
672+
.page-content.profile:is(.user,.organization) {
673+
padding-top: 15px;
674+
}
675+
681676
/* overwrite semantic width of containers inside the main page content div (div with class "page-content") */
682677
.page-content .ui.ui.ui.container:not(.fluid) {
683678
width: 1280px;

web_src/css/dashboard.css

+1-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@
7878
}
7979

8080
.dashboard .dashboard-navbar {
81-
padding-left: 0.5rem;
82-
padding-right: 0.5rem;
81+
padding: 4px 12px;
8382
}
8483

8584
.dashboard .dashboard-navbar .org-visibility .label {

web_src/css/repo/header.css

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
}
7272

7373
.repository .header-wrapper {
74+
padding-top: 12px;
7475
background-color: var(--color-header-wrapper);
7576
}
7677

web_src/css/user.css

+4
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@
112112
border: 1px solid var(--color-secondary);
113113
}
114114

115+
#notification_div {
116+
padding-top: 15px;
117+
}
118+
115119
#notification_table {
116120
background: var(--color-box-body);
117121
border: 1px solid var(--color-secondary);

0 commit comments

Comments
 (0)