2022-09-29 12:28:01 +08:00
|
|
|
:root {
|
2023-05-25 23:21:30 +08:00
|
|
|
--d-sidebar-section-link-prefix-margin-right: 0.35rem;
|
|
|
|
--d-sidebar-section-link-prefix-width: 1.35rem;
|
2023-07-11 09:40:37 +08:00
|
|
|
--d-sidebar-section-link-icon-size: 0.8em;
|
2022-09-29 12:28:01 +08:00
|
|
|
}
|
|
|
|
|
2022-07-19 14:37:07 +08:00
|
|
|
.sidebar-section-link-wrapper {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2022-08-24 09:33:15 +08:00
|
|
|
position: relative;
|
2022-07-19 14:37:07 +08:00
|
|
|
|
|
|
|
.sidebar-section-link {
|
|
|
|
display: inline-flex;
|
|
|
|
width: 100%;
|
|
|
|
align-items: center;
|
2023-06-06 21:24:56 +08:00
|
|
|
color: var(--d-sidebar-link-color);
|
2022-07-19 14:37:07 +08:00
|
|
|
transition: background-color 0.25s;
|
|
|
|
|
2022-07-27 11:16:34 +08:00
|
|
|
&:focus,
|
2022-07-19 14:37:07 +08:00
|
|
|
&:hover {
|
2023-06-06 21:24:56 +08:00
|
|
|
background: var(--d-sidebar-highlight-background);
|
2022-08-24 09:33:15 +08:00
|
|
|
outline: none;
|
2023-06-06 21:24:56 +08:00
|
|
|
.prefix-text {
|
|
|
|
background: var(--d-sidebar-highlight-prefix-background);
|
|
|
|
}
|
2022-07-19 14:37:07 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&.active {
|
2023-06-06 21:24:56 +08:00
|
|
|
color: var(--d-sidebar-highlight-color);
|
|
|
|
background: var(--d-sidebar-highlight-background);
|
2022-09-29 12:28:01 +08:00
|
|
|
|
|
|
|
.sidebar-section-link-prefix {
|
2023-05-26 04:01:27 +08:00
|
|
|
&.icon {
|
2023-06-06 21:24:56 +08:00
|
|
|
color: var(--d-sidebar-highlight-color);
|
2022-09-29 12:28:01 +08:00
|
|
|
}
|
|
|
|
}
|
2022-07-19 14:37:07 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.sidebar-section-link-content-badge {
|
|
|
|
@include ellipsis;
|
|
|
|
padding-left: 0.5em;
|
2023-05-24 23:00:20 +08:00
|
|
|
padding-right: 0.1em; // avoids some overflow cropping
|
2022-07-19 14:37:07 +08:00
|
|
|
text-align: right;
|
2023-06-06 21:24:56 +08:00
|
|
|
color: var(--d-sidebar-link-badge-color);
|
2023-05-25 23:21:30 +08:00
|
|
|
font-size: var(--font-down-2);
|
2022-07-19 14:37:07 +08:00
|
|
|
font-weight: normal;
|
|
|
|
margin-left: auto;
|
|
|
|
}
|
|
|
|
|
2022-08-15 10:34:30 +08:00
|
|
|
.sidebar-section-link-suffix {
|
2023-05-24 23:00:20 +08:00
|
|
|
margin-left: 1em;
|
2022-08-18 15:03:28 +08:00
|
|
|
font-size: var(--font-down-4);
|
2023-06-26 16:43:35 +08:00
|
|
|
&.icon {
|
|
|
|
&.urgent svg {
|
|
|
|
color: var(--success);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.unread svg {
|
|
|
|
color: var(--tertiary-med-or-tertiary);
|
|
|
|
}
|
|
|
|
}
|
2022-08-15 10:34:30 +08:00
|
|
|
}
|
|
|
|
|
2022-07-19 14:37:07 +08:00
|
|
|
.sidebar-section-link-content-text {
|
|
|
|
@include ellipsis;
|
|
|
|
|
2022-07-22 15:58:21 +08:00
|
|
|
.emoji {
|
|
|
|
width: 15px;
|
|
|
|
height: 15px;
|
|
|
|
}
|
|
|
|
|
2023-11-13 23:46:15 +08:00
|
|
|
.badge-category__wrapper {
|
2022-07-19 14:37:07 +08:00
|
|
|
font-size: 100%;
|
|
|
|
width: 100%;
|
|
|
|
|
2023-11-13 23:46:15 +08:00
|
|
|
.badge-category__name {
|
2022-07-19 14:37:07 +08:00
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-11 09:40:37 +08:00
|
|
|
.sidebar-section-link-button {
|
|
|
|
color: var(--d-sidebar-link-color);
|
|
|
|
background-color: var(--secondary);
|
|
|
|
width: 100%;
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
color: var(--d-sidebar-link-color);
|
|
|
|
background-color: var(--primary-low);
|
|
|
|
|
|
|
|
.d-icon {
|
|
|
|
color: var(--d-sidebar-link-icon-color);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.d-icon {
|
|
|
|
color: var(--d-sidebar-link-icon-color);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-12 15:52:10 +08:00
|
|
|
.sidebar-section-link[data-link-name="personal-messages-sent"],
|
|
|
|
.sidebar-section-link[data-link-name="personal-messages-new"],
|
|
|
|
.sidebar-section-link[data-link-name="personal-messages-archive"],
|
|
|
|
.sidebar-section-link[data-link-name="personal-messages-unread"],
|
|
|
|
.sidebar-section-link[data-link-name="group-messages-new"],
|
|
|
|
.sidebar-section-link[data-link-name="group-messages-unread"],
|
|
|
|
.sidebar-section-link[data-link-name="group-messages-archive"] {
|
2022-08-18 15:03:28 +08:00
|
|
|
.sidebar-section-link-content-text {
|
2022-09-29 12:28:01 +08:00
|
|
|
margin-left: calc(
|
|
|
|
var(--d-sidebar-section-link-prefix-margin-right) +
|
|
|
|
var(--d-sidebar-section-link-prefix-width)
|
|
|
|
);
|
2022-08-18 15:03:28 +08:00
|
|
|
}
|
2022-07-19 14:37:07 +08:00
|
|
|
}
|
|
|
|
|
2022-09-28 09:58:07 +08:00
|
|
|
.sidebar-section-link-review {
|
|
|
|
.sidebar-section-link-content-badge {
|
|
|
|
color: var(--danger);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-19 14:37:07 +08:00
|
|
|
.sidebar-section-link-prefix {
|
2022-09-29 12:28:01 +08:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
2022-08-18 20:36:30 +08:00
|
|
|
flex-shrink: 0;
|
2022-09-29 12:28:01 +08:00
|
|
|
width: var(--d-sidebar-section-link-prefix-width);
|
|
|
|
height: var(--d-sidebar-section-link-prefix-width);
|
|
|
|
margin-right: var(--d-sidebar-section-link-prefix-margin-right);
|
2022-08-18 20:36:30 +08:00
|
|
|
|
2022-07-19 14:37:07 +08:00
|
|
|
&.image {
|
|
|
|
img {
|
2022-09-29 12:28:01 +08:00
|
|
|
border-radius: 100%;
|
2022-07-19 14:37:07 +08:00
|
|
|
aspect-ratio: auto 20 / 20;
|
2022-09-29 12:28:01 +08:00
|
|
|
width: calc(var(--d-sidebar-section-link-prefix-width) - 2px);
|
|
|
|
height: calc(var(--d-sidebar-section-link-prefix-width) - 2px);
|
2022-07-19 14:37:07 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.text {
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
2022-10-11 07:27:06 +08:00
|
|
|
&.icon,
|
|
|
|
&.span {
|
2022-07-19 14:37:07 +08:00
|
|
|
position: relative;
|
2023-06-06 21:24:56 +08:00
|
|
|
color: var(--d-sidebar-link-icon-color);
|
2022-08-17 09:40:43 +08:00
|
|
|
|
|
|
|
svg {
|
2023-07-11 09:40:37 +08:00
|
|
|
font-size: var(--d-sidebar-section-link-icon-size);
|
2022-08-17 09:40:43 +08:00
|
|
|
}
|
2022-07-19 14:37:07 +08:00
|
|
|
|
2022-09-29 12:28:01 +08:00
|
|
|
.prefix-badge {
|
2022-07-19 14:37:07 +08:00
|
|
|
position: absolute;
|
2022-08-17 09:40:43 +08:00
|
|
|
background-color: transparent;
|
2022-07-19 14:37:07 +08:00
|
|
|
border-radius: 50%;
|
|
|
|
padding: 2px 2px 3px;
|
2023-06-06 21:24:56 +08:00
|
|
|
color: var(--d-sidebar-link-color);
|
2022-07-19 14:37:07 +08:00
|
|
|
height: 0.5rem;
|
|
|
|
width: 0.5rem;
|
2022-08-04 09:49:08 +08:00
|
|
|
top: -0.2em;
|
|
|
|
right: 0;
|
2022-09-29 12:28:01 +08:00
|
|
|
margin-right: -0.2em;
|
2022-07-19 14:37:07 +08:00
|
|
|
}
|
|
|
|
}
|
2022-10-11 07:27:06 +08:00
|
|
|
.prefix-span {
|
2023-05-25 23:21:30 +08:00
|
|
|
width: 0.8em;
|
|
|
|
height: 0.8em;
|
2022-10-11 07:27:06 +08:00
|
|
|
}
|
2022-07-19 14:37:07 +08:00
|
|
|
}
|
|
|
|
|
2023-06-06 21:24:56 +08:00
|
|
|
.prefix-text {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
border-radius: 100%;
|
|
|
|
background: var(--d-sidebar-prefix-background);
|
|
|
|
width: calc(var(--d-sidebar-section-link-prefix-width) - 2px);
|
|
|
|
height: calc(var(--d-sidebar-section-link-prefix-width) - 2px);
|
|
|
|
font-size: var(--font-down-2);
|
|
|
|
}
|
|
|
|
|
2022-07-19 14:37:07 +08:00
|
|
|
.sidebar-section-link-hover {
|
2022-08-18 15:03:28 +08:00
|
|
|
margin-left: auto;
|
|
|
|
|
2022-07-19 14:37:07 +08:00
|
|
|
.sidebar-section-hover-button {
|
|
|
|
display: none;
|
2023-06-06 21:24:56 +08:00
|
|
|
color: var(--d-sidebar-link-icon-color);
|
2022-07-19 14:37:07 +08:00
|
|
|
border: none;
|
|
|
|
background: transparent;
|
2022-08-24 09:33:15 +08:00
|
|
|
padding: 0 0 0 0.5em;
|
|
|
|
height: 100%;
|
2022-07-19 14:37:07 +08:00
|
|
|
transition: background-color 0.25s;
|
|
|
|
|
2022-08-24 09:33:15 +08:00
|
|
|
&:focus,
|
|
|
|
.discourse-no-touch & {
|
|
|
|
&:hover {
|
2023-06-06 21:24:56 +08:00
|
|
|
color: var(--d-sidebar-highlight-color);
|
2022-08-24 09:33:15 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-19 14:37:07 +08:00
|
|
|
svg {
|
|
|
|
font-size: var(--font-down-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
.sidebar-section-hover-button {
|
2023-06-06 21:24:56 +08:00
|
|
|
background: var(--d-sidebar-highlight-background);
|
2022-07-19 14:37:07 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
.sidebar-section-hover-button {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|