Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit cb23c63

Browse files
committed
fix: improve presentation with narrow windows
e.g. TopNavSidecar tabs change to unthemed colors Fixes #3954
1 parent bc2102a commit cb23c63

File tree

5 files changed

+71
-27
lines changed

5 files changed

+71
-27
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export default class TopTabStripe extends React.PureComponent<Props> {
165165
*/
166166
public render() {
167167
return (
168-
<Header aria-label="Header">
168+
<Header aria-label="Header" className="kui--top-tab-stripe">
169169
{/* this.headerMenu(args) */}
170170
{this.headerName()}
171171
{this.tabs()}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,3 +195,9 @@
195195
}
196196
}
197197
}
198+
199+
@media (max-width: 42rem) {
200+
.kui--top-tab-stripe {
201+
display: none;
202+
}
203+
}

plugins/plugin-client-common/web/css/static/carbon-overrides-common.css

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,37 +23,11 @@ body td {
2323
transition-timing-function: var(--transition-timing-function);
2424
}
2525

26-
.kui--sidecar .bx--tabs,
27-
.kui--sidecar .bx--tabs .bx--tabs__nav,
28-
.kui--sidecar .bx--tabs .bx--tabs__nav li {
29-
width: unset;
30-
min-height: unset;
31-
position: unset;
32-
}
33-
.kui--sidecar a.bx--tabs__nav-link,
34-
.kui--sidecar a.bx--tabs__nav-link:active {
35-
outline: none;
36-
width: unset;
37-
min-width: 8em;
38-
}
3926
li.bx--tabs__nav-item.sidecar-bottom-stripe-button,
4027
li.bx--tabs__nav-item.sidecar-bottom-stripe-button a {
4128
flex: 1;
4229
}
4330

44-
body[kui-theme-style]
45-
.kui--sidecar
46-
.bx--tabs__nav-item--selected:not(.bx--tabs__nav-item--disabled)
47-
.bx--tabs__nav-link {
48-
color: var(--color-text-01);
49-
border-color: var(--color-brand-03);
50-
opacity: 1;
51-
}
52-
body.subwindow[kui-theme-style] .kui--sidecar .bx--tabs__nav-item .bx--tabs__nav-link {
53-
font-size: 1.125vw;
54-
line-height: unset;
55-
height: unset;
56-
}
5731
a.bx--tabs__nav-link:focus,
5832
a.bx--tabs__nav-link:active {
5933
width: 100%;

plugins/plugin-client-common/web/css/static/split-pane.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,14 @@
8585
}
8686
}
8787
}
88+
89+
@media (max-width: 42rem) {
90+
.SplitPane.vertical:not(.kui--secondary-closed) {
91+
.Pane1 {
92+
flex: 0 !important;
93+
}
94+
.Pane2 {
95+
width: 100% !important;
96+
}
97+
}
98+
}

plugins/plugin-sidecar/web/css/static/sidecar-main.css

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,59 @@ body:not(.no-tooltips-anywhere)
901901
outline-color: var(--color-brand-03);
902902
}
903903

904+
[kui-theme-style] .kui--sidecar {
905+
.bx--tabs,
906+
.bx--tabs .bx--tabs__nav,
907+
.bx--tabs .bx--tabs__nav li,
908+
.bx--tabs .bx--tabs__nav li a {
909+
width: unset;
910+
min-height: unset;
911+
position: unset;
912+
font-size: unset;
913+
}
914+
a.bx--tabs__nav-link,
915+
a.bx--tabs__nav-link:active {
916+
outline: none;
917+
width: unset;
918+
min-width: 8em;
919+
}
920+
921+
.bx--tabs {
922+
font-size: 0.875em;
923+
line-height: 1.125em;
924+
.bx--tabs__nav {
925+
background: none;
926+
box-shadow: none;
927+
}
928+
}
929+
.bx--tabs-trigger {
930+
display: none;
931+
}
932+
.bx--tabs__nav--hidden {
933+
max-height: unset;
934+
}
935+
.bx--tabs__nav-item {
936+
height: 2.5em;
937+
}
938+
.bx--tabs__nav-item--selected:not(.bx--tabs__nav-item--disabled) {
939+
display: flex;
940+
background-color: transparent;
941+
.bx--tabs__nav-link {
942+
border-bottom-width: 3px;
943+
margin: 0;
944+
height: 2.5em;
945+
padding: 0.5em 1em;
946+
line-height: 1.125em;
947+
}
948+
}
949+
950+
.bx--tabs__nav-item--selected .bx--tabs__nav-link {
951+
color: var(--color-text-01);
952+
border-color: var(--color-brand-03);
953+
opacity: 1;
954+
}
955+
}
956+
904957
body[kui-theme-style] a.bx--tabs__nav-link {
905958
color: var(--color-text-02);
906959
border-color: var(--color-text-02);

0 commit comments

Comments
 (0)