1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2025-01-12 14:12:13 +01:00

78 lines
2.3 KiB
SCSS
Raw Normal View History

////
/// Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Tabs with outline
2017-01-26 21:10:52 +01:00
.md-tabs {
width: 100%;
background: $md-color-primary;
overflow-x: scroll;
2017-01-26 21:10:52 +01:00
// [tablet -]: Hide tabs for tablet and below, as they don't make any sense
@include break-to-device(tablet) {
display: none;
}
// List of items
2017-01-26 21:10:52 +01:00
&__list {
margin: 0;
margin-left: 0.4rem;
2017-01-26 21:10:52 +01:00
padding: 0;
transition:
transform 0.4s cubic-bezier(0.1, 0.7, 0.1, 1),
opacity 0.1s;
2017-01-26 21:10:52 +01:00
list-style: none;
white-space: nowrap;
}
// List item
2017-01-26 21:10:52 +01:00
&__item {
display: inline-block;
}
// Link inside item
2017-01-26 21:10:52 +01:00
&__link {
display: block;
padding-right: 1.2rem;
padding-left: 1.2rem;
transition: color 0.25s;
color: $md-color-white--light;
font-size: 1.4rem;
2017-01-26 21:10:52 +01:00
line-height: 4.8rem;
// Active or hovered link
2017-01-26 21:10:52 +01:00
&--active,
&:hover {
color: $md-color-white;
}
}
2017-01-26 21:10:52 +01:00
// Hide tabs upon scrolling
&[data-md-state="hidden"] .md-tabs__list {
transform: translateY(10%);
opacity: 0;
2017-01-26 21:10:52 +01:00
}
}