From bb3a57f407961b5403af3e922f1b114c21bb19c3 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Tue, 6 Dec 2016 17:42:51 -0500 Subject: [PATCH] fix(tabs): make MD tab highlight the contrast color of tabs color --- src/components/tabs/tabs.md.scss | 2 +- src/components/tabs/test/basic/app-module.ts | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/tabs/tabs.md.scss b/src/components/tabs/tabs.md.scss index 5cf7409e6c..dc3ffe0776 100644 --- a/src/components/tabs/tabs.md.scss +++ b/src/components/tabs/tabs.md.scss @@ -221,7 +221,7 @@ $tabs-md-tab-icon-size: 2.4rem !default; color: $color-contrast; } - .tabs-md-#{$color-name} .tab-highlight { + .tabs-md-#{$color-name}[tabsHighlight=true] .tab-highlight { background: $color-contrast; } diff --git a/src/components/tabs/test/basic/app-module.ts b/src/components/tabs/test/basic/app-module.ts index 18c52d929e..c94d70c788 100644 --- a/src/components/tabs/test/basic/app-module.ts +++ b/src/components/tabs/test/basic/app-module.ts @@ -1,5 +1,5 @@ import { Component, NgModule } from '@angular/core'; -import { IonicApp, IonicModule, App, AlertController, ModalController, ViewController, Tab, Tabs } from '../../../..'; +import { Config, IonicApp, IonicModule, App, AlertController, ModalController, ViewController, Tab, Tabs } from '../../../..'; // // Modal @@ -233,7 +233,7 @@ export class Tab3 { - + @@ -246,6 +246,11 @@ export class TabsPage { root1 = Tab1; root2 = Tab2; root3 = Tab3; + myColor: string; + + constructor(config: Config) { + this.myColor = (config.get('mode') !== 'ios') ? 'primary' : null; + } onChange(ev: Tab) { console.log('Changed tab', ev);