2016-12-17 14:53:24 +03:00
|
|
|
////
|
2017-01-06 21:11:18 +03:00
|
|
|
/// Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
|
2016-12-17 14:53:24 +03:00
|
|
|
///
|
|
|
|
/// 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
|
|
|
|
////
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// Dependencies
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2017-04-04 18:38:26 +03:00
|
|
|
@import "modularscale";
|
2016-12-17 14:53:24 +03:00
|
|
|
@import "material-color";
|
|
|
|
@import "material-shadows";
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// Local imports
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
@import "helpers/break";
|
|
|
|
@import "helpers/px2em";
|
|
|
|
|
|
|
|
@import "config";
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// Rules
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2017-01-07 22:23:04 +03:00
|
|
|
// Color tile for presentation in theme documentation
|
2016-12-18 15:29:03 +03:00
|
|
|
button[data-md-color-primary],
|
|
|
|
button[data-md-color-accent] {
|
2017-01-01 17:59:44 +03:00
|
|
|
width: 13rem;
|
2016-12-29 13:48:59 +03:00
|
|
|
margin-bottom: 0.4rem;
|
|
|
|
padding: 2.4rem 0.8rem 0.4rem;
|
2016-12-18 15:29:03 +03:00
|
|
|
transition:
|
|
|
|
background-color 0.25s,
|
2017-03-21 17:27:45 +03:00
|
|
|
opacity 0.25s;
|
2016-12-18 15:29:03 +03:00
|
|
|
border-radius: 0.2rem;
|
|
|
|
color: $md-color-white;
|
|
|
|
font-size: ms(-1);
|
|
|
|
text-align: left;
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
// Hovered color tile
|
|
|
|
&:hover {
|
|
|
|
opacity: 0.75;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Build primary colors
|
2016-12-17 14:53:24 +03:00
|
|
|
@each $name, $color in (
|
|
|
|
"red": $clr-red-400,
|
|
|
|
"pink": $clr-pink-500,
|
|
|
|
"purple": $clr-purple-400,
|
|
|
|
"deep-purple": $clr-deep-purple-400,
|
|
|
|
"indigo": $clr-indigo-500,
|
|
|
|
"blue": $clr-blue-500,
|
|
|
|
"light-blue": $clr-light-blue-500,
|
|
|
|
"cyan": $clr-cyan-500,
|
|
|
|
"teal": $clr-teal-500,
|
|
|
|
"green": $clr-green-500,
|
|
|
|
"light-green": $clr-light-green-600,
|
|
|
|
"lime": $clr-lime-600,
|
|
|
|
"yellow": $clr-yellow-800,
|
|
|
|
"amber": $clr-amber-600,
|
|
|
|
"orange": $clr-orange-600,
|
|
|
|
"deep-orange": $clr-deep-orange-400,
|
|
|
|
"brown": $clr-brown-500,
|
|
|
|
"grey": $clr-grey-600,
|
|
|
|
"blue-grey": $clr-blue-grey-600
|
|
|
|
) {
|
2016-12-18 15:29:03 +03:00
|
|
|
|
2017-01-07 22:23:04 +03:00
|
|
|
// Color tile for presentation in theme documentation
|
2016-12-18 15:29:03 +03:00
|
|
|
button[data-md-color-primary="#{$name}"] {
|
|
|
|
background-color: $color;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Color palette
|
|
|
|
[data-md-color-primary="#{$name}"] {
|
2016-12-17 14:53:24 +03:00
|
|
|
|
|
|
|
// Links in typesetted content
|
|
|
|
.md-typeset a {
|
|
|
|
color: $color;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Application header (stays always on top)
|
|
|
|
.md-header {
|
|
|
|
background-color: $color;
|
|
|
|
}
|
|
|
|
|
2017-06-14 15:51:31 +03:00
|
|
|
// Current or active link
|
2017-02-26 20:01:39 +03:00
|
|
|
.md-nav__link:active,
|
2017-06-14 15:51:31 +03:00
|
|
|
.md-nav__link--active {
|
2017-02-26 20:01:39 +03:00
|
|
|
color: $color;
|
|
|
|
}
|
2017-02-26 19:06:13 +03:00
|
|
|
|
2017-02-26 20:01:39 +03:00
|
|
|
// Reset active color for nested list titles
|
|
|
|
.md-nav__item--nested > .md-nav__link {
|
|
|
|
color: inherit;
|
2016-12-28 18:54:59 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// [tablet portrait -]: Layered navigation
|
|
|
|
@include break-to-device(tablet portrait) {
|
|
|
|
|
|
|
|
// Repository containing source
|
|
|
|
.md-nav__source {
|
|
|
|
background-color: mix($color, $md-color-black, 75%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// [tablet -]: Layered navigation
|
|
|
|
@include break-to-device(tablet) {
|
|
|
|
|
|
|
|
// Site title in main navigation
|
|
|
|
html & .md-nav--primary .md-nav__title--site {
|
|
|
|
background-color: $color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-12-18 15:29:03 +03:00
|
|
|
// [tablet landscape +]: Add border to table of contents
|
|
|
|
@include break-from-device(tablet landscape) {
|
|
|
|
|
|
|
|
// Table of contents
|
|
|
|
.md-nav--secondary {
|
|
|
|
border-left: 0.4rem solid $color;
|
|
|
|
}
|
2016-12-17 14:53:24 +03:00
|
|
|
}
|
2017-02-26 16:15:21 +03:00
|
|
|
|
|
|
|
// [screen +]: Set background color for tabs
|
|
|
|
@include break-from-device(screen) {
|
|
|
|
|
|
|
|
// Tabs with outline
|
|
|
|
.md-tabs {
|
|
|
|
background: mix($color, $md-color-black, 75%);
|
|
|
|
|
|
|
|
// Fade-out tabs background upon scrolling
|
|
|
|
&[data-md-state="hidden"] {
|
|
|
|
background: $color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-12-17 14:53:24 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-12-18 15:29:03 +03:00
|
|
|
// Build accent colors
|
2016-12-17 14:53:24 +03:00
|
|
|
@each $name, $color in (
|
|
|
|
"red": $clr-red-a400,
|
|
|
|
"pink": $clr-pink-a400,
|
|
|
|
"purple": $clr-purple-a200,
|
|
|
|
"deep-purple": $clr-deep-purple-a200,
|
|
|
|
"indigo": $clr-indigo-a200,
|
|
|
|
"blue": $clr-blue-a200,
|
|
|
|
"light-blue": $clr-light-blue-a700,
|
|
|
|
"cyan": $clr-cyan-a700,
|
|
|
|
"teal": $clr-teal-a700,
|
|
|
|
"green": $clr-green-a700,
|
|
|
|
"light-green": $clr-light-green-a700,
|
|
|
|
"lime": $clr-lime-a700,
|
|
|
|
"yellow": $clr-yellow-a700,
|
|
|
|
"amber": $clr-amber-a700,
|
|
|
|
"orange": $clr-orange-a400,
|
|
|
|
"deep-orange": $clr-deep-orange-a200
|
|
|
|
) {
|
2016-12-18 15:29:03 +03:00
|
|
|
|
2017-01-07 22:23:04 +03:00
|
|
|
// Color tile for presentation in theme documentation
|
2016-12-18 15:29:03 +03:00
|
|
|
button[data-md-color-accent="#{$name}"] {
|
|
|
|
background-color: $color;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Color palette
|
|
|
|
[data-md-color-accent="#{$name}"] {
|
2016-12-17 14:53:24 +03:00
|
|
|
|
|
|
|
// Typesetted content
|
|
|
|
.md-typeset {
|
|
|
|
|
|
|
|
// Hovered and active links
|
|
|
|
a:hover,
|
|
|
|
a:active {
|
|
|
|
color: $color;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Hovered scrollbar thumb
|
2017-05-31 17:50:11 +03:00
|
|
|
pre code::-webkit-scrollbar-thumb:hover,
|
|
|
|
.codehilite pre::-webkit-scrollbar-thumb:hover {
|
2016-12-17 14:53:24 +03:00
|
|
|
background-color: $color;
|
|
|
|
}
|
|
|
|
|
2017-05-31 17:50:11 +03:00
|
|
|
// Copy to clipboard active icon
|
|
|
|
.md-clipboard:hover::before,
|
|
|
|
.md-clipboard:active::before {
|
|
|
|
color: $color;
|
|
|
|
}
|
|
|
|
|
2016-12-17 14:53:24 +03:00
|
|
|
// Active or targeted back reference
|
|
|
|
.footnote li:hover .footnote-backref:hover,
|
|
|
|
.footnote li:target .footnote-backref {
|
|
|
|
color: $color;
|
|
|
|
}
|
|
|
|
|
2017-08-30 13:27:22 +03:00
|
|
|
// Active, targeted or focused permalink
|
2016-12-17 14:53:24 +03:00
|
|
|
[id]:hover .headerlink:hover,
|
|
|
|
[id]:target .headerlink,
|
|
|
|
[id] .headerlink:focus {
|
|
|
|
color: $color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-30 13:27:22 +03:00
|
|
|
// Focused or hovered link
|
|
|
|
.md-nav__link:focus,
|
2016-12-18 16:22:08 +03:00
|
|
|
.md-nav__link:hover {
|
2016-12-17 14:53:24 +03:00
|
|
|
color: $color;
|
|
|
|
}
|
|
|
|
|
2016-12-18 15:29:03 +03:00
|
|
|
// Search container scrollbar thumb
|
|
|
|
.md-search__scrollwrap::-webkit-scrollbar-thumb:hover {
|
|
|
|
background-color: $color;
|
|
|
|
}
|
2016-12-17 14:53:24 +03:00
|
|
|
|
2017-04-06 12:33:58 +03:00
|
|
|
// Search result link
|
|
|
|
.md-search-result__link {
|
|
|
|
|
|
|
|
// Active or hovered link
|
|
|
|
&[data-md-state="active"],
|
|
|
|
&:hover {
|
|
|
|
background-color: transparentize($color, 0.9);
|
|
|
|
}
|
2016-12-17 14:53:24 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper for scrolling on overflow
|
|
|
|
.md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover {
|
|
|
|
background-color: $color;
|
|
|
|
}
|
2017-03-11 16:07:07 +03:00
|
|
|
|
|
|
|
// Source file icon
|
|
|
|
.md-source-file:hover::before {
|
|
|
|
background-color: $color;
|
|
|
|
}
|
2016-12-17 14:53:24 +03:00
|
|
|
}
|
|
|
|
}
|