Skip to content

Commit e6c9f10

Browse files
a-stewartbendera
authored andcommitted
Allow for vscode-button elements to shrink
1 parent 65d6359 commit e6c9f10

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/vscode-button-group/vscode-button-group.styles.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const styles: CSSResultGroup = [
77
css`
88
:host {
99
display: inline-block;
10+
min-width: 0;
1011
}
1112
1213
.root {
@@ -18,7 +19,6 @@ const styles: CSSResultGroup = [
1819
::slotted(vscode-button:not(:first-child)) {
1920
--vsc-border-left-width: 0;
2021
--vsc-border-left-radius: 0;
21-
--vsc-border-left-width: 0;
2222
}
2323
2424
::slotted(vscode-button:not(:last-child)) {
@@ -27,15 +27,14 @@ const styles: CSSResultGroup = [
2727
--vsc-base-after-content: '';
2828
--vsc-border-right-width: 0;
2929
--vsc-border-right-radius: 0;
30-
--vsc-border-right-width: 0;
3130
}
3231
3332
::slotted(vscode-button:focus) {
3433
z-index: 1;
3534
}
3635
3736
::slotted(vscode-button:not(:empty)) {
38-
width: 100%;
37+
width: calc(100% - 1px);
3938
}
4039
`,
4140
];

src/vscode-button/vscode-button.styles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const styles: CSSResultGroup = [
1111
cursor: pointer;
1212
display: inline-block;
1313
width: auto;
14+
min-width: 0;
1415
}
1516
1617
.base {
@@ -147,8 +148,7 @@ const styles: CSSResultGroup = [
147148
:host(:empty) .base,
148149
.base.icon-only {
149150
min-height: 24px;
150-
min-width: 26px;
151-
padding: 1px 4px;
151+
padding: 1px 7px;
152152
}
153153
154154
slot {

0 commit comments

Comments
 (0)