Skip to content

Badge color not working inside active Tab title slot #437

@arrancardnell

Description

@arrancardnell

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions