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

Commit e7c21fd

Browse files
committed
fix(plugins/plugin-client-common): patternfly popover close button has odd spacing
Fixes #6345
1 parent 5c97479 commit e7c21fd

File tree

5 files changed

+44
-9
lines changed

5 files changed

+44
-9
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import React from 'react'
1818
import { Popover } from '@patternfly/react-core'
1919

2020
import Props from '../model'
21-
import '../../../../../web/scss/components/Popover/common.scss'
21+
import '../../../../../web/scss/components/Popover/PatternFly.scss'
2222

2323
export default function PatternFlyPopover(props: Props) {
2424
return (

plugins/plugin-client-common/web/scss/components/Popover/Carbon.scss

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,22 @@
1515
*/
1616

1717
@import 'common';
18+
@import 'mixins';
1819
@import '~carbon-components/scss/components/tooltip/_tooltip.scss';
1920

2021
.kui--status-stripe-element-wrapper.bx--tooltip__label {
2122
align-items: unset;
2223
color: var(--color-text-01);
2324
}
2425

25-
.kui--popover.bx--tooltip {
26-
max-width: 40rem; /* hmm, Carbon doesn't make this easy */
27-
color: var(--color-text-01);
28-
background: var(--color-base02);
26+
@include Popover {
27+
&.bx--tooltip {
28+
max-width: 40rem; /* hmm, Carbon doesn't make this easy */
29+
color: var(--color-text-01);
30+
background: var(--color-base02);
2931

30-
a {
31-
color: var(--color-base0C);
32+
a {
33+
color: var(--color-base0C);
34+
}
3235
}
3336
}

plugins/plugin-client-common/web/scss/components/Popover/PatternFly.scss

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

1717
@import 'common';
18+
@import 'mixins';
19+
20+
@include Popover {
21+
.pf-c-button {
22+
padding: 0;
23+
}
24+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright 2020 IBM Corporation
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
@mixin Popover {
18+
.kui--popover {
19+
@content;
20+
}
21+
}

plugins/plugin-client-common/web/scss/components/Popover/common.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@
1414
* limitations under the License.
1515
*/
1616

17-
body[kui-theme-style] .kui--popover {
18-
min-width: 5rem;
17+
@import 'mixins';
18+
19+
body[kui-theme-style] {
20+
@include Popover {
21+
min-width: 5rem;
22+
}
1923
}
2024

2125
.kui--status-stripe-element-wrapper:hover,

0 commit comments

Comments
 (0)