Skip to content
This repository has been archived by the owner on May 18, 2019. It is now read-only.

Commit

Permalink
Fix colors
Browse files Browse the repository at this point in the history
  • Loading branch information
Wikiki committed Nov 29, 2017
1 parent 2cb080f commit 3f7e507
Show file tree
Hide file tree
Showing 4 changed files with 151 additions and 150 deletions.
33 changes: 17 additions & 16 deletions accordion.sass
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,6 @@ $accordion-body-pre-code-background-color: transparent !default
font-size: $size-medium
&.is-large
font-size: $size-large
// Colors
@each $name, $pair in $colors
$color: nth($pair, 1)
$color-invert: nth($pair, 2)
$color-lightning: max((100% - lightness($color)) - 2%, 0%)
$color-luminance: colorLuminance($color)
$darken-percentage: $color-luminance * 70%
$desaturate-percentage: $color-luminance * 30%
&.is-#{$name}
background-color: lighten($color, $color-lightning)
.message-header
background-color: $color
color: $color-invert
.message-body
border-color: $color
color: desaturate(darken($color, $darken-percentage), $desaturate-percentage)

&:not(:first-child)
.accordion-header
Expand Down Expand Up @@ -139,3 +123,20 @@ $accordion-body-pre-code-background-color: transparent !default
-moz-transition: max-height 2s ease
-o-transition: max-height 2s ease
transition: max-height 2s ease

// Colors
@each $name, $pair in $colors
$color: nth($pair, 1)
$color-invert: nth($pair, 2)
$color-lightning: max((100% - lightness($color)) - 2%, 0%)
$color-luminance: colorLuminance($color)
$darken-percentage: $color-luminance * 70%
$desaturate-percentage: $color-luminance * 30%
&.is-#{$name}
background-color: lighten($color, $color-lightning)
.accordion-header
background-color: $color
color: $color-invert
.accordion-body
border-color: $color
color: desaturate(darken($color, $darken-percentage), $desaturate-percentage)
Loading

0 comments on commit 3f7e507

Please sign in to comment.