Skip to content

Commit 145eb4e

Browse files
committed
styled collapse arrow
1 parent 9c4491b commit 145eb4e

File tree

1 file changed

+54
-71
lines changed

1 file changed

+54
-71
lines changed

src/app/styles/components/_buttons.scss

Lines changed: 54 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,6 @@
185185
cursor: pointer;
186186
}
187187

188-
// .pause-button {
189-
// color: #ff0000;
190-
// background-color: #ff0000;
191-
// }
192-
193188
.import-button:hover,
194189
.howToUse-button:hover,
195190
.export-button:hover,
@@ -315,97 +310,85 @@
315310
}
316311

317312
/* sidebar button open and closing functionality */
318-
aside {
319-
//background: #242529;
320-
color: #fff;
321-
transition: width 1s;
322-
width: 100%; //JR
313+
/* Container for arrow and collapse text */
314+
#arrow {
315+
height: 44px;
316+
display: grid;
317+
grid-template-columns: 45px 1fr;
318+
align-items: center;
319+
border-bottom: 1px solid #e5e7eb;
320+
background-color: white;
323321
}
324322

325-
.no-aside {
323+
/* Base toggle styling */
324+
.toggle {
325+
height: 100%;
326326
width: 45px;
327-
// margin-right: 15px;
328-
}
329-
330-
//JR added for collapse label
331-
.collapse {
332-
color: $collapse-text;
333327
display: flex;
334328
align-items: center;
335-
justify-content: flex-start;
336-
}
337-
338-
.hidden {
339-
display: none;
340-
}
341-
342-
.toggle:hover {
329+
justify-content: center;
330+
position: relative;
343331
cursor: pointer;
344332
}
345333

346-
.toggle {
347-
// display: block;
348-
// position: relative;
349-
// margin-top: 1rem;
350-
height: 100%; //JR
351-
}
352-
353-
/* toggle i handles arrow animation */
354-
.toggle i,
355-
.toggle i::after,
356-
.toggle i::before {
357-
position: absolute;
358-
width: 27px;
359-
height: 4px;
360-
border-radius: 4px;
361-
transition: transform 0.15s;
362-
background-color: $icon-primary;
363-
}
364-
334+
/* Modern chevron using border technique - default facing left */
365335
.toggle i {
366-
top: 16px;
367-
left: 10px;
336+
position: relative;
337+
width: 6px;
338+
height: 6px;
339+
border-right: 2px solid #6b7280;
340+
border-bottom: 2px solid #6b7280;
341+
transform: rotate(135deg); /* Changed to 135deg to face left by default */
342+
transition: transform 0.3s ease;
368343
display: block;
369-
background: $icon-primary;
370344
}
371345

372-
.toggle i::before {
373-
top: -6px;
346+
/* Clean up unused pseudo-elements */
347+
.toggle i::before,
348+
.toggle i::after {
349+
display: none;
374350
}
375351

376-
.toggle i::after {
377-
bottom: -6px;
352+
/* Rotation for collapsed state - rotate to face right */
353+
.no-aside .toggle i {
354+
transform: rotate(-45deg); /* Changed to -45deg to face right when collapsed */
378355
}
379356

380-
.toggle i::after,
381-
.toggle i::before {
382-
content: '';
383-
display: block;
384-
// top: -5px;
357+
/* Hover state matching modern UI */
358+
.toggle:hover i {
359+
border-color: #374151;
385360
}
386361

387-
.toggle i::before {
388-
transform: translate3d(-8px, 0, 0) rotate(-45deg) scale(0.7, 1);
362+
/* Modern collapse text styling */
363+
.collapse {
364+
display: flex;
365+
align-items: center;
366+
color: #6b7280;
367+
font-size: 1rem;
368+
font-weight: 500;
369+
padding-left: 0.5rem;
370+
font-family: 'Outfit', sans-serif;
371+
transition: color 0.2s ease;
389372
}
390373

391-
.toggle i::after {
392-
transform: translate3d(-8px, 0, 0) rotate(45deg) scale(0.7, 1);
374+
/* Hover state for the entire action area */
375+
#arrow:hover .collapse {
376+
color: #374151;
393377
}
394378

395-
.no-aside .toggle i::before,
396-
.no-aside .toggle i::after {
397-
transform: none;
379+
/* Smooth transition for sidebar */
380+
aside {
381+
background-color: white;
382+
transition: width 0.3s ease;
398383
}
399384

400-
#arrow {
401-
// margin-bottom: 40px;
402-
// display: flex;
403-
// justify-content: flex-start;
385+
.no-aside {
386+
width: 45px;
387+
}
404388

405-
//JR
406-
height: 100%;
407-
display: grid;
408-
grid-template-columns: 45px 1fr;
389+
/* Hide collapse text when sidebar is collapsed */
390+
.hidden {
391+
display: none;
409392
}
410393

411394
/* ^ sidebar button open and closing functionality */

0 commit comments

Comments
 (0)