Skip to content

Commit 990aad1

Browse files
authored
Update vscode-button to only apply a margin to icons if there is slotted content
1 parent 84f6ad6 commit 990aad1

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ const styles: CSSResultGroup = [
102102
justify-content: center;
103103
position: relative;
104104
width: 100%;
105+
height: 100%;
105106
}
106107
107108
slot {
@@ -110,15 +111,16 @@ const styles: CSSResultGroup = [
110111
height: 100%;
111112
}
112113
113-
.icon {
114+
.icon, .icon-after {
114115
color: inherit;
115116
display: block;
117+
}
118+
119+
:host(:not(:empty)) .icon {
116120
margin-right: 3px;
117121
}
118122
119-
.icon-after {
120-
color: inherit;
121-
display: block;
123+
:host(:not(:empty)) .icon-after, :host([icon]) .icon-after {
122124
margin-left: 3px;
123125
}
124126
`,

0 commit comments

Comments
 (0)