256 lines
4.6 KiB
CSS
Raw Normal View History

2024-10-22 15:37:31 +02:00
.menu {
display: flex;
flex-direction: column;
background-color: #1c1c1c;
border-radius: var(--codex-border-radius);
2024-10-31 19:18:21 +01:00
transition: left 0.25s;
2024-10-23 10:41:16 +02:00
position: sticky;
2024-10-22 15:37:31 +02:00
z-index: 10;
view-transition-name: main-menu;
height: 100%;
top: 0;
2024-10-31 19:18:21 +01:00
transition:
width 0.5s,
font-size 0.5s,
left 0.05s;
2024-10-23 10:41:16 +02:00
min-width: 0;
2024-10-23 12:05:52 +02:00
width: 272px;
2024-11-04 15:44:41 +01:00
min-width: 80px;
@media (max-width: 1199px) {
& {
width: 80px;
.items {
a {
width: 26px;
gap: 0;
display: flex;
justify-content: center;
span + span {
font-size: 0;
display: none;
}
}
}
2024-10-31 19:18:21 +01:00
}
2024-10-23 12:05:52 +02:00
}
2024-10-22 15:37:31 +02:00
2024-11-06 21:11:50 +01:00
@media (min-width: 1200px) {
&:not([aria-expanded="false"]) a[data-title]:hover::after {
content: attr(data-title);
background-color: #2f2f2f;
color: #fff;
padding: 8px;
border-radius: 4px;
font-size: 12px;
line-height: 14px;
display: block;
white-space: nowrap;
position: absolute;
right: 1rem;
overflow: visible;
}
}
2024-10-22 15:37:31 +02:00
2024-11-04 15:44:41 +01:00
&:not([aria-expanded]) {
width: 80px;
.items {
a {
width: 26px;
gap: 0;
display: flex;
justify-content: center;
span + span {
font-size: 0;
2024-11-04 15:44:41 +01:00
display: none;
}
}
}
}
2024-10-22 15:37:31 +02:00
> div {
display: flex;
flex-direction: column;
padding: 12px;
position: sticky;
top: 0;
height: calc(100vh - 24px);
overflow: auto;
2024-10-22 15:37:31 +02:00
}
header {
padding: 13px;
display: flex;
align-items: center;
gap: 1.5rem;
background-color: #060606;
border-radius: 8px;
> svg:first-child {
min-width: 30px;
}
2024-11-04 15:44:41 +01:00
@media (min-width: 1200px) {
> svg:first-child {
cursor: pointer;
}
}
div {
flex: 1;
text-align: right;
transition: opacity 0.35s;
display: inline-block;
overflow: hidden;
min-width: 0;
svg {
cursor: pointer;
}
&:hover {
animation-name: example;
animation-duration: 2.5s;
animation-iteration-count: infinite;
}
}
}
.items {
padding-top: 1.5rem;
display: flex;
flex-direction: column;
position: relative;
height: 100%;
margin-bottom: 2.5rem;
gap: 0.5rem;
border-top: 1px solid #96969633;
&::before {
height: 20px;
width: 8px;
background-color: var(--codex-color-primary);
position: absolute;
content: " ";
transition:
top 1s,
bottom 1s;
border-radius: 4px;
left: -16px;
}
&:has(.active:nth-child(1))::before {
top: 30px;
}
&:has(.active:nth-child(2))::before {
top: 72px;
}
&:has(.active:nth-child(3))::before {
top: 115px;
}
&:has(.active:nth-child(4))::before {
top: 158px;
}
&:has(.active:nth-child(5))::before {
top: 201px;
}
&:has(.active:nth-child(6))::before {
top: 244px;
}
&:has(.active:nth-child(8))::before {
top: 339px;
}
&:has(.active:nth-child(9))::before {
top: 382px;
}
&:has(.active:nth-child(11))::before {
top: 475px;
}
&:has(.active:nth-child(12))::before {
top: 513px;
}
&:has(.active:nth-child(14))::before {
top: calc(100% - 113px);
}
&:has(.active:nth-child(15))::before {
top: calc(100% - 70px);
}
&:has(.active:nth-child(16))::before {
top: calc(100% - 27px);
}
&:not(:first-child) {
margin-top: 0.5rem;
}
hr {
margin-top: 1.5rem;
margin-bottom: 1.5rem;
border: 0.1px solid #96969633;
width: 100%;
}
section {
flex: 1;
}
a {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 8px 10px;
margin-bottom: 0;
text-decoration: none;
font-size: 14px;
font-weight: 500;
line-height: 20px;
letter-spacing: -0.006em;
color: #969696;
border-radius: 8px;
transition: background-color 0.35s;
position: relative;
margin-left: 6px;
&:hover:not([aria-disabled="true"]),
&.active {
background-color: var(--codex-highlight-color);
color: #c7c7c7;
}
span:first-child {
display: flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
transition: color 1s;
}
span + span {
display: inline-block;
overflow: hidden;
min-width: 0;
}
&.active span:first-child {
color: var(--codex-color-primary);
}
}
}
}