Skip to content

Commit 83db28e

Browse files
tsmannerTom Manner
and
Tom Manner
authored
Color notices based on skin colors instead of fixed values (mmistakes#2887)
* Made notice Sass color mixing in based on $background-color and $text-color instead of hard-coded black and white values. * Made some style adjustments to notices to improve readability. Notice links are slightly darkened from the notice color, mostly because the gray-on-gray default notice links were very hard to read. Rather than being $notice-color, they are `mix(#000, $notice-color, 10%)`. The notice background mix and code-background mix can now be set with the SCSS variables $notice-background-mix and $code-notice-background-mix. The default mix for background was adjusted to 80%, from 90%. The default mix for code-background was adjusted to 90%, from 95%. Skins that still didn't read well were adjusted individually. * Adjusted sunrise $notice-background-mix to 75% * Adjusted dark theme notice background mix colors back to the default Co-authored-by: Tom Manner <[email protected]>
1 parent 29563ed commit 83db28e

File tree

7 files changed

+26
-7
lines changed

7 files changed

+26
-7
lines changed

_sass/minimal-mistakes/_notices.scss

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
@mixin notice($notice-color) {
1414
margin: 2em 0 !important; /* override*/
1515
padding: 1em;
16-
color: $dark-gray;
16+
color: $text-color;
1717
font-family: $global-font-family;
1818
font-size: $type-size-6 !important;
1919
text-indent: initial; /* override*/
20-
background-color: mix(#fff, $notice-color, 90%);
20+
background-color: mix($background-color, $notice-color, $notice-background-mix);
2121
border-radius: $border-radius;
2222
box-shadow: 0 1px 1px rgba($notice-color, 0.25);
2323

@@ -46,15 +46,15 @@
4646
}
4747

4848
a {
49-
color: $notice-color;
49+
color: mix(#000, $notice-color, 10%);
5050

5151
&:hover {
52-
color: mix(#000, $notice-color, 40%);
52+
color: mix(#000, $notice-color, 50%);
5353
}
5454
}
5555

5656
code {
57-
background-color: mix(#fff, $notice-color, 95%)
57+
background-color: mix($background-color, $notice-color, $code-notice-background-mix)
5858
}
5959

6060
pre code {

_sass/minimal-mistakes/_variables.scss

+4
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ $masthead-link-color: $primary-color !default;
118118
$masthead-link-color-hover: mix(#000, $primary-color, 25%) !default;
119119
$navicon-link-color-hover: mix(#fff, $primary-color, 75%) !default;
120120

121+
/* notices */
122+
$notice-background-mix: 80% !default;
123+
$code-notice-background-mix: 90% !default;
124+
121125
/* syntax highlighting (base16) */
122126
$base00: #263238 !default;
123127
$base01: #2e3c43 !default;

_sass/minimal-mistakes/skins/_aqua.scss

+5-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,8 @@ $link-color : $info-color !default;
2727
$link-color-hover : mix(#000, $link-color, 25%) !default;
2828
$link-color-visited : mix(#fff, $link-color, 25%) !default;
2929
$masthead-link-color : $primary-color !default;
30-
$masthead-link-color-hover : mix(#000, $primary-color, 25%) !default;
30+
$masthead-link-color-hover : mix(#000, $primary-color, 25%) !default;
31+
32+
/* notices */
33+
$notice-background-mix: 90% !default;
34+
$code-notice-background-mix: 95% !default;

_sass/minimal-mistakes/skins/_dark.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ $navicon-link-color-hover: mix(#000, $background-color, 30%) !default;
2727

2828
.ais-search-box .ais-search-box--input {
2929
background-color: $form-background-color;
30-
}
30+
}

_sass/minimal-mistakes/skins/_neon.scss

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ $masthead-link-color: $text-color !default;
1818
$masthead-link-color-hover: mix(#000, $text-color, 20%) !default;
1919
$navicon-link-color-hover: mix(#000, $background-color, 30%) !default;
2020

21+
/* notices */
22+
$notice-background-mix: 90% !default;
23+
$code-notice-background-mix: 95% !default;
24+
2125
/* neon syntax highlighting (base16) */
2226
$base00: #ffffff !default;
2327
$base01: #e0e0e0 !default;

_sass/minimal-mistakes/skins/_plum.scss

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ $masthead-link-color: $text-color !default;
1818
$masthead-link-color-hover: mix(#000, $text-color, 20%) !default;
1919
$navicon-link-color-hover: mix(#000, $background-color, 30%) !default;
2020

21+
/* notices */
22+
$notice-background-mix: 70% !default;
23+
$code-notice-background-mix: 80% !default;
24+
2125
/* plum syntax highlighting (base16) */
2226
$base00: #ffffff !default;
2327
$base01: #e0e0e0 !default;

_sass/minimal-mistakes/skins/_sunrise.scss

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ $masthead-link-color: $text-color !default;
2020
$masthead-link-color-hover: mix(#000, $text-color, 20%) !default;
2121
$navicon-link-color-hover: mix(#000, $background-color, 30%) !default;
2222

23+
/* notices */
24+
$notice-background-mix: 75% !default;
25+
2326
/* sunrise syntax highlighting (base16) */
2427
$base00: #1d1f21 !default;
2528
$base01: #282a2e !default;

0 commit comments

Comments
 (0)