mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-26 08:13:34 +08:00
refactor(sass): moved all mode files to the top level component directory and renamed to include the directory name
references #689
This commit is contained in:
122
ionic/components/tabs/tabs.md.scss
Normal file
122
ionic/components/tabs/tabs.md.scss
Normal file
@ -0,0 +1,122 @@
|
||||
@import "../../globals.md";
|
||||
@import "./tabs";
|
||||
|
||||
// Material Design Tabs
|
||||
// --------------------------------------------------
|
||||
|
||||
$tabbar-md-background-color: $toolbar-md-background-color !default;
|
||||
$tabbar-md-item-padding: 12px 10px 5px 10px !default;
|
||||
$tabbar-md-item-font-size: 1.4rem !default;
|
||||
$tabbar-md-item-font-weight: 500 !default;
|
||||
$tabbar-md-item-icon-size: 2.4rem !default;
|
||||
$tabbar-md-item-height: 4.8rem !default;
|
||||
|
||||
$tab-button-md-active-color: $toolbar-md-active-color !default;
|
||||
$tab-button-md-inactive-color: $toolbar-md-inactive-color !default;
|
||||
|
||||
|
||||
tabbar {
|
||||
background: $tabbar-md-background-color;
|
||||
}
|
||||
|
||||
|
||||
.tab-button {
|
||||
padding: $tabbar-md-item-padding;
|
||||
min-height: $tabbar-md-item-height;
|
||||
font-size: $tabbar-md-item-font-size;
|
||||
font-weight: $tabbar-md-item-font-weight;
|
||||
opacity: 0.7;
|
||||
|
||||
box-shadow: none;
|
||||
border-radius: 0;
|
||||
border-bottom: 2px solid transparent;
|
||||
color: $tab-button-md-inactive-color;
|
||||
|
||||
&[aria-selected=true] {
|
||||
opacity: 1.0;
|
||||
color: $tab-button-md-active-color;
|
||||
}
|
||||
}
|
||||
|
||||
.tab-button-text {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.tab-button-icon {
|
||||
font-size: $tabbar-md-item-icon-size;
|
||||
min-width: $tabbar-md-item-icon-size + 5;
|
||||
}
|
||||
|
||||
[tabbar-icons=bottom] .tab-button {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
[tabbar-icons=right] .tab-button,
|
||||
[tabbar-icons=left] .tab-button {
|
||||
padding-bottom: 10px;
|
||||
|
||||
icon {
|
||||
min-width: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.tab-button.icon-only,
|
||||
.tab-button.has-title-only {
|
||||
padding: 6px 10px 6px 10px;
|
||||
}
|
||||
|
||||
tab-highlight {
|
||||
position: absolute;
|
||||
display: block;
|
||||
height: 2px;
|
||||
width: 1px;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: $tab-button-md-active-color;
|
||||
transform-origin: 0 0;
|
||||
transform: translateZ(0);
|
||||
|
||||
&.animate {
|
||||
transition-duration: 300ms;
|
||||
}
|
||||
}
|
||||
|
||||
[tabbar-placement=bottom] tab-highlight {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
|
||||
// Material Design Tabbar Color Mixin
|
||||
// --------------------------------------------------
|
||||
|
||||
@mixin tabbar-md($color-name, $color-value) {
|
||||
|
||||
tabbar[#{$color-name}] {
|
||||
background-color: $color-value;
|
||||
|
||||
.tab-button {
|
||||
color: inverse($color-value);
|
||||
}
|
||||
|
||||
.tab-button:hover:not(.disable-hover),
|
||||
.tab-button[aria-selected=true] {
|
||||
color: inverse($color-value);
|
||||
}
|
||||
|
||||
tab-highlight {
|
||||
background: inverse($color-value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Material Design Tabbar Color Generation
|
||||
// --------------------------------------------------
|
||||
|
||||
@each $color-name, $color-value in $colors-md {
|
||||
@include tabbar-md($color-name, $color-value);
|
||||
}
|
Reference in New Issue
Block a user