From 8dd2010a77c906e553e828e5b3200ee744876bd9 Mon Sep 17 00:00:00 2001 From: Ray Lyon Date: Thu, 20 May 2021 16:17:53 -0400 Subject: [PATCH] fix css for notices --- _sass/minimal-mistakes/_notices.scss | 106 +++++++++++++++++++++++++ _sass/minimal-mistakes/_variables.scss | 2 +- 2 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 _sass/minimal-mistakes/_notices.scss diff --git a/_sass/minimal-mistakes/_notices.scss b/_sass/minimal-mistakes/_notices.scss new file mode 100644 index 0000000..be22aa1 --- /dev/null +++ b/_sass/minimal-mistakes/_notices.scss @@ -0,0 +1,106 @@ +/* ========================================================================== + NOTICE TEXT BLOCKS + ========================================================================== */ + +/** + * Default Kramdown usage (no indents!): + *
+ * #### Headline for the Notice + * Text for the notice + *
+ */ + + @mixin notice($notice-color) { + margin: 2em 0 !important; /* override*/ + padding: 1em; + color: $text-color; + font-family: $global-font-family; + font-size: $type-size-6 !important; + text-indent: initial; /* override*/ + background-color: mix($background-color, $notice-color, $notice-background-mix); + border-radius: $border-radius; + box-shadow: 0 1px 1px rgba($notice-color, 0.25); + + h4 { + margin-top: 0 !important; /* override*/ + margin-bottom: 0.75em; + line-height: inherit; + } + + @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: mix(#000, $notice-color, 10%); + + &:hover { + color: mix(#000, $notice-color, 50%); + } + } + + code { + background-color: mix($background-color, $notice-color, $code-notice-background-mix) + } + + pre code { + background-color: inherit; + } + + ul { + &:last-child { + margin-bottom: 0; /* override*/ + } + } + } + + /* Default notice */ + + .notice { + @include notice($light-gray); + } + + /* Primary notice */ + + .notice--primary { + @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); + } + \ No newline at end of file diff --git a/_sass/minimal-mistakes/_variables.scss b/_sass/minimal-mistakes/_variables.scss index 8934db1..a5715f7 100644 --- a/_sass/minimal-mistakes/_variables.scss +++ b/_sass/minimal-mistakes/_variables.scss @@ -125,7 +125,7 @@ $masthead-link-color-hover: mix(#000, $primary-color, 25%) !default; $navicon-link-color-hover: mix(#fff, $primary-color, 75%) !default; /* notices */ -$notice-background-mix: 80% !default; +$notice-background-mix: 90% !default; $code-notice-background-mix: 90% !default; /* syntax highlighting (base16) */