2016-09-04 18:11:58 +03:00
|
|
|
////
|
|
|
|
/// Copyright (c) 2016 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
|
|
|
|
////
|
|
|
|
|
2016-09-04 18:32:12 +03:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// Grid
|
|
|
|
// ----------------------------------------------------------------------------
|
2016-09-04 18:11:58 +03:00
|
|
|
|
2016-09-04 18:32:12 +03:00
|
|
|
// Stretch container to viewport
|
2016-08-07 19:01:56 +03:00
|
|
|
html {
|
|
|
|
height: 100%;
|
2016-09-04 18:11:58 +03:00
|
|
|
|
2016-09-04 18:32:12 +03:00
|
|
|
// [screen medium +] Set base font-size to 11px
|
2016-09-04 18:11:58 +03:00
|
|
|
@include break-from-device(screen medium) {
|
|
|
|
font-size: 68.75%;
|
|
|
|
}
|
|
|
|
|
2016-09-04 18:32:12 +03:00
|
|
|
// [screen large +] Set base font-size to 12px
|
2016-09-04 18:11:58 +03:00
|
|
|
@include break-from-device(screen large) {
|
|
|
|
font-size: 75.00%;
|
|
|
|
}
|
2016-08-07 19:01:56 +03:00
|
|
|
}
|
|
|
|
|
2016-09-04 18:32:12 +03:00
|
|
|
// Stretch body to container and leave room for footer.
|
2016-08-07 19:01:56 +03:00
|
|
|
body {
|
|
|
|
position: relative;
|
|
|
|
min-height: 100%;
|
2016-09-02 01:33:45 +03:00
|
|
|
|
2016-09-04 18:32:12 +03:00
|
|
|
// Lock body to viewport height (e.g. in search mode)
|
2016-09-02 01:33:45 +03:00
|
|
|
&.md-js__body--locked {
|
|
|
|
height: 100%;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
2016-08-07 19:01:56 +03:00
|
|
|
}
|
|
|
|
|
2016-09-04 18:32:12 +03:00
|
|
|
// Horizontal separators
|
2016-08-07 19:01:56 +03:00
|
|
|
hr {
|
|
|
|
display: block;
|
2016-09-04 18:11:58 +03:00
|
|
|
height: px2rem(1px);
|
2016-08-07 19:01:56 +03:00
|
|
|
padding: 0;
|
|
|
|
border: 0;
|
|
|
|
}
|
|
|
|
|
2016-09-04 18:32:12 +03:00
|
|
|
// Template-wide grid
|
2016-08-07 19:01:56 +03:00
|
|
|
.md-grid {
|
2016-09-02 01:33:45 +03:00
|
|
|
max-width: 120.0rem;
|
2016-08-07 19:01:56 +03:00
|
|
|
margin-right: auto;
|
2016-09-04 18:11:58 +03:00
|
|
|
margin-left: auto;
|
2016-08-07 19:01:56 +03:00
|
|
|
}
|
|
|
|
|
2016-09-04 18:32:12 +03:00
|
|
|
// Prevent collapse of margin when setting margin on child element
|
2016-08-07 19:01:56 +03:00
|
|
|
.md-container,
|
|
|
|
.md-main {
|
|
|
|
overflow: auto;
|
|
|
|
}
|
|
|
|
|
2016-09-04 18:32:12 +03:00
|
|
|
// Add top spacing to acount for header
|
2016-08-07 19:01:56 +03:00
|
|
|
.md-main {
|
|
|
|
margin-top: 5.6rem;
|
|
|
|
|
2016-09-04 18:32:12 +03:00
|
|
|
// Bottom spacing to account for footer
|
2016-08-07 19:01:56 +03:00
|
|
|
&__inner {
|
|
|
|
margin-top: 3.0rem;
|
|
|
|
margin-bottom: 9.2rem;
|
|
|
|
overflow: auto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-09-04 18:32:12 +03:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// Navigational elements
|
|
|
|
// ----------------------------------------------------------------------------
|
2016-08-07 19:01:56 +03:00
|
|
|
|
2016-09-04 18:32:12 +03:00
|
|
|
// Toggle checkbox
|
2016-08-07 19:01:56 +03:00
|
|
|
.md-toggle {
|
2016-09-04 18:11:58 +03:00
|
|
|
display: none;
|
2016-08-07 19:01:56 +03:00
|
|
|
}
|
|
|
|
|
2016-09-04 18:32:12 +03:00
|
|
|
// Overlay below expanded drawer
|
2016-08-07 19:01:56 +03:00
|
|
|
.md-overlay {
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
2016-09-04 18:11:58 +03:00
|
|
|
transition: width 0.0s 0.25s,
|
|
|
|
height 0.0s 0.25s,
|
|
|
|
opacity 0.25s;
|
2016-08-07 19:01:56 +03:00
|
|
|
background: $md-color-black--light;
|
2016-09-04 18:11:58 +03:00
|
|
|
opacity: 0;
|
|
|
|
z-index: 2;
|
2016-08-07 19:01:56 +03:00
|
|
|
|
2016-09-04 18:32:12 +03:00
|
|
|
// [tablet landscape -]: Trigger overlay
|
2016-08-07 19:01:56 +03:00
|
|
|
@include break-to-device(tablet landscape) {
|
|
|
|
|
2016-09-04 18:32:12 +03:00
|
|
|
// Expanded drawer
|
2016-09-04 18:11:58 +03:00
|
|
|
.md-toggle--drawer:checked ~ & {
|
2016-08-07 19:01:56 +03:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2016-09-04 18:11:58 +03:00
|
|
|
transition: width 0.0s,
|
|
|
|
height 0.0s,
|
|
|
|
opacity 0.25s;
|
2016-08-07 19:01:56 +03:00
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-09-04 18:32:12 +03:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// Flexible elements, implemented with table layout
|
|
|
|
// ----------------------------------------------------------------------------
|
2016-08-07 19:01:56 +03:00
|
|
|
|
2016-09-04 18:32:12 +03:00
|
|
|
// Flexible layout container
|
2016-08-07 19:01:56 +03:00
|
|
|
.md-flex {
|
|
|
|
display: table;
|
|
|
|
|
2016-09-04 18:32:12 +03:00
|
|
|
// Flexible layout container cell/element
|
2016-08-07 19:01:56 +03:00
|
|
|
&__cell {
|
|
|
|
display: table-cell;
|
|
|
|
vertical-align: top;
|
|
|
|
|
2016-09-04 18:32:12 +03:00
|
|
|
// Shrink to minimum width
|
2016-08-07 19:01:56 +03:00
|
|
|
&--shrink {
|
|
|
|
width: 1%;
|
|
|
|
}
|
|
|
|
|
2016-09-04 18:32:12 +03:00
|
|
|
// Stretch to maximum width
|
2016-08-07 19:01:56 +03:00
|
|
|
&--stretch {
|
|
|
|
display: table;
|
|
|
|
width: 100%;
|
2016-09-04 18:11:58 +03:00
|
|
|
table-layout: fixed;
|
2016-08-07 19:01:56 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-09-04 18:32:12 +03:00
|
|
|
// Apply ellipsis in case of overflowing text
|
2016-08-07 19:01:56 +03:00
|
|
|
&__ellipsis {
|
|
|
|
display: table-cell;
|
|
|
|
text-overflow: ellipsis;
|
2016-09-04 18:11:58 +03:00
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
2016-08-07 19:01:56 +03:00
|
|
|
}
|
2016-09-04 18:11:58 +03:00
|
|
|
}
|