Sha256: c99e43fa3594bd9b0bd89058c23842b902aa692bad95672a44189f33478b79b8

Contents?: true

Size: 989 Bytes

Versions: 12

Compression:

Stored size: 989 Bytes

Contents

@function powerNumber($number, $exp)
  $value: 1
  @if $exp > 0
    @for $i from 1 through $exp
      $value: $value * $number
  @else if $exp < 0
    @for $i from 1 through -$exp
      $value: $value / $number
  @return $value

@function colorLuminance($color)
  $color-rgb: ('red': red($color),'green': green($color),'blue': blue($color))
  @each $name, $value in $color-rgb
    $adjusted: 0
    $value: $value / 255
    @if $value < 0.03928
      $value: $value / 12.92
    @else
      $value: ($value + .055) / 1.055
      $value: powerNumber($value, 2)
    $color-rgb: map-merge($color-rgb, ($name: $value))
  @return (map-get($color-rgb, 'red') * .2126) + (map-get($color-rgb, 'green') * .7152) + (map-get($color-rgb, 'blue') * .0722)

@function closestEvenNumber($number)
  @if ($number % 2 == 0px)
    @return $number
  @else
    @return ($number + 1px)

@function findColorInvert($color)
  @if (colorLuminance($color) > 0.8)
    @return rgba(black, 0.5)
  @else
    @return white

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
bulma-rails-0.0.24 app/assets/stylesheets/sass/utilities/functions.sass
bulma-rails-0.0.23 app/assets/stylesheets/sass/utilities/functions.sass
bulma-rails-0.0.20 app/assets/stylesheets/bulma/utilities/functions.sass
bulma-rails-0.0.18 app/assets/stylesheets/bulma/utilities/functions.sass
bulma-rails-0.0.17.1 app/assets/stylesheets/bulma/utilities/functions.sass
bulma-rails-0.0.16 app/assets/stylesheets/bulma/utilities/functions.sass
bulma-rails-0.0.15 app/assets/stylesheets/bulma/utilities/functions.sass
bulma-rails-0.0.14 app/assets/stylesheets/bulma/utilities/functions.sass
bulma-rails-0.0.12 app/assets/stylesheets/bulma/utilities/functions.sass
bulma-rails-0.0.11 app/assets/stylesheets/bulma/utilities/functions.sass
bulma-rails-0.0.10 app/assets/stylesheets/bulma/utilities/functions.sass
bulma-rails-0.0.8 app/assets/stylesheets/bulma/utilities/functions.sass