Skip to content

Commit

Permalink
fix(Popover): nested popover - css fix (#13750)
Browse files Browse the repository at this point in the history
* fix(Popover): added the css only to the direct children

* fix(Popover): fix caret when isTabTip

* Update packages/react/src/components/Popover/Popover.stories.js

* Update packages/react/src/components/Popover/Popover.stories.js

---------

Co-authored-by: Andrea N. Cardona <cardona.n.andrea@gmail.com>
Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored May 22, 2023
1 parent fb400fd commit 6f1db2d
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions packages/styles/scss/components/popover/_popover.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ $popover-caret-height: custom-property.get-var(
pointer-events: auto;
}

.#{$prefix}--popover--open .#{$prefix}--popover-content {
.#{$prefix}--popover--open
> .#{$prefix}--popover
> .#{$prefix}--popover-content {
display: block;
}

Expand All @@ -144,7 +146,9 @@ $popover-caret-height: custom-property.get-var(
content: '';
}

.#{$prefix}--popover--open .#{$prefix}--popover-content::before {
.#{$prefix}--popover--open
> .#{$prefix}--popover
> .#{$prefix}--popover-content::before {
display: block;
}

Expand All @@ -160,11 +164,18 @@ $popover-caret-height: custom-property.get-var(
will-change: transform;
}

.#{$prefix}--popover--open.#{$prefix}--popover--caret
.#{$prefix}--popover-caret {
.#{$prefix}--popover--open
> .#{$prefix}--popover
> .#{$prefix}--popover-caret {
display: block;
}

.#{$prefix}--popover--tab-tip
.#{$prefix}--popover
.#{$prefix}--popover-caret {
display: none;
}

//-----------------------------------------------------------------------------
// Bottom
//-----------------------------------------------------------------------------
Expand Down

0 comments on commit 6f1db2d

Please sign in to comment.