mirror of
https://github.com/discourse/discourse.git
synced 2026-08-06 11:36:31 +08:00
Fixes a couple issues with the new DComboButton for new topic + drafts, reported here: https://meta.discourse.org/t/drafts-missing-cut-off-from-new-topic-button/396330 Before: <img width="700" alt="image" src="https://github.com/user-attachments/assets/12bdb5a4-cf64-41f7-8a7b-8b0d35c9494a" /> After: <img width="1100" alt="image" src="https://github.com/user-attachments/assets/9bf9f2bc-1955-4721-b53f-e41ca1e9d901" /> Before: <img width="360" alt="image" src="https://github.com/user-attachments/assets/979953d7-283f-4c56-95d4-487233b29318" /> After: <img width="430" alt="image" src="https://github.com/user-attachments/assets/666c949b-85b4-424c-9b15-4f84ae8bb059" />
97 lines
2 KiB
SCSS
Vendored
97 lines
2 KiB
SCSS
Vendored
.has-ai-conversations-sidebar {
|
|
.sidebar-new-topic-button__wrapper {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.sidebar-new-topic-button {
|
|
flex: 1 1 auto;
|
|
|
|
&__wrapper {
|
|
box-sizing: border-box;
|
|
display: flex;
|
|
border-radius: 6.25em;
|
|
margin-top: 4px; // hover & focus effect visibility
|
|
|
|
&:focus-visible,
|
|
&:hover {
|
|
.discourse-no-touch & {
|
|
background-color: var(--button-box-shadow);
|
|
box-shadow: 0 0 0 4px var(--button-box-shadow);
|
|
color: var(--accent-text-color);
|
|
|
|
.d-icon {
|
|
color: var(--accent-text-color);
|
|
}
|
|
}
|
|
}
|
|
|
|
.mobile-view & {
|
|
margin: 0 0 1rem;
|
|
}
|
|
|
|
&:has(.topic-drafts-menu-trigger) {
|
|
.sidebar-new-topic-button {
|
|
&:focus-visible,
|
|
&:hover {
|
|
.discourse-no-touch & {
|
|
box-shadow: none;
|
|
background: light-dark(
|
|
oklch(from var(--accent-color) 40% c h),
|
|
oklch(from var(--accent-color) 50% c h)
|
|
);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.fk-d-button-tooltip {
|
|
flex: 1 1 auto;
|
|
}
|
|
|
|
.topic-drafts-menu-trigger {
|
|
flex: 0 1 auto;
|
|
margin: 0;
|
|
border-radius: 0 var(--d-button-border-radius)
|
|
var(--d-button-border-radius) 0;
|
|
|
|
&:focus-visible,
|
|
&:hover {
|
|
.discourse-no-touch & {
|
|
box-shadow: none;
|
|
background: light-dark(
|
|
oklch(from var(--accent-color) 40% c h),
|
|
oklch(from var(--accent-color) 50% c h)
|
|
);
|
|
}
|
|
}
|
|
}
|
|
|
|
.fk-d-button-tooltip:has(button[disabled]) {
|
|
+ .topic-drafts-menu-trigger {
|
|
display: none;
|
|
}
|
|
|
|
.fk-d-tooltip__trigger {
|
|
background: var(--accent-color);
|
|
border-radius: 0 var(--d-button-border-radius)
|
|
var(--d-button-border-radius) 0;
|
|
padding-right: 0.65em;
|
|
|
|
.d-icon {
|
|
color: var(--secondary);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
li.sidebar-section-link-wrapper[data-list-item-name="New Topic"] {
|
|
display: none;
|
|
}
|
|
|
|
.has-full-page-chat {
|
|
.sidebar-new-topic-button__wrapper {
|
|
display: none;
|
|
}
|
|
}
|