Files
Brandy Carney 5f2e737904 feat(sass): add support for contrast in color map for wp mode
BREAKING CHANGE:

Can now pass contrast to the colors map:

```
$colors-wp: (

  primary: (
    base: #327eff,
    contrast: yellow
  ),
  secondary: (
    base: #32db64,
    contrast: hotpink
  ),
  danger: #d91e18,
  light: #f4f4f4,
  dark: #222
) !default;
```

references #5445
2016-03-22 18:07:59 -04:00

107 lines
2.3 KiB
SCSS

@import "../../globals.wp";
@import "./tabs";
// Windows Tabs
// --------------------------------------------------
$tabbar-wp-background: $toolbar-wp-background !default;
$tabbar-wp-item-padding: 12px 10px 5px 10px !default;
$tabbar-wp-item-font-size: 1.2rem !default;
$tabbar-wp-item-font-weight: normal !default;
$tabbar-wp-item-icon-size: 2.4rem !default;
$tabbar-wp-item-height: 4.8rem !default;
$tab-button-wp-active-color: $toolbar-wp-active-color !default;
$tab-button-wp-inactive-color: $toolbar-wp-inactive-color !default;
$tab-button-wp-background-activated: rgba(0, 0, 0, .1) !default;
tabbar {
background: $tabbar-wp-background;
}
.tab-button {
padding: $tabbar-wp-item-padding;
min-height: $tabbar-wp-item-height;
border-bottom: 2px solid transparent;
border-radius: 0;
font-size: $tabbar-wp-item-font-size;
font-weight: $tabbar-wp-item-font-weight;
color: $tab-button-wp-inactive-color;
box-shadow: none;
opacity: .7;
&[aria-selected=true] {
border-bottom: 2px solid $tab-button-wp-active-color;
color: $tab-button-wp-active-color;
opacity: 1;
}
&.activated {
background: $tab-button-wp-background-activated;
}
}
.tab-button-text {
margin-top: 5px;
margin-bottom: 5px;
}
.tab-button-icon {
min-width: $tabbar-wp-item-icon-size;
font-size: $tabbar-wp-item-icon-size;
}
[tabbarIcons=bottom] .tab-button {
padding-top: 8px;
padding-bottom: 8px;
}
[tabbarIcons=right] .tab-button,
[tabbarIcons=left] .tab-button {
padding-bottom: 10px;
ion-icon {
min-width: 24px;
}
}
.tab-button.icon-only,
.tab-button.has-title-only {
padding: 6px 10px;
}
// Windows Tabbar Color Mixin
// --------------------------------------------------
@mixin tabbar-wp($color-name, $color-base) {
ion-tabs[#{$color-name}] tabbar {
background-color: $color-base;
.tab-button {
color: $color-contrast;
}
.tab-button:hover:not(.disable-hover),
.tab-button[aria-selected=true] {
border-color: $color-contrast;
color: $color-contrast;
}
}
}
// Windows Tabbar Color Generation
// --------------------------------------------------
@each $color-name, $color-base, $color-contrast in get-colors($colors-wp) {
@include tabbar-wp($color-name, $color-base);
}