blob: 150501e6afc810500f5ee4dc81cf993714d750a0 [file] [log] [blame]
/*
* The MIT License (MIT)
*
* Copyright (c) 2013-2020 Michael Rose and contributors
*
* 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 NONINFRINGEMENT. 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 IN THE
* SOFTWARE.
*
* Code adopted from the Minimal Mistakes codebase at:
* https://github.com/mmistakes/minimal-mistakes/blob/master/_sass/minimal-mistakes/_notices.scss
*/
@mixin notice($notice-color) {
margin: 2em 0 !important; /* override*/
padding: 1em;
color: $font-color;
font-family: $font-style;
font-size: 1.12em;
text-indent: initial; /* override*/
background-color: mix(#fff, $notice-color, 90%);
border-radius: 0;
box-shadow: 0 1px 1px rgba($notice-color, 0.25);
h4 {
margin-top: 0 !important; /* override*/
margin-bottom: 0.75em;
}
@at-root .page__content #{&} h4 {
/* using at-root to override .page-content h4 font size*/
margin-bottom: 0;
font-size: 1em;
}
p {
&:last-child {
margin-bottom: 0 !important; /* override*/
}
}
h4 + p {
/* remove space above paragraphs that appear directly after notice headline*/
margin-top: 0;
padding-top: 0;
}
a {
color: $notice-color;
&:hover {
color: mix(#000, $notice-color, 40%);
}
}
code {
background-color: mix(#fff, $notice-color, 95%)
}
ul {
&:last-child {
margin-bottom: 0; /* override*/
}
}
}
/* Outdated notice */
.outdated-notice {
@include notice($main);
}
/* Insert a base outdated warning message to any inclusion of .outdated-notice. */
.outdated-notice:before {
content: 'Note: This page is outdated. ';
font-weight: bold;
}