Skip to content

Commit df90f09

Browse files
committed
make crosses style/style more similar
1 parent be46fcb commit df90f09

3 files changed

Lines changed: 37 additions & 8 deletions

File tree

src/App.module.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,18 @@
241241

242242
color: lightgray !important; /* unsure why !important is necessary here but not in ErrorMessage.module.css for same <Cross/> */
243243

244-
height: 10px;
245-
width: 10px;
244+
height: 15px;
245+
width: 15px;
246246

247247
right: 7px;
248248
top: 6px;
249249
}
250250

251+
.sidebarCloseButton svg {
252+
width: 100%;
253+
height: 100%;
254+
}
255+
251256
.sidebarCloseButton:hover {
252257
color: black !important;
253258
}

src/pathDetails/elevationWidget/ElevationWidget.module.css

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,19 +84,42 @@
8484
border-radius: 4px;
8585
background: #f8f8f9;
8686
cursor: pointer;
87-
font-size: 9px;
88-
color: #666;
87+
font-size: 13px;
88+
color: #555;
8989
flex-shrink: 0;
9090
padding: 0 0 0 1px;
9191
}
9292

9393
.expandButton:hover {
9494
background: #e8e8e8;
95-
color: #333;
95+
}
96+
97+
.closeButton {
98+
display: flex;
99+
align-items: center;
100+
justify-content: center;
101+
width: 26px;
102+
height: 26px;
103+
border: 1px solid #ccc;
104+
border-radius: 4px;
105+
background: #f8f8f9;
106+
cursor: pointer;
107+
color: #555;
108+
flex-shrink: 0;
109+
}
110+
111+
.closeButton svg {
112+
width: 13px;
113+
height: 13px;
114+
}
115+
116+
.closeButton:hover {
117+
background: #e8e8e8;
96118
}
97119

98120
@media (max-width: 44rem) {
99-
.expandButton {
121+
.expandButton,
122+
.closeButton {
100123
display: none;
101124
}
102125

src/pathDetails/elevationWidget/ElevationWidget.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { INCLINE_CATEGORIES, computeInclineCategoryDistances } from './colors'
66
import { ElevationPoint } from './types'
77
import DetailSelector from './DetailSelector'
88
import Legend from './Legend'
9+
import Cross from '@/sidebar/times-solid.svg'
910

1011
// Slope colors are also computed in ChartRenderer.drawElevationArea. Duplicate calculation here to keep the
1112
// legend independent of the renderer's draw cycle.
@@ -237,8 +238,8 @@ export default function ElevationWidget({
237238
{isExpanded ? '\u25C0' : '\u25B6'}
238239
</button>
239240
{isExpanded && onClose && (
240-
<button className={styles.expandButton} onClick={onClose} title="Close">
241-
{'\u2715'}
241+
<button className={styles.closeButton} onClick={onClose} title="Close">
242+
<Cross />
242243
</button>
243244
)}
244245
</div>

0 commit comments

Comments
 (0)