middleman-oulu 0.6.27 → 0.6.30

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f2fd30e9d1a8a04404bcee549c1921994a98ead2
4
- data.tar.gz: 1ed24d1de2bf070e00a3505689fa6d888ca79a04
3
+ metadata.gz: 1b480da6570ec87960e7c4199214a0cefc539114
4
+ data.tar.gz: 27d62e82b829df3642a760d0c133e209711a145e
5
5
  SHA512:
6
- metadata.gz: 1c81d7a32a8dd237c9caa7bba38c2c683bc1402907b9bb47d06ba49dd808edf559a7bacd382c0abbcd2e89e19e505311dd6bf893d852078e2ad43619511c7b9e
7
- data.tar.gz: c7e60c78a36413b9566fca61ccd2173709bfb0f3764ad15a0e6531943fe0a9220927aee7a6067c63da1cf0b2116701f0cf88bb5a89c6e7fe1a028c05d6fbe2f1
6
+ metadata.gz: 8eed4c685c84844a8b13b8db39ec6184d05d6882530e356ef141f34a1270d2426b5af9bfe8387e151dc955490d01dbbf980c3c464d7a7d5874a1e8feaf09f028
7
+ data.tar.gz: 43e0c5ca94010185d947837193b3f5e2d8ca28cd85542f9ac43f81916037ec4f99df3997253cb2e95aef74e7b9589c9d8b9ed74ef866d8c5270f72cd6d31675e
@@ -14,6 +14,7 @@
14
14
 
15
15
  // functions
16
16
  ///////////////////
17
+ @import settings/functions/math
17
18
  @import settings/functions/list
18
19
  @import settings/functions/number
19
20
  @import settings/functions/string
@@ -3,9 +3,9 @@
3
3
  +background-image(linear-gradient(top, tint($color, 6%) 0%, shade($color, 6%) 100%))
4
4
  +border(all, solid)
5
5
  border-color: shade($color, 10%) shade($color, 16%) shade($color, 26%)
6
- text-shadow: if(luma_bright($color), lighten($color, 18%) 0 1px 0, darken($color, 18%) 0 -1px 0)
7
6
  @if $text-color
8
7
  color: luma_contrast_color($color)
8
+ text-shadow: if(luma_bright($color), lighten($color, 18%) 0 1px 0, darken($color, 18%) 0 -1px 0)
9
9
  &:hover,
10
10
  &.hover,
11
11
  &.is-hover,
@@ -22,13 +22,16 @@
22
22
  @else
23
23
  @return null
24
24
 
25
+ // Adapted from: https://gist.github.com/voxpelli/6304812
25
26
  @function luma($color)
26
- $r: red($color)
27
- $g: green($color)
28
- $b: blue($color)
29
- @return (0.299 * $r + 0.587 * $g + 0.114 * $b)/2.55
30
-
31
- $ruma-threshold: 100 / pi() !default
27
+ $rgba: red($color), green($color), blue($color)
28
+ $rgba2: ()
29
+ @for $i from 1 through 3
30
+ $rgb: nth($rgba, $i)
31
+ $rgb: $rgb / 255
32
+ $rgb: if($rgb < .03928, $rgb / 12.92, pow(($rgb + .055) / 1.055, 2.4))
33
+ $rgba2: append($rgba2, $rgb)
34
+ @return (.2126 * nth($rgba2, 1) + .7152 * nth($rgba2, 2) + .0722 * nth($rgba2, 3))*100
32
35
 
33
36
  @function luma_contrast($color-1, $color-2: null)
34
37
  @if $color-2
@@ -61,8 +64,6 @@ $ruma-threshold: 100 / pi() !default
61
64
  @return null
62
65
 
63
66
  @function luma_contrast_color($color)
64
- $luma-contrast-bright-color: #000000 !default
65
- $luma-contrast-dark-color: #ffffff !default
66
67
  @if luma_which($color) == bright
67
68
  @return $luma-contrast-bright-color
68
69
  @else
@@ -0,0 +1,31 @@
1
+ // https://gist.github.com/voxpelli/6304812
2
+
3
+ @function gcd($a, $b)
4
+ // From: http://rosettacode.org/wiki/Greatest_common_divisor#JavaScript
5
+ @if ($b != 0)
6
+ @return gcd($b, $a % $b)
7
+ @else
8
+ @return abs($a)
9
+
10
+ @function pow($base, $exponent, $prec: 12)
11
+ // Handles decimal exponents by trying to convert them into a fraction and then use a nthRoot-algorithm for parts of the calculation
12
+ @if (floor($exponent) != $exponent)
13
+ $prec2 : pow(10, $prec)
14
+ $exponent: round($exponent * $prec2)
15
+ $denominator: gcd($exponent, $prec2)
16
+ @return nthRoot(pow($base, $exponent / $denominator), $prec2 / $denominator, $prec)
17
+ $value: $base
18
+ @if $exponent > 1
19
+ @for $i from 2 through $exponent
20
+ $value: $value * $base
21
+ @else if $exponent < 1
22
+ @for $i from 0 through -$exponent
23
+ $value: $value / $base
24
+ @return $value
25
+
26
+ @function nthRoot($num, $n: 2, $prec: 12)
27
+ // From: http://rosettacode.org/wiki/Nth_root#JavaScript
28
+ $x: 1
29
+ @for $i from 0 through $prec
30
+ $x: 1 / $n * (($n - 1) * $x + ($num / pow($x, $n - 1)))
31
+ @return $x
@@ -29,6 +29,7 @@ $input-selection-tx-color: black !default
29
29
 
30
30
  $bright-text-color: white !default
31
31
  $dark-text-color: black !default
32
+ $ruma-threshold: 100 / pi() !default
32
33
 
33
34
  /////////////////
34
35
  // grids
@@ -83,3 +84,7 @@ $twitter: #55acee
83
84
  $facebook: #3b5998
84
85
  $hatena: #008FDE
85
86
  $pocket: #f23c53
87
+
88
+ // luma contrast color
89
+ $luma-contrast-bright-color: $default-text !global
90
+ $luma-contrast-dark-color: $reversal-text !global
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module Oulu
3
- VERSION = "0.6.27"
3
+ VERSION = "0.6.30"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-oulu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.27
4
+ version: 0.6.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - machida
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-08 00:00:00.000000000 Z
11
+ date: 2015-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -169,6 +169,7 @@ files:
169
169
  - assets/stylesheets/settings/functions/_length.sass
170
170
  - assets/stylesheets/settings/functions/_list.sass
171
171
  - assets/stylesheets/settings/functions/_map.sass
172
+ - assets/stylesheets/settings/functions/_math.sass
172
173
  - assets/stylesheets/settings/functions/_number.sass
173
174
  - assets/stylesheets/settings/functions/_position.sass
174
175
  - assets/stylesheets/settings/functions/_reverse.sass