Skip to content

Commit

Permalink
Fixed .callout text- and link-colors
Browse files Browse the repository at this point in the history
- .callout text color now uses foreground() with previously unused
$callout-font-color-alt and is now aware of its background-color.
- .callout links now consider $callout-link-tint and are also aware of
its background-color. $callout-link-tint is mentioned in Sass Reference
and in _settings.scss but wasn't used at all!
  • Loading branch information
wolfgang-demeter committed Aug 10, 2016
1 parent c14a44e commit 1e30ba5
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion scss/components/_callout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ $callout-link-tint: 30% !default;
border: $callout-border;
border-radius: $callout-radius;
position: relative;
color: $callout-font-color;

// Respect the padding, fool.
> :first-child {
Expand All @@ -67,6 +66,26 @@ $callout-link-tint: 30% !default;
$background: scale-color($color, $lightness: $callout-background-fade);

background-color: $background;
color: foreground($background, $callout-font-color, $callout-font-color-alt);

a {
@if $callout-link-tint {
color: scale-color(foreground($background, $anchor-color), $lightness: $callout-link-tint);

&:hover,
&:focus {
color: scale-color(foreground($background, $anchor-color-hover), $lightness: $callout-link-tint);
}
}
@else {
color: foreground($background, $anchor-color);

&:hover,
&:focus {
color: foreground($background, $anchor-color-hover);
}
}
}
}

@mixin callout-size($padding) {
Expand Down

0 comments on commit 1e30ba5

Please sign in to comment.