Skip to content

Commit 2e2bcad

Browse files
LuniMoonclaude
andcommitted
Fix CompactToggleButtons spacing and border-radius
Use padding instead of margin for button spacing, make separator stretch to full height, and apply rounded corners only to the first and last buttons for a cleaner grouped appearance. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c4cca8e commit 2e2bcad

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

newIDE/app/src/UI/CompactToggleButtons/CompactToggleButtons.module.css

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111

1212
.compactToggleButton {
13-
border-radius: 4px;
13+
border-radius: 0;
1414
color: var(--theme-text-default-color);
1515
background-color: var(--theme-text-field-default-background-color);
1616
transition: box-shadow 0.1s;
@@ -20,7 +20,7 @@
2020
justify-content: center;
2121
flex: 1;
2222
min-width: 0px;
23-
margin: 3px;
23+
padding: 3px;
2424
border: 0;
2525
}
2626

@@ -41,7 +41,7 @@
4141

4242
.separator {
4343
background-color: var(--theme-text-field-disabled-color);
44-
height: 15px;
44+
align-self: stretch;
4545
width: 1px;
4646
margin: 0 1px;
4747
}
@@ -53,6 +53,14 @@ svg.icon {
5353
transition: color 0.1s linear;
5454
}
5555

56+
.compactToggleButton.first {
57+
border-radius: 4px 0 0 4px;
58+
}
59+
60+
.compactToggleButton.last {
61+
border-radius: 0 4px 4px 0;
62+
}
63+
5664
.compactToggleButton.active {
5765
background-color: var(--theme-icon-button-selected-background-color);
5866
}

newIDE/app/src/UI/CompactToggleButtons/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ const CompactToggleButtons = ({
4545
<button
4646
className={classNames({
4747
[classes.compactToggleButton]: true,
48+
[classes.first]: index === 0,
49+
[classes.last]: index === buttons.length - 1,
4850
[classes.active]: button.isActive,
4951
})}
5052
onClick={button.onClick}

0 commit comments

Comments
 (0)