Sha256: a766fe9521a33e41ed658a90c9b155be0ecbe032347093a5d8675d65eaf937e7
Contents?: true
Size: 1.73 KB
Versions: 14
Compression:
Stored size: 1.73 KB
Contents
// Provides mixin to generate colors for cells backgrounds // @function merge-color($color-1, $color-2) { $col2: rgb(red($color-2), green($color-2), blue($color-2)); $percent: 100*alpha($color-2); @return mix($col2, $color-1, $percent); } @function merge-colors($color, $color-1: rgba(0, 0, 0, 0), $color-2: rgba(0, 0, 0, 0), $color-3: rgba(0, 0, 0, 0), $color-4: rgba(0, 0, 0, 0), $color-5: rgba(0, 0, 0, 0), $color-6: rgba(0, 0, 0, 0), $color-7: rgba(0, 0, 0, 0), $color-8: rgba(0, 0, 0, 0), $color-9: rgba(0, 0, 0, 0), $color-10: rgba(0, 0, 0, 0)) { @return merge-color(merge-color(merge-color(merge-color(merge-color(merge-color(merge-color(merge-color(merge-color(merge-color($color, $color-1), $color-2), $color-3), $color-4), $color-5), $color-6), $color-7), $color-8), $color-9), $color-10); } $list-line-backgrounds: ("" rgba(255, 255, 255, 0)) (".odd" rgba(255, 255, 255, 0.5)) (".even" rgba(255, 255, 255, 0.5)); $list-column-backgrounds: ("" rgba(255, 255, 255, 0)) (".act" rgba(255, 134, 0, 0)) (".sor" rgba(0, 18, 132, 0.05)); $list-hover-backgrounds: ("" rgba(255, 255, 255, 0)) (":hover" rgba(209, 218, 255, 0.3)); @mixin list-colors($bgcolor: #000000, $selector: '&') { tr { #{$selector} { @each $line-background in $list-line-backgrounds { &#{nth($line-background, 1)} { @each $hover-background in $list-hover-backgrounds { &#{nth($hover-background, 1)} { @each $col-background in $list-column-backgrounds { td#{nth($col-background, 1)} { background-color: merge-colors($bgcolor, nth($line-background, 2), nth($col-background, 2), nth($hover-background, 2)); } } } } } } } } }
Version data entries
14 entries across 14 versions & 1 rubygems