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

Commit 133b347

Browse files
committed
fix(plugins/plugin-client-common): a few more rem/em font-size issues
Fixes #5058
1 parent a58fecc commit 133b347

File tree

6 files changed

+39
-29
lines changed

6 files changed

+39
-29
lines changed

plugins/plugin-client-common/src/components/spi/Card/impl/PatternFly.tsx

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,22 @@ export default class PatternflyCard extends React.PureComponent<Props, State> {
6060
return (
6161
<CardActions>
6262
{...this.props.inlineActions}
63-
{this.props.actions && <Dropdown
64-
onSelect={() => this.setState({ isOpen: !this.state.isOpen })}
65-
toggle={
66-
<KebabToggle
67-
onToggle={isOpen => {
68-
this.setState({ isOpen })
69-
}}
70-
/>
71-
}
72-
isOpen={this.state.isOpen}
73-
isPlain
74-
dropdownItems={this.renderDropDownItems(this.props.actions)}
75-
position={'right'}
76-
/>}
63+
{this.props.actions && (
64+
<Dropdown
65+
onSelect={() => this.setState({ isOpen: !this.state.isOpen })}
66+
toggle={
67+
<KebabToggle
68+
onToggle={isOpen => {
69+
this.setState({ isOpen })
70+
}}
71+
/>
72+
}
73+
isOpen={this.state.isOpen}
74+
isPlain
75+
dropdownItems={this.renderDropDownItems(this.props.actions)}
76+
position={'right'}
77+
/>
78+
)}
7779
</CardActions>
7880
)
7981
}
@@ -85,7 +87,12 @@ export default class PatternflyCard extends React.PureComponent<Props, State> {
8587
/** card actions, icon and custom header node will be situated in Card Head */
8688
private header() {
8789
return (
88-
(this.props.header || this.props.icon || this.props.titleInHeader || this.props.bodyInHeader || this.props.inlineActions || this.props.actions) && (
90+
(this.props.header ||
91+
this.props.icon ||
92+
this.props.titleInHeader ||
93+
this.props.bodyInHeader ||
94+
this.props.inlineActions ||
95+
this.props.actions) && (
8996
<CardHeader className="kui--card-header">
9097
<CardHeaderMain>{this.props.header || (this.props.icon && this.icon())}</CardHeaderMain>
9198
{(this.props.inlineActions || this.props.actions) && this.cardActions()}
@@ -130,9 +137,13 @@ export default class PatternflyCard extends React.PureComponent<Props, State> {
130137
}
131138

132139
public render() {
133-
const basicClassName = 'kui--card small-top-pad small-bottom-pad'
140+
const basicClassName = 'kui--card'
134141
return (
135-
<Card isCompact className={!this.props.className ? basicClassName : `${basicClassName} ${this.props.className}`}>
142+
<Card
143+
isCompact
144+
{...this.props}
145+
className={!this.props.className ? basicClassName : `${basicClassName} ${this.props.className}`}
146+
>
136147
{React.Children.count(this.props.children) > 0 && (
137148
<React.Fragment>
138149
{this.header()}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575

7676
[kui-theme-style] .kui--repl-block-right-element {
7777
color: inherit;
78-
font-size: 0.875rem;
78+
font-size: 0.75rem;
7979
}
8080

8181
.repl-result,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ body[kui-theme-style] a.bx--tabs__nav-link {
9696
[kui-theme-style] .kui--sidecar {
9797
a.bx--tabs__nav-link,
9898
a.bx--tabs__nav-link:active {
99-
min-width: 5em;
99+
min-width: 5rem;
100100
}
101101
}
102102
}
@@ -105,7 +105,7 @@ body[kui-theme-style] a.bx--tabs__nav-link {
105105
[kui-theme-style] .kui--sidecar {
106106
a.bx--tabs__nav-link,
107107
a.bx--tabs__nav-link:active {
108-
min-width: 6em;
108+
min-width: 6rem;
109109
}
110110
}
111111
}

plugins/plugin-client-common/web/scss/components/Table/Toolbar.scss

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
$toolbar-height: 1.875em;
2-
31
.bx--data-table-container.kui--data-table-container-with-toolbars.kui--data-table-container-with-title {
42
padding-top: 0;
53
}
@@ -38,16 +36,11 @@ body[kui-theme-style] .kui--data-table-toolbar {
3836
overflow-x: unset;
3937
}
4038

41-
& > div:not(:empty),
42-
& > nav:not(:empty) {
43-
height: $toolbar-height;
44-
}
45-
4639
nav[aria-label='Breadcrumb'] {
4740
display: flex;
4841
align-items: center;
4942
flex: 1;
50-
height: 2.5rem;
43+
height: 2.1875rem;
5144
}
5245

5346
.kui--toolbar-button-with-icon {

plugins/plugin-client-common/web/scss/components/Table/badges.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ $grid-cell-size: 1.25rem;
4444
flex: initial;
4545
}
4646

47+
.kui--card {
48+
margin: 1rem 0 0;
49+
}
50+
4751
.kui--data-table-as-grid {
4852
.kui--card-header {
4953
border-bottom: 1px solid var(--color-base03);

plugins/plugin-client-common/web/scss/components/Terminal/Block.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@
1616

1717
.repl-block {
1818
padding-left: 1rem;
19-
padding-right: calc(1em * 0.875 - 0.1875em - 6px);
19+
}
20+
.repl-output {
21+
padding-right: calc(1rem - 6px);
2022
}

0 commit comments

Comments
 (0)