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

Badge color not working inside active Tab title slot #437

Closed
arrancardnell opened this issue Jan 27, 2021 · 2 comments
Closed

Badge color not working inside active Tab title slot #437

arrancardnell opened this issue Jan 27, 2021 · 2 comments
Assignees
Labels

Comments

@arrancardnell
Copy link

Version & browser

uiv 1.2.1
Firefox 84.0.2 (64-bit)

Which component

Tab

Steps to reproduce the problem

Using a Tab with html-title and a backstring HTML string as follows:

    <Tab>
      <template slot="title">
        <i class="fa fa-fw fa-filter"></i> Filters
        <span class="badge">5</span>
      </template>
    </Tab>

Expected behavior

Badge inside an active tab should have a white background with tab color text as detailed in the docs here

image

Actual behavior

Badge still has grey background even with active tab.

uiv-github-bug

This seems to be because the content of the tab link is wrapped in a div (vue-portal-target) element.

uiv-github-bug-2

Moving the contents out of the div fixes the issue.

Issue seems related to a previous one: 276

@wxsms
Copy link
Member

wxsms commented Feb 4, 2021

this div can only be removed while it has one single child node. this might be a limitation of vue 2. Extend bootstrap css to make the child selector not so strict to direct children might be a good work accound for now. Do you have any suggeustions?

@wxsms wxsms closed this as completed in bca53d0 Feb 7, 2021
@wxsms
Copy link
Member

wxsms commented Feb 7, 2021

Nevermind. already found a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants