Skip to content

Commit 595d1e6

Browse files
committed
improve title style
1 parent 50b5925 commit 595d1e6

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

src/components/Navigation/Headerbar.astro

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,32 +34,43 @@ const { pageTitle } = Astro.props;
3434
justify-content: right;
3535
}
3636

37-
.headerbar-title {
37+
.titlebox {
3838
display: none;
3939
margin: 0;
4040
font-size: 15px;
4141
font-weight: 500;
4242
text-align: center;
4343
background-color: oklch(from var(--accent-color) 0.98 0.03 h / 90%);
4444
padding: 4px 16px;
45-
border-radius: 18px;
45+
border-radius: 100px;
4646
backdrop-filter: blur(2px);
47-
line-height: 119%;
47+
48+
justify-content: center;
49+
align-items: center;
50+
height: 44px;
51+
box-sizing: border-box;
4852

4953
box-shadow:
5054
0 0.3rem 0.3rem rgba(0, 0, 0, 0.1),
5155
0 0 1rem rgba(0, 0, 0, 0.05),
5256
inset 0 1px 1px rgba(255, 255, 255, 0.5),
5357
inset 0 0 0.27rem rgba(255, 255, 255, 0.5);
5458
}
59+
.headerbar-title {
60+
display: inline-block;
61+
margin: 0;
62+
line-height: 118%;
63+
}
5564
}
5665
</style>
5766

5867
<div id="header-bar">
5968
<div class="leading"></div>
6069
<div class="centre">
6170
<TabBarLarge />
62-
<p class="headerbar-title">{pageTitle}</p>
71+
<div class="titlebox">
72+
<p class="headerbar-title">{pageTitle}</p>
73+
</div>
6374
</div>
6475
<div class="trailing">
6576
<AccentButton />

src/styles/global.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg)):not(
187187
display: none;
188188
}
189189

190-
.headerbar-title,
190+
.titlebox,
191191
#bottom-bar {
192192
display: flex !important;
193193
}

0 commit comments

Comments
 (0)