hacks-guide-minimal-mistake.../assets/_scss/_notices.scss

104 lines
1.9 KiB
SCSS
Raw Normal View History

2016-03-10 19:06:59 +01:00
/* ==========================================================================
NOTICE TEXT BLOCKS
========================================================================== */
/**
* Default Kramdown usage (no indents!):
* <div class="notice" markdown="1">
* #### Headline for the Notice
* Text for the notice
* </div>
*/
@mixin notice($notice-color) {
2016-03-25 14:11:13 +01:00
margin: 2em 0 !important; // override
2016-03-10 19:06:59 +01:00
padding: 1em;
font-family: $global-font-family;
2016-03-31 03:52:58 +02:00
font-size: $type-size-6 !important;
2016-03-25 14:11:13 +01:00
text-indent: initial; // override
2016-03-10 19:06:59 +01:00
background-color: mix(#fff, $notice-color, 90%);
2016-03-20 02:50:18 +01:00
border-radius: $border-radius;
box-shadow: $box-shadow;
2016-03-21 21:36:24 +01:00
2016-03-10 19:06:59 +01:00
h4 {
margin-top: 0 !important; // override
margin-bottom: 0.75em;
}
2016-03-21 21:36:24 +01:00
2016-03-10 19:06:59 +01:00
@at-root .page__content #{&} h4 {
// using at-root to override .page-content h4 font size
margin-bottom: 0;
font-size: 1em;
2016-03-10 19:06:59 +01:00
}
2016-03-21 21:36:24 +01:00
2016-03-10 19:06:59 +01:00
@at-root .page__content #{&} a {
border-bottom-width: 2px;
box-shadow: none !important; // override
2016-03-21 21:36:24 +01:00
2016-03-10 19:06:59 +01:00
&:hover {
background-color: transparent !important; // override
}
}
2016-03-21 21:36:24 +01:00
2016-03-10 19:06:59 +01:00
p {
2016-03-31 03:52:58 +02:00
&:last-child {
margin-bottom: 0 !important; // override
}
2016-03-21 21:36:24 +01:00
2016-03-10 19:06:59 +01:00
a {
border-bottom: 1px solid mix(#fff, $notice-color, 50%) !important; // override
}
}
2016-03-21 21:36:24 +01:00
2016-03-10 19:06:59 +01:00
h4 + p {
// remove space above paragraphs that appear directly after notice headline
margin-top: 0;
padding-top: 0;
}
2016-03-21 21:36:24 +01:00
2016-03-10 19:06:59 +01:00
code {
2016-03-23 03:59:39 +01:00
background-color: mix(#fff, $notice-color, 95%)
2016-03-10 19:06:59 +01:00
}
2016-03-31 03:52:58 +02:00
ul {
&:last-child {
margin-bottom: 0; // override
}
}
2016-03-10 19:06:59 +01:00
}
/* Default notice */
.notice {
@include notice($light-gray);
}
/* Primary notice */
.notice--primary {
2016-03-10 19:06:59 +01:00
@include notice($primary-color);
}
/* Info notice */
.notice--info {
@include notice($info-color);
}
/* Warning notice */
.notice--warning {
@include notice($warning-color);
}
/* Success notice */
.notice--success {
@include notice($success-color);
}
/* Danger notice */
.notice--danger {
@include notice($danger-color);
}