Skip to content
Snippets Groups Projects
Commit 068330fc authored by David Siegfried's avatar David Siegfried Committed by Jan-Hendrik Willms
Browse files

fix contrast in dialogs, closes #1562

Closes #1562

Merge request studip/studip!1032
parent b37dacff
No related branches found
No related tags found
No related merge requests found
...@@ -124,8 +124,8 @@ $fieldset-header: $content-color-20; ...@@ -124,8 +124,8 @@ $fieldset-header: $content-color-20;
$fieldset-border: $base-color-20; $fieldset-border: $base-color-20;
// contrast colors // contrast colors
$contrast-content-white: text-contrast($content-color, #ffffff, #000000, 67%); $contrast-content-white: text-contrast($content-color, #ffffff, #000000);
$contrast-content-gray: text-contrast($content-color, $dark-gray-color, #000000 , 67%); $contrast-content-gray: text-contrast($content-color, $dark-gray-color, #000000 , 67);
$contrast-content-hovergray: text-contrast($content-color, $dark-gray-color-10, $dark-gray-color); $contrast-content-hovergray: text-contrast($content-color, $dark-gray-color-10, $dark-gray-color);
$public-course-bgcolor: $red; $public-course-bgcolor: $red;
......
...@@ -30,6 +30,6 @@ ...@@ -30,6 +30,6 @@
} }
// https://codepen.io/kennyglenn/pen/kxqWjP // https://codepen.io/kennyglenn/pen/kxqWjP
@function text-contrast($color, $dark, $light, $threshold: 50%) { @function text-contrast($color, $dark, $light, $threshold: 51) {
@return if(lightness($color) > $threshold, $light, $dark) @return if(lightness($color) < $threshold, $light, $dark)
} }
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
.ui-dialog-titlebar { .ui-dialog-titlebar {
background-color: $yellow; background-color: $yellow;
color: $contrast-content-white; color: text-contrast($yellow, $black, $white);
text-align: left; text-align: left;
} }
.ui-dialog-titlebar-close { .ui-dialog-titlebar-close {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment