skip to Main Content

wanna ask how to edit the default css in shadow root? I wanna remove default border applied to popover content
The red rectangle is the properties that i wanna change. Notice that is (.popover-desktop) inside

Appreciated for your answer. Thanks!

I have tried few ways also not work. Below are the way I had tried.

:host(.popover-desktop) .popover-content {
  border: none;
}

::ng-deep .popover-wrapper {
  .popover-content {
    border: none;
  }
}

:popover-open {
  .popover-wrapper {
    .popover-content {
      border: none;
    }
  }
}

2

Answers


  1. Possible duplicate of Override styles in a shadow-root element

    Basically: you cannot use global styles to apply to elements in a shadow DOM, but you can use JavaScript.
    See the link for more information.

    Login or Signup to reply.
  2. The ionic docs show clearly how to style popovers with example included:
    https://ionicframework.com/docs/api/popover#styling

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search