Bugfix: distance between menu items
This commit is contained in:
parent
647b102b7b
commit
e752499163
2 changed files with 11 additions and 12 deletions
|
@ -21,17 +21,7 @@ const { name, link, icon } = Astro.props;
|
|||
|
||||
<style lang="less">
|
||||
li {
|
||||
// 0.6rem = horizontal padding
|
||||
padding: 0 0.6rem;
|
||||
font-size: 1.15rem;
|
||||
|
||||
&:first-child {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
|
@ -41,8 +31,9 @@ const { name, link, icon } = Astro.props;
|
|||
}
|
||||
|
||||
.icon-wrapper {
|
||||
margin-right: 0.25rem;
|
||||
margin-right: 0.2rem;
|
||||
font-size: 1.5rem;
|
||||
width: 1.5rem;
|
||||
color: var(--fg-sec);
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -8,6 +8,7 @@ import ThemeModal from "../components/ThemeModal.astro";
|
|||
<ul>
|
||||
<slot />
|
||||
</ul>
|
||||
<ul class="menu-sep"></ul>
|
||||
<ul>
|
||||
<MenuItem name="Theme" icon="" link="#theme" />
|
||||
</ul>
|
||||
|
@ -16,6 +17,9 @@ import ThemeModal from "../components/ThemeModal.astro";
|
|||
<style lang="less">
|
||||
@import "/src/styles/max_width.less";
|
||||
|
||||
// distance between menu items
|
||||
@items-dist: 0.8rem;
|
||||
|
||||
nav {
|
||||
margin: 0.4rem auto;
|
||||
max-width: @max-width;
|
||||
|
@ -23,7 +27,6 @@ import ThemeModal from "../components/ThemeModal.astro";
|
|||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
ul {
|
||||
|
@ -33,5 +36,10 @@ import ThemeModal from "../components/ThemeModal.astro";
|
|||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
column-gap: @items-dist;
|
||||
}
|
||||
|
||||
ul.menu-sep {
|
||||
min-width: @items-dist;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Add table
Reference in a new issue