Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deep selector to inner class of BPopover does not work #1379

Closed
fifzteen opened this issue Aug 21, 2023 · 1 comment
Closed

deep selector to inner class of BPopover does not work #1379

fifzteen opened this issue Aug 21, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@fifzteen
Copy link

Describe the bug.
deep selector to inner class of BPopover does not work

To Reproduce.

see stackblitz

<script setup>
import { ref } from 'vue';

const value = ref('');
</script>

<template>
  <b-form-input id="input-outer" v-model="value" />
  <b-popover
    target="input-outer"
    v-bind:triggers="['click']"
    custom-class="custom-tip"
  >
    <b-form-input v-model="value" />
  </b-popover>
</template>

<style lang="scss" scoped>
.custom-tip {
  // doesn't work!
  :deep(.popover-body) {
    background-color: #aaaaaa;
    border-color: #aaaaaa;
    border-radius: inherit;
  }

  :deep(.popover-arrow) {
    &::before,
    &::after {
      border-top-color: #aaaaaa;
    }
  }
}
</style>

Screenshots.

BTooltip_issues_on_Vue3_-next_resolved_-_actual

data-v-{hash:8} attribute is not on BPopover.

If add data-v-{hash:8} attribute to popover element, it works as expected.

BTooltip_issues_on_Vue3_-next_resolved_-_expected

Environment (please complete the following information):

  • OS: macOS 12.6.5
  • Package Version: 0.10.8

Additional context.

I'm trying the issue I posted on BootstrapVue repository below is resolved on BootstrapVueNext.

bootstrap-vue/bootstrap-vue#7151

1 and 3 are works fine!
If 2 (this issue) also resolved, I will use BootstrapVueNext on my product.

@fifzteen fifzteen added the bug Something isn't working label Aug 21, 2023
@xvaara
Copy link
Contributor

xvaara commented Aug 25, 2023

Deep selectors don't work on multiroot node components like popover. It's as intended.

You need to use a wrapper for the popover to have the class correctly: https://stackblitz.com/edit/vitejs-vite-3tw7zd?file=src%2FApp.vue

@xvaara xvaara closed this as completed Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants