Skip to content

[beta.19]: hover over tab button shows wrong color for icon and label #16761

Closed

Description

@kensodemann

Bug Report

Ionic version:

[x] 4.x

Current behavior:
Hovering over the tab button shows button in "Primary" color rather than the color of the selected tab. You need to change the color attribute of the tab bar to something like "Dark" or "Primary" to really see the effect since with the default starter theme "Primary" and selected tab are the same color.

Expected behavior:
Hovering over a tab would show it in the same color as a selected tab.

Steps to reproduce:
See my repo. Has two branches:

Master: beta.17 - shows correct behavior
useBeta19: beta.19 - shows incorrect behavior

Be sure to npm i each time you switch branches. I forgot to do this once and was kinda confused for a bit... :)

Related code:

https://github.com/kensodemann/test-tabs-color

  <ion-tab-bar slot="bottom" color="dark">
  <!-- <ion-tab-bar slot="bottom" color="primary"> -->

Other information:
Also tested with beta.18 and it is broken there as well, so probably something with the beta.18 tab refactor (would make sense anyhow...)

Activity

  1. paulstelzer commented on Dec 16, 2018

    @paulstelzer
    Contributor

    Thanks for the issue! Yes, I have the same issue. Workaround for now is to use the css var --color-selected. Example:

    ion-tab-button {
      --color-selected: var(--ion-color-dark-contrast);
    }
    

    PR is added to fix it

  2. ionitron-bot commented on Jan 16, 2019

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  3. locked and limited conversation to collaborators on Jan 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: core

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions