mirror of
https://github.com/twentyhq/twenty.git
synced 2026-06-13 02:19:02 -04:00
# [Docs]: Fix blank Try Twenty button text in dark mode ## 🐛 Problem The "Try Twenty" CTA button in the docs navbar appears blank/invisible when users enable dark mode, making it impossible to click through to the sign-up page. **Issue:** #19965 ## Root Cause CSS specificity conflict in `packages/twenty-docs/custom.css`: - The dark mode CSS rule targets only the `<a>` element - Mintlify renders button text in a nested `<span>` with class `text-white` (white color) - The `text-white` Tailwind utility directly applies `color: rgb(255 255 255)` to the span - This overrides the inherited dark color from the parent `<a>` element - **Result:** White text on white background = invisible button ## Solution Update the CSS selector in `packages/twenty-docs/custom.css` to target both the `<a>` element AND the nested `<span>`: **Before:** ```css :is(.dark, [data-theme="dark"]) #topbar-cta-button a { background-color: #ffffff !important; color: #141414 !important; }
49 lines
1.5 KiB
CSS
49 lines
1.5 KiB
CSS
/* CTA button — solid dark pill in light mode, inverted in dark mode */
|
|
#topbar-cta-button a {
|
|
background-color: #141414 !important;
|
|
color: #ffffff !important;
|
|
padding: 0.5rem 1.25rem !important;
|
|
border-radius: 8px;
|
|
font-weight: 600;
|
|
transition: opacity 0.15s ease;
|
|
}
|
|
|
|
#topbar-cta-button a:hover {
|
|
opacity: 0.85 !important;
|
|
}
|
|
|
|
:is(.dark, [data-theme="dark"]) #topbar-cta-button a,
|
|
:is(.dark, [data-theme="dark"]) #topbar-cta-button a span {
|
|
background-color: #ffffff !important;
|
|
color: #141414 !important;
|
|
}
|
|
|
|
/* Center the tab links */
|
|
.nav-tabs {
|
|
justify-content: center;
|
|
flex: 1;
|
|
}
|
|
|
|
/*
|
|
* HACK: Hide the "Overview" sidebar group header in the Developers tab.
|
|
*
|
|
* Mintlify requires every page to be inside a named group, and the tab's
|
|
* landing page is always the first page of the first group. We want the
|
|
* Developer Overview page to be the tab landing without showing a lonely
|
|
* "Overview" group header above a single item.
|
|
*
|
|
* We use :has() to scope the rule to only the sidebar group that contains
|
|
* the developers/introduction link, so other tabs are unaffected.
|
|
*/
|
|
div:has(> .sidebar-group a[href="/developers/introduction"]),
|
|
div:has(> .sidebar-group a[href="/user-guide/introduction"]) {
|
|
display: none;
|
|
}
|
|
|
|
/* Remove the top margin on the group that follows the hidden overview group,
|
|
so it sits flush at the top of the sidebar without a gap. */
|
|
div:has(> .sidebar-group a[href="/developers/introduction"]) + div,
|
|
div:has(> .sidebar-group a[href="/user-guide/introduction"]) + div {
|
|
margin-top: 0 !important;
|
|
}
|