Skip to content

Commit 2e96c8c

Browse files
committed
fix(plugins/plugin-client-common): improve consistency of button hover effects
Fixes #3986
1 parent a78306d commit 2e96c8c

File tree

6 files changed

+29
-16
lines changed

6 files changed

+29
-16
lines changed

plugins/plugin-client-common/src/components/Screenshot.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,9 @@ export default class Screenshot extends React.PureComponent<Props, State> {
277277
data-active={active}
278278
>
279279
{active ? (
280-
<CameraAction width={18} height={18} onMouseDown={evt => evt.preventDefault()} />
280+
<CameraAction onMouseDown={evt => evt.preventDefault()} />
281281
) : (
282-
<Camera width={18} height={18} onMouseDown={evt => evt.preventDefault()} />
282+
<Camera onMouseDown={evt => evt.preventDefault()} />
283283
)}
284284
</a>
285285
)

plugins/plugin-client-common/src/components/StatusStripe/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export default class StatusStripe extends React.PureComponent {
8686
tabIndex={0}
8787
onClick={() => this.doAbout()}
8888
>
89-
<SettingsIcon width={18} height={18} />
89+
<SettingsIcon />
9090
</a>
9191
</div>
9292
</div>

plugins/plugin-client-common/src/components/TopTabStripe/Tab.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
import * as React from 'react'
18-
import { Close16 } from '@carbon/icons-react'
18+
import { Close20 as CloseButton } from '@carbon/icons-react'
1919
import { i18n, eventChannelUnsafe, Event, ExecType, Theme } from '@kui-shell/core'
2020
import { HeaderMenuItem } from 'carbon-components-react'
2121

@@ -157,7 +157,7 @@ export default class Tab extends React.PureComponent<Props, State> {
157157
this.props.onCloseTab(this.props.idx)
158158
}}
159159
>
160-
<Close16 focusable="false" preserveAspectRatio="xMidYMid meet" aria-hidden="true" />
160+
<CloseButton focusable="false" preserveAspectRatio="xMidYMid meet" aria-hidden="true" />
161161
</div>
162162
)}
163163
</HeaderMenuItem>

plugins/plugin-client-common/web/css/static/TopTabStripe.scss

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,16 @@
153153
fill: var(--color-text-02);
154154
}
155155
&:hover svg path {
156-
fill: var(--color-base01);
156+
fill: var(--color-text-01);
157157
}
158158
&:hover {
159-
background: var(--color-base05);
159+
background: var(--color-table-border1);
160160
}
161161
}
162+
163+
&:not(.kui--tab--active) .kui--tab-close:hover {
164+
background: var(--color-table-border3);
165+
}
162166
}
163167

164168
.kui--top-tab-buttons {
@@ -168,12 +172,17 @@
168172

169173
.kui--new-tab__plus {
170174
display: flex;
175+
padding: 3px;
176+
177+
&:hover {
178+
background: var(--color-table-border3);
179+
}
171180

172181
svg {
173182
fill: var(--color-text-02);
174183

175184
&:hover {
176-
fill: var(--color-brand-01);
185+
fill: var(--color-text-01);
177186
}
178187
}
179188
}

plugins/plugin-client-common/web/css/static/repl.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ body/*:not(.sidecar-full-screen)*/ repl.sidecar-visible .repl-selection, body/*.
231231
display: flex;
232232
flex-direction: column;
233233
margin: 0;
234-
padding-top: 1rem;
234+
padding-top: 0.5rem;
235235
flex: 4;
236236
background-color: var(--color-repl-background);
237237
}

plugins/plugin-client-common/web/css/static/status-stripe.css

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.kui--status-stripe {
22
display: flex;
3-
flex-basis: 1.75em;
3+
flex-basis: 1.875em;
44
background-color: var(--color-sidecar-background-02);
55

66
--color-fg: var(--color-text-01);
@@ -85,7 +85,7 @@ body[kui-theme-style="dark"] {
8585
display: flex;
8686
align-items: center;
8787
font-weight: bold;
88-
padding-right: calc(1em * 0.875);
88+
margin-right: calc(1em * 0.875 - 6px);
8989
}
9090

9191
.kui--status-stripe-element > a {
@@ -103,11 +103,15 @@ body[kui-theme-style="dark"] {
103103
color: var(--color-support-04) !important;
104104
text-decoration: none;
105105
}
106-
.kui--status-stripe .kui--status-stripe-element .clickable:hover svg,
107-
.kui--status-stripe .kui--status-stripe-element .clickable:hover svg path,
108-
.kui--status-stripe .kui--status-stripe-element .clickable:hover svg rect,
109-
.kui--status-stripe .kui--status-stripe-element .clickable:hover svg circle {
110-
fill: var(--color-support-04) !important;
106+
107+
.kui--status-stripe .kui--status-stripe-button .kui--status-stripe-element {
108+
padding: 3px;
109+
&:hover {
110+
background-color: var(--color-table-border1);
111+
svg {
112+
fill: var(--color-text-01) !important;
113+
}
114+
}
111115
}
112116

113117
.kui--status-stripe-icon {

0 commit comments

Comments
 (0)