Skip to content

Commit 19e89df

Browse files
fix: resolve dark theme for mobile-sidebar (#8133)
1 parent 046a2b1 commit 19e89df

2 files changed

Lines changed: 5 additions & 24 deletions

File tree

src/components/SidebarMobile/SidebarMobile.jsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default class SidebarMobile extends Component {
4545
onTouchEnd={this._handleTouchEnd}
4646
/>
4747

48-
<div className="relative w-[285px] h-screen overflow-x-hidden py-1 bg-white shadow-[0_0_15px_rgba(0,0,0,0.2)]">
48+
<div className="relative w-[285px] h-screen overflow-x-hidden py-1 bg-white dark:bg-[#121212] shadow-[0_0_15px_rgba(0,0,0,0.2)]">
4949
<button
5050
className="sidebar-mobile__close absolute cursor-pointer border-none right-[22px] top-[10px] text-[1.3em] bg-[#175d96] text-white w-[30px] h-[30px] flex items-center justify-center rounded-full transition-colors duration-150 [-webkit-tap-highlight-color:transparent] hover:bg-[#135d96]"
5151
onClick={toggle.bind(null, false)}
@@ -93,7 +93,8 @@ export default class SidebarMobile extends Component {
9393
className={clsx(
9494
"uppercase pt-[0.75em] px-4 pb-[0.25em] font-semibold block text-[1.1rem]",
9595
active ? "text-[#465E69]" : "text-[#2B3A42]",
96-
index > 0 && "border-t border-gray-200",
96+
index > 0 && "border-t border-gray-200 dark:border-[#343434]",
97+
"dark:text-[#cadbe6]",
9798
)}
9899
key={section.url}
99100
to={section.url}
@@ -131,8 +132,8 @@ export default class SidebarMobile extends Component {
131132
className={clsx(
132133
"block py-[0.5em] px-[17px] capitalize [-webkit-tap-highlight-color:transparent] ml-[20px]",
133134
active
134-
? "text-gray-900 font-semibold bg-[#f1f4f4]"
135-
: "text-gray-600 hover:text-gray-600 active:text-gray-900 active:font-semibold active:bg-[#f1f4f4]",
135+
? "text-gray-900 font-semibold bg-[#f1f4f4] dark:text-white dark:bg-[#222424]"
136+
: "text-gray-600 dark:text-[#a3a3a3] hover:text-gray-600 active:text-gray-900 active:font-semibold active:bg-[#f1f4f4] dark:active:bg-[#222424] dark:active:text-white",
136137
)}
137138
to={url}
138139
onClick={this.props.toggle.bind(null, false)}

src/styles/dark.scss

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -127,26 +127,6 @@
127127
}
128128
}
129129

130-
// Mobile
131-
.sidebar-mobile__content {
132-
background-color: #121212;
133-
}
134-
.sidebar-mobile__section-header {
135-
color: #cadbe6;
136-
}
137-
.sidebar-mobile__page {
138-
color: #a3a3a3;
139-
}
140-
.sidebar-mobile__page--active,
141-
.sidebar-mobile__page:active {
142-
background-color: #222424;
143-
}
144-
.sidebar-mobile__content
145-
div:not(:first-of-type)
146-
.sidebar-mobile__section-header {
147-
border-color: #343434;
148-
}
149-
150130
.footer-openjsf-logo {
151131
filter: invert(1);
152132
}

0 commit comments

Comments
 (0)