bsw/jbe@1309: /** bsw/jbe@1309: * Copyright 2015 Google Inc. All Rights Reserved. bsw/jbe@1309: * bsw/jbe@1309: * Licensed under the Apache License, Version 2.0 (the "License"); bsw/jbe@1309: * you may not use this file except in compliance with the License. bsw/jbe@1309: * You may obtain a copy of the License at bsw/jbe@1309: * bsw/jbe@1309: * http://www.apache.org/licenses/LICENSE-2.0 bsw/jbe@1309: * bsw/jbe@1309: * Unless required by applicable law or agreed to in writing, software bsw/jbe@1309: * distributed under the License is distributed on an "AS IS" BASIS, bsw/jbe@1309: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. bsw/jbe@1309: * See the License for the specific language governing permissions and bsw/jbe@1309: * limitations under the License. bsw/jbe@1309: */ bsw/jbe@1309: bsw/jbe@1309: @import "../variables"; bsw/jbe@1309: @import "../mixins"; bsw/jbe@1309: bsw/jbe@1309: // Navigation classes. Only used here for now, but we may at some point move bsw/jbe@1309: // this to its own component. bsw/jbe@1309: .mdl-navigation { bsw/jbe@1309: display: flex; bsw/jbe@1309: flex-wrap: nowrap; bsw/jbe@1309: box-sizing: border-box; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-navigation__link { bsw/jbe@1309: color: $layout-text-color; bsw/jbe@1309: text-decoration: none; bsw/jbe@1309: margin: 0; bsw/jbe@1309: @include typo-body-1(true); bsw/jbe@1309: bsw/jbe@1309: // Align icons inside link with text bsw/jbe@1309: & .material-icons { bsw/jbe@1309: vertical-align: middle; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: // Main layout class. bsw/jbe@1309: .mdl-layout { bsw/jbe@1309: width: 100%; bsw/jbe@1309: height: 100%; bsw/jbe@1309: display: flex; bsw/jbe@1309: flex-direction: column; bsw/jbe@1309: overflow-y: auto; bsw/jbe@1309: overflow-x: hidden; bsw/jbe@1309: position: relative; bsw/jbe@1309: -webkit-overflow-scrolling: touch; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: // Utility classes for screen sizes. bsw/jbe@1309: .mdl-layout.is-small-screen .mdl-layout--large-screen-only { bsw/jbe@1309: display: none; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout:not(.is-small-screen) .mdl-layout--small-screen-only { bsw/jbe@1309: display: none; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout__container { bsw/jbe@1309: position: absolute; bsw/jbe@1309: width: 100%; bsw/jbe@1309: height: 100%; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: bsw/jbe@1309: // Optional utility classes for formatting special blocks in this component. bsw/jbe@1309: .mdl-layout__title, bsw/jbe@1309: .mdl-layout-title { bsw/jbe@1309: display: block; bsw/jbe@1309: position: relative; bsw/jbe@1309: bsw/jbe@1309: @include typo-title(); bsw/jbe@1309: font-weight: 400; bsw/jbe@1309: box-sizing: border-box; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout-spacer { bsw/jbe@1309: flex-grow: 1; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: bsw/jbe@1309: // Drawer. bsw/jbe@1309: .mdl-layout__drawer { bsw/jbe@1309: display: flex; bsw/jbe@1309: flex-direction: column; bsw/jbe@1309: flex-wrap: nowrap; bsw/jbe@1309: bsw/jbe@1309: width: $layout-drawer-width; bsw/jbe@1309: height: 100%; bsw/jbe@1309: max-height: 100%; bsw/jbe@1309: bsw/jbe@1309: position: absolute; bsw/jbe@1309: top: 0; bsw/jbe@1309: left: 0; bsw/jbe@1309: bsw/jbe@1309: @include shadow-2dp(); bsw/jbe@1309: bsw/jbe@1309: box-sizing: border-box; bsw/jbe@1309: border-right: 1px solid $layout-drawer-border-color; bsw/jbe@1309: background: $layout-drawer-bg-color; bsw/jbe@1309: bsw/jbe@1309: // Transform offscreen. bsw/jbe@1309: transform: translateX(-$layout-drawer-width - 10px); bsw/jbe@1309: transform-style: preserve-3d; bsw/jbe@1309: will-change: transform; bsw/jbe@1309: bsw/jbe@1309: @include material-animation-default(); bsw/jbe@1309: transition-property: transform; bsw/jbe@1309: bsw/jbe@1309: color: $layout-text-color; bsw/jbe@1309: bsw/jbe@1309: overflow: visible; bsw/jbe@1309: overflow-y: auto; bsw/jbe@1309: bsw/jbe@1309: z-index: 5; bsw/jbe@1309: bsw/jbe@1309: &.is-visible { bsw/jbe@1309: transform: translateX(0); bsw/jbe@1309: & ~ .mdl-layout__content.mdl-layout__content { bsw/jbe@1309: overflow: hidden; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: & > * { bsw/jbe@1309: flex-shrink: 0; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: & > .mdl-layout__title, bsw/jbe@1309: & > .mdl-layout-title { bsw/jbe@1309: line-height: $layout-desktop-header-height; bsw/jbe@1309: padding-left: $layout-header-desktop-indent; bsw/jbe@1309: bsw/jbe@1309: @media screen and (max-width: $layout-screen-size-threshold) { bsw/jbe@1309: line-height: $layout-mobile-header-height; bsw/jbe@1309: padding-left: $layout-header-mobile-indent; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: & .mdl-navigation { bsw/jbe@1309: flex-direction: column; bsw/jbe@1309: align-items: stretch; bsw/jbe@1309: padding-top: 16px; bsw/jbe@1309: bsw/jbe@1309: & .mdl-navigation__link { bsw/jbe@1309: display: block; bsw/jbe@1309: flex-shrink: 0; bsw/jbe@1309: padding: 16px $layout-header-desktop-indent; bsw/jbe@1309: margin: 0; bsw/jbe@1309: color: $layout-drawer-navigation-color; bsw/jbe@1309: bsw/jbe@1309: @media screen and (max-width: $layout-screen-size-threshold) { bsw/jbe@1309: padding: 16px $layout-header-mobile-indent; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: &:hover { bsw/jbe@1309: background-color: $layout-nav-color; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: &--current { bsw/jbe@1309: background-color: $layout-drawer-navigation-link-active-background; bsw/jbe@1309: color: $layout-drawer-navigation-link-active-color; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: @media screen and (min-width: $layout-screen-size-threshold + 1px) { bsw/jbe@1309: .mdl-layout--fixed-drawer > & { bsw/jbe@1309: transform: translateX(0); bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: bsw/jbe@1309: // Drawer button. bsw/jbe@1309: // TODO(sgomes): Replace with an icon button when we have that component. bsw/jbe@1309: .mdl-layout__drawer-button { bsw/jbe@1309: display: block; bsw/jbe@1309: bsw/jbe@1309: position: absolute; bsw/jbe@1309: height: $layout-drawer-button-desktop-size; bsw/jbe@1309: width: $layout-drawer-button-desktop-size; bsw/jbe@1309: border: 0; bsw/jbe@1309: bsw/jbe@1309: flex-shrink: 0; bsw/jbe@1309: bsw/jbe@1309: overflow: hidden; bsw/jbe@1309: text-align: center; bsw/jbe@1309: cursor: pointer; bsw/jbe@1309: font-size: 26px; bsw/jbe@1309: line-height: $layout-mobile-header-height; bsw/jbe@1309: font-family: Helvetica, Arial, sans-serif; bsw/jbe@1309: margin: ($layout-mobile-header-height - $layout-drawer-button-desktop-size) 12px; bsw/jbe@1309: top: 0; bsw/jbe@1309: left: 0; bsw/jbe@1309: color: $layout-header-text-color; bsw/jbe@1309: bsw/jbe@1309: z-index: 4; bsw/jbe@1309: bsw/jbe@1309: .mdl-layout__header & { bsw/jbe@1309: position: absolute; bsw/jbe@1309: color: $layout-header-text-color; bsw/jbe@1309: background-color: inherit; bsw/jbe@1309: bsw/jbe@1309: @media screen and (max-width: $layout-screen-size-threshold) { bsw/jbe@1309: margin: 4px; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: @media screen and (max-width: $layout-screen-size-threshold) { bsw/jbe@1309: margin: 4px; bsw/jbe@1309: color: rgba(0, 0, 0, 0.5); bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: @media screen and (min-width: $layout-screen-size-threshold + 1px) { bsw/jbe@1309: line-height: 54px; bsw/jbe@1309: bsw/jbe@1309: .mdl-layout--no-desktop-drawer-button &, bsw/jbe@1309: .mdl-layout--fixed-drawer > &, bsw/jbe@1309: .mdl-layout--no-drawer-button & { bsw/jbe@1309: display: none; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout__header { bsw/jbe@1309: display: flex; bsw/jbe@1309: flex-direction: column; bsw/jbe@1309: flex-wrap: nowrap; bsw/jbe@1309: justify-content: flex-start; bsw/jbe@1309: box-sizing: border-box; bsw/jbe@1309: flex-shrink: 0; bsw/jbe@1309: bsw/jbe@1309: width: 100%; bsw/jbe@1309: margin: 0; bsw/jbe@1309: padding: 0; bsw/jbe@1309: border: none; bsw/jbe@1309: min-height: $layout-desktop-header-height; bsw/jbe@1309: max-height: 1000px; bsw/jbe@1309: z-index: 3; bsw/jbe@1309: bsw/jbe@1309: background-color: $layout-header-bg-color; bsw/jbe@1309: color: $layout-header-text-color; bsw/jbe@1309: bsw/jbe@1309: @include shadow-2dp(); bsw/jbe@1309: @include material-animation-default(); bsw/jbe@1309: transition-property: max-height, box-shadow; bsw/jbe@1309: bsw/jbe@1309: @media screen and (max-width: $layout-screen-size-threshold) { bsw/jbe@1309: min-height: $layout-mobile-header-height; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout--fixed-drawer.is-upgraded:not(.is-small-screen) > & { bsw/jbe@1309: margin-left: $layout-drawer-width; bsw/jbe@1309: width: calc(100% - #{$layout-drawer-width}); bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: @media screen and (min-width: $layout-screen-size-threshold + 1px) { bsw/jbe@1309: .mdl-layout--fixed-drawer > & { bsw/jbe@1309: .mdl-layout__header-row { bsw/jbe@1309: padding-left: 40px; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: & > .mdl-layout-icon { bsw/jbe@1309: position: absolute; bsw/jbe@1309: left: $layout-header-desktop-indent; bsw/jbe@1309: top: ($layout-desktop-header-height - $layout-header-icon-size) / 2; bsw/jbe@1309: height: $layout-header-icon-size; bsw/jbe@1309: width: $layout-header-icon-size; bsw/jbe@1309: overflow: hidden; bsw/jbe@1309: z-index: 3; bsw/jbe@1309: display: block; bsw/jbe@1309: bsw/jbe@1309: @media screen and (max-width: $layout-screen-size-threshold) { bsw/jbe@1309: left: $layout-header-mobile-indent; bsw/jbe@1309: top: ($layout-mobile-header-height - $layout-header-icon-size) / 2; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout.has-drawer & > .mdl-layout-icon { bsw/jbe@1309: display: none; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: &.is-compact { bsw/jbe@1309: max-height: $layout-desktop-header-height; bsw/jbe@1309: bsw/jbe@1309: @media screen and (max-width: $layout-screen-size-threshold) { bsw/jbe@1309: max-height: $layout-mobile-header-height; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: &.is-compact.has-tabs { bsw/jbe@1309: height: $layout-desktop-header-height + $layout-tab-bar-height; bsw/jbe@1309: bsw/jbe@1309: @media screen and (max-width: $layout-screen-size-threshold) { bsw/jbe@1309: min-height: $layout-mobile-header-height + $layout-tab-bar-height; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: @media screen and (max-width: $layout-screen-size-threshold) { bsw/jbe@1309: & { bsw/jbe@1309: display: none; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout--fixed-header > & { bsw/jbe@1309: display: flex; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout__header--transparent.mdl-layout__header--transparent { bsw/jbe@1309: background-color: transparent; bsw/jbe@1309: box-shadow: none; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout__header--seamed { bsw/jbe@1309: box-shadow: none; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout__header--scroll { bsw/jbe@1309: box-shadow: none; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout__header--waterfall { bsw/jbe@1309: box-shadow: none; bsw/jbe@1309: overflow: hidden; bsw/jbe@1309: bsw/jbe@1309: &.is-casting-shadow { bsw/jbe@1309: @include shadow-2dp(); bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: &.mdl-layout__header--waterfall-hide-top { bsw/jbe@1309: justify-content: flex-end; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout__header-row { bsw/jbe@1309: display: flex; bsw/jbe@1309: flex-direction: row; bsw/jbe@1309: flex-wrap: nowrap; bsw/jbe@1309: flex-shrink: 0; bsw/jbe@1309: box-sizing: border-box; bsw/jbe@1309: align-self: stretch; bsw/jbe@1309: align-items: center; bsw/jbe@1309: height: $layout-header-desktop-row-height; bsw/jbe@1309: margin: 0; bsw/jbe@1309: padding: 0 $layout-header-desktop-indent 0 $layout-header-desktop-baseline; bsw/jbe@1309: bsw/jbe@1309: .mdl-layout--no-drawer-button & { bsw/jbe@1309: padding-left: $layout-header-desktop-indent; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: @media screen and (min-width: $layout-screen-size-threshold + 1px) { bsw/jbe@1309: .mdl-layout--no-desktop-drawer-button & { bsw/jbe@1309: padding-left: $layout-header-desktop-indent; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: @media screen and (max-width: $layout-screen-size-threshold) { bsw/jbe@1309: height: $layout-header-mobile-row-height; bsw/jbe@1309: padding: 0 $layout-header-mobile-indent 0 $layout-header-mobile-baseline; bsw/jbe@1309: bsw/jbe@1309: .mdl-layout--no-drawer-button & { bsw/jbe@1309: padding-left: $layout-header-mobile-indent; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: & > * { bsw/jbe@1309: flex-shrink: 0; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout__header--scroll & { bsw/jbe@1309: width: 100%; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: & .mdl-navigation { bsw/jbe@1309: margin: 0; bsw/jbe@1309: padding: 0; bsw/jbe@1309: height: $layout-header-desktop-row-height; bsw/jbe@1309: flex-direction: row; bsw/jbe@1309: align-items: center; bsw/jbe@1309: bsw/jbe@1309: @media screen and (max-width: $layout-screen-size-threshold) { bsw/jbe@1309: height: $layout-header-mobile-row-height; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: & .mdl-navigation__link { bsw/jbe@1309: display: block; bsw/jbe@1309: color: $layout-header-text-color; bsw/jbe@1309: line-height: $layout-header-desktop-row-height; bsw/jbe@1309: padding: 0 24px; bsw/jbe@1309: bsw/jbe@1309: @media screen and (max-width: $layout-screen-size-threshold) { bsw/jbe@1309: line-height: $layout-header-mobile-row-height; bsw/jbe@1309: padding: 0 $layout-header-mobile-indent; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: // Obfuscator. bsw/jbe@1309: .mdl-layout__obfuscator { bsw/jbe@1309: background-color: transparent; bsw/jbe@1309: position: absolute; bsw/jbe@1309: top: 0; bsw/jbe@1309: left: 0; bsw/jbe@1309: height: 100%; bsw/jbe@1309: width: 100%; bsw/jbe@1309: z-index: 4; bsw/jbe@1309: visibility: hidden; bsw/jbe@1309: transition-property: background-color; bsw/jbe@1309: @include material-animation-default(); bsw/jbe@1309: bsw/jbe@1309: &.is-visible { bsw/jbe@1309: background-color: rgba(0, 0, 0, 0.5); bsw/jbe@1309: visibility: visible; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: @supports (pointer-events: auto) { bsw/jbe@1309: background-color: rgba(0, 0, 0, 0.5); bsw/jbe@1309: opacity: 0; bsw/jbe@1309: transition-property: opacity; bsw/jbe@1309: visibility: visible; bsw/jbe@1309: pointer-events: none; bsw/jbe@1309: &.is-visible { bsw/jbe@1309: pointer-events: auto; bsw/jbe@1309: opacity: 1; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: bsw/jbe@1309: // Content. bsw/jbe@1309: .mdl-layout__content { bsw/jbe@1309: // Fix IE10 bug. bsw/jbe@1309: -ms-flex: 0 1 auto; bsw/jbe@1309: bsw/jbe@1309: position: relative; bsw/jbe@1309: display: inline-block; bsw/jbe@1309: overflow-y: auto; bsw/jbe@1309: overflow-x: hidden; bsw/jbe@1309: flex-grow: 1; bsw/jbe@1309: z-index: 1; bsw/jbe@1309: -webkit-overflow-scrolling: touch; bsw/jbe@1309: bsw/jbe@1309: .mdl-layout--fixed-drawer > & { bsw/jbe@1309: margin-left: $layout-drawer-width; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout__container.has-scrolling-header & { bsw/jbe@1309: overflow: visible; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: @media screen and (max-width: $layout-screen-size-threshold) { bsw/jbe@1309: .mdl-layout--fixed-drawer > & { bsw/jbe@1309: margin-left: 0; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout__container.has-scrolling-header & { bsw/jbe@1309: overflow-y: auto; bsw/jbe@1309: overflow-x: hidden; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: // Tabs. bsw/jbe@1309: .mdl-layout__tab-bar { bsw/jbe@1309: height: $layout-tab-bar-height * 2; bsw/jbe@1309: margin: 0; bsw/jbe@1309: width: calc(100% - bsw/jbe@1309: #{(($layout-header-desktop-baseline - $layout-tab-desktop-padding) * 2)}); bsw/jbe@1309: padding: 0 0 0 bsw/jbe@1309: ($layout-header-desktop-baseline - $layout-tab-desktop-padding); bsw/jbe@1309: display: flex; bsw/jbe@1309: background-color: $layout-header-bg-color; bsw/jbe@1309: overflow-y: hidden; bsw/jbe@1309: overflow-x: scroll; bsw/jbe@1309: bsw/jbe@1309: &::-webkit-scrollbar { bsw/jbe@1309: display: none; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout--no-drawer-button & { bsw/jbe@1309: padding-left: $layout-header-desktop-indent - $layout-tab-desktop-padding; bsw/jbe@1309: width: calc(100% - bsw/jbe@1309: #{(($layout-header-desktop-indent - $layout-tab-desktop-padding) * 2)}); bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: @media screen and (min-width: $layout-screen-size-threshold + 1px) { bsw/jbe@1309: .mdl-layout--no-desktop-drawer-button & { bsw/jbe@1309: padding-left: $layout-header-desktop-indent - $layout-tab-desktop-padding; bsw/jbe@1309: width: calc(100% - bsw/jbe@1309: #{(($layout-header-desktop-indent - $layout-tab-desktop-padding) * 2)}); bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: @media screen and (max-width: $layout-screen-size-threshold) { bsw/jbe@1309: width: calc(100% - bsw/jbe@1309: #{($layout-header-mobile-baseline - $layout-tab-mobile-padding)}); bsw/jbe@1309: padding: 0 0 0 bsw/jbe@1309: ($layout-header-mobile-baseline - $layout-tab-mobile-padding); bsw/jbe@1309: bsw/jbe@1309: .mdl-layout--no-drawer-button & { bsw/jbe@1309: width: calc(100% - bsw/jbe@1309: #{(($layout-header-mobile-indent - $layout-tab-mobile-padding) * 2)}); bsw/jbe@1309: padding-left: $layout-header-mobile-indent - $layout-tab-mobile-padding; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout--fixed-tabs & { bsw/jbe@1309: padding: 0; bsw/jbe@1309: overflow: hidden; bsw/jbe@1309: width: 100%; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout__tab-bar-container { bsw/jbe@1309: position: relative; bsw/jbe@1309: height: $layout-tab-bar-height; bsw/jbe@1309: width: 100%; bsw/jbe@1309: border: none; bsw/jbe@1309: margin: 0; bsw/jbe@1309: z-index: 2; bsw/jbe@1309: flex-grow: 0; bsw/jbe@1309: flex-shrink: 0; bsw/jbe@1309: overflow: hidden; bsw/jbe@1309: bsw/jbe@1309: .mdl-layout__container > & { bsw/jbe@1309: position: absolute; bsw/jbe@1309: top: 0; bsw/jbe@1309: left: 0; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout__tab-bar-button { bsw/jbe@1309: display: inline-block; bsw/jbe@1309: position: absolute; bsw/jbe@1309: top: 0; bsw/jbe@1309: height: $layout-tab-bar-height; bsw/jbe@1309: width: $layout-header-desktop-baseline - $layout-tab-desktop-padding; bsw/jbe@1309: z-index: 4; bsw/jbe@1309: text-align: center; bsw/jbe@1309: background-color: $layout-header-bg-color; bsw/jbe@1309: color: transparent; bsw/jbe@1309: cursor: pointer; bsw/jbe@1309: user-select: none; bsw/jbe@1309: bsw/jbe@1309: .mdl-layout--no-desktop-drawer-button &, bsw/jbe@1309: .mdl-layout--no-drawer-button & { bsw/jbe@1309: width: $layout-header-desktop-indent - $layout-tab-desktop-padding; bsw/jbe@1309: bsw/jbe@1309: & .material-icons { bsw/jbe@1309: position: relative; bsw/jbe@1309: left: ($layout-header-desktop-indent - $layout-tab-desktop-padding - 24px) / 2; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: @media screen and (max-width: $layout-screen-size-threshold) { bsw/jbe@1309: width: $layout-header-mobile-baseline - $layout-tab-mobile-padding; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout--fixed-tabs & { bsw/jbe@1309: display: none; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: & .material-icons { bsw/jbe@1309: line-height: $layout-tab-bar-height; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: &.is-active { bsw/jbe@1309: color: $layout-header-text-color; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout__tab-bar-left-button { bsw/jbe@1309: left: 0; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout__tab-bar-right-button { bsw/jbe@1309: right: 0; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout__tab { bsw/jbe@1309: margin: 0; bsw/jbe@1309: border: none; bsw/jbe@1309: padding: 0 $layout-tab-desktop-padding 0 $layout-tab-desktop-padding; bsw/jbe@1309: bsw/jbe@1309: float: left; bsw/jbe@1309: position: relative; bsw/jbe@1309: display: block; bsw/jbe@1309: flex-grow: 0; bsw/jbe@1309: flex-shrink: 0; bsw/jbe@1309: bsw/jbe@1309: text-decoration: none; bsw/jbe@1309: height: $layout-tab-bar-height; bsw/jbe@1309: line-height: $layout-tab-bar-height; bsw/jbe@1309: bsw/jbe@1309: text-align: center; bsw/jbe@1309: font-weight: 500; bsw/jbe@1309: font-size: $layout-tab-font-size; bsw/jbe@1309: text-transform: uppercase; bsw/jbe@1309: bsw/jbe@1309: color: $layout-header-tab-text-color; bsw/jbe@1309: overflow: hidden; bsw/jbe@1309: bsw/jbe@1309: @media screen and (max-width: $layout-screen-size-threshold) { bsw/jbe@1309: padding: 0 $layout-tab-mobile-padding 0 $layout-tab-mobile-padding; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout--fixed-tabs & { bsw/jbe@1309: float: none; bsw/jbe@1309: flex-grow: 1; bsw/jbe@1309: padding: 0; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout.is-upgraded &.is-active { bsw/jbe@1309: color: $layout-header-text-color; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout.is-upgraded &.is-active::after { bsw/jbe@1309: height: $layout-tab-highlight-thickness; bsw/jbe@1309: width: 100%; bsw/jbe@1309: display: block; bsw/jbe@1309: content: " "; bsw/jbe@1309: bottom: 0; bsw/jbe@1309: left: 0; bsw/jbe@1309: position: absolute; bsw/jbe@1309: background: $layout-header-tab-highlight; bsw/jbe@1309: animation: border-expand 0.2s cubic-bezier(0.4, 0.0, 0.4, 1) 0.01s alternate forwards; bsw/jbe@1309: transition: all 1s cubic-bezier(0.4, 0.0, 1, 1); bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: & .mdl-layout__tab-ripple-container { bsw/jbe@1309: display: block; bsw/jbe@1309: position: absolute; bsw/jbe@1309: height: 100%; bsw/jbe@1309: width: 100%; bsw/jbe@1309: left: 0; bsw/jbe@1309: top: 0; bsw/jbe@1309: z-index: 1; bsw/jbe@1309: overflow: hidden; bsw/jbe@1309: bsw/jbe@1309: & .mdl-ripple { bsw/jbe@1309: background-color: $layout-header-text-color; bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout__tab-panel { bsw/jbe@1309: display: block; bsw/jbe@1309: bsw/jbe@1309: .mdl-layout.is-upgraded & { bsw/jbe@1309: display: none; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-layout.is-upgraded &.is-active { bsw/jbe@1309: display: block; bsw/jbe@1309: } bsw/jbe@1309: }