oulu-rails 0.6.23 → 0.6.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9794a2738be62503cfecab58af195824863c38c3
4
- data.tar.gz: 97a3e3c32fc9b71b0c70a157d0e124112217d248
3
+ metadata.gz: bd8c1e5c8ab64d0fdbbec239d3d91a0e1604f31b
4
+ data.tar.gz: 76d0952b1ad86eed94a0cc0fb36b9689c9d68c45
5
5
  SHA512:
6
- metadata.gz: 1be32f71210a01d28c132e2e88425300f9d91b16cff53777df830f95c57042763bf6aefe13f81293ab1b604a3e1f56462f4da8caef7c88e6cbede3fb5ea3fe31
7
- data.tar.gz: e1ea4a51b1f5648dd65c258b0db762152ad9bc2a708f13a332ab99fdb22f6b5a815bf38da3f396d3af09225ed57d7691a8f63bd06efd6a9abdda8895b7225b63
6
+ metadata.gz: 5f5ec27a4c18db8af9a92237bcfb5a026fbbbbb3cc012b9327cf623c720548dafb4ad8d92c07ed8eba6eb3772e7368a926af5ce2b5b9042ddf55b5f1d503945c
7
+ data.tar.gz: 7cec27384b99185c9fefd1615065c3ab46b89c2708174521f579e13e869778d81fd3e1c3955938445d3c8456bfb09af7a361290b18de2ad2f99b6921c1efd4c7
@@ -1,3 +1,3 @@
1
1
  module OuluRails
2
- VERSION = "0.6.23"
2
+ VERSION = "0.6.24"
3
3
  end
@@ -27,22 +27,25 @@
27
27
  +padding(horizontal, $height/2)
28
28
  @if $font-size > 12px
29
29
  font-weight: bold
30
- i
30
+ i,
31
+ .is-button-icon
31
32
  @if $font-size > 28
32
33
  +rem('margin-right', $font-size/4)
33
34
  @else
34
35
  +rem('margin-right', $font-size/3)
35
36
  &.has-right-icon
36
- i
37
+ i,
38
+ .is-button-icon
37
39
  margin-right: 0
38
- @if $font-size > 28
39
- +rem('margin-left', $font-size/4)
40
- @else
41
- +rem('margin-left', $font-size/3)
40
+ @if $font-size > 28
41
+ +rem('margin-left', $font-size/4)
42
+ @else
43
+ +rem('margin-left', $font-size/3)
42
44
  &.is-input-container
43
45
  padding: 0
44
46
  +relative
45
- i
47
+ i,
48
+ .is-button-icon
46
49
  +absolute(left $height/2, top 0)
47
50
  +rem('line-height', $height - ($border-width*2))
48
51
  input
@@ -1,25 +1,43 @@
1
- =normal-button-color($color)
1
+ =normal-button-color($color, $text-color: true)
2
2
  background-color: $color
3
3
  +background-image(linear-gradient(top, tint($color, 6%) 0%, shade($color, 6%) 100%))
4
- color: luma_contrast_color($color)
5
4
  +border(all, solid)
6
5
  border-color: shade($color, 10%) shade($color, 16%) shade($color, 26%)
7
6
  text-shadow: if(luma_bright($color), lighten($color, 18%) 0 1px 0, darken($color, 18%) 0 -1px 0)
7
+ @if $text-color
8
+ color: luma_contrast_color($color)
9
+ &:hover,
10
+ &.hover,
11
+ &.is-hover,
12
+ &:active,
13
+ &.active,
14
+ &.is-active
15
+ color: luma_contrast_color($color)
8
16
 
9
17
  =normal-button($color: blue)
10
18
  +transition(.5s (background-image))
11
19
  +border-radius(4px)
12
- +normal-button-color($color)
20
+ @if $color == white
21
+ +normal-button-color(#f2f2f2)
22
+ @else
23
+ +normal-button-color($color)
13
24
  box-shadow: tint($color, 32%) 0 1px 0 inset, shade($color, 26%) 0 1px 0, rgba(black, .15) 0 2px 1px
14
25
  &:hover,
15
26
  &.hover,
16
27
  &.is-hover
17
- $color: lighten($color, 5%)
18
- +normal-button-color($color)
28
+ @if $color == white
29
+ +normal-button-color(lighten(#f2f2f2, 5%), false)
30
+ @else
31
+ +normal-button-color(lighten($color, 5%), false)
19
32
  &:active,
20
33
  &.active,
21
34
  &.is-active
22
- $color: lighten($color, 7%)
23
- +normal-button-color($color)
24
35
  +top(1px)
25
- box-shadow: darken($color, 12%) 0 1px 0 inset, rgba(white, .3) 0 1px 1px
36
+ @if $color == white
37
+ $color: lighten(#f2f2f2, 7%)
38
+ +normal-button-color($color, false)
39
+ box-shadow: darken($color, 12%) 0 1px 0 inset, rgba(white, .3) 0 1px 1px
40
+ @else
41
+ $color: lighten($color, 7%)
42
+ +normal-button-color($color, false)
43
+ box-shadow: darken($color, 12%) 0 1px 0 inset, rgba(white, .3) 0 1px 1px
@@ -23,15 +23,10 @@
23
23
  @return null
24
24
 
25
25
  @function luma($color)
26
- // Adapted from: https://gist.github.com/voxpelli/6304812
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 < 0.03928, $rgb / 12.92, pow(($rgb + 0.055) / 1.055, 2.4))
33
- $rgba2: append($rgba2, $rgb)
34
- @return (0.2126 * nth($rgba2, 1) + 0.7152 * nth($rgba2, 2) + 0.0722 * nth($rgba2, 3)) * 100
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
35
30
 
36
31
  $ruma-threshold: 100 / pi() !default
37
32
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oulu-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.23
4
+ version: 0.6.24
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-02 00:00:00.000000000 Z
11
+ date: 2015-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass-rails