oulu-rails 0.5.14 → 0.5.16

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: f4dab3893ba8f559f2e6c8129974ce0c4fd51e00
4
- data.tar.gz: 3518c8db61cd57fc29c9c7b1a3f6d9d3d8239135
3
+ metadata.gz: ad6893f94868b26061f2c2bec4a049089784af72
4
+ data.tar.gz: 16271c05721d7399634cc2274df2998ae28fac59
5
5
  SHA512:
6
- metadata.gz: a0dc672f40c6754b38e29ba7eafd55e4c6c82cbf93963c95aa7ef822c072cb7ccde39dab74776ffd0361f43307e8dd0a80fc3eaabc9eff60a02ddfea0917fdfe
7
- data.tar.gz: ea1c9f68a16a27b415223b036bdf597dce5f14358bef38390db320918d9b12d25aaeec2a1c7b7fdb6ee8bd8b0e885899af581723e66ee31a2b2406511b192553
6
+ metadata.gz: 0f7d82d9d4cf106db74fadf8ba9b9415cbe0400ca5d6e61e18999b9dab177c7f2c11527052bd82e146f4722ed0cebc4eb6dfe6379a801b5c481b591ada0fd736
7
+ data.tar.gz: dc1fa06e4c04fa6c1e0337eab91727b7a98b3e6b19ea61273261cc35903b785fdcd4aa047bb47e98f3418f324c9a47347e648c0e10ca802f20751d0f14f98b11
@@ -1,3 +1,3 @@
1
1
  module OuluRails
2
- VERSION = "0.5.14"
2
+ VERSION = "0.5.16"
3
3
  end
@@ -68,8 +68,9 @@
68
68
  @import settings/mixins/grids
69
69
  @import settings/mixins/responsive-utilities
70
70
  @import settings/mixins/background
71
- @import settings/mixins/lines
72
- @import settings/mixins/button-base
71
+ @import settings/mixins/line
72
+ @import settings/mixins/button
73
+ @import settings/mixins/image
73
74
 
74
75
  // http://sassmatic.com/
75
76
  // @import settings/mixins/sassmatic
@@ -40,6 +40,12 @@
40
40
  @if number($number)
41
41
  @return $number / ($number * 0 + 1)
42
42
 
43
+ @function unit_number($value)
44
+ @if number($value) and not unitless($value)
45
+ @return true
46
+ @else
47
+ @return null
48
+
43
49
  @function unitless_number($value)
44
50
  @if number($value) and unitless($value)
45
51
  @return true
@@ -4,6 +4,12 @@
4
4
  @else
5
5
  @return null
6
6
 
7
+ @function vertical_align($value)
8
+ @if $value == "baseline" or $value == "top" or $value == "middle" or $value == "bottom" or $value == "text-top" or $value == "text-bottom" or $value == "super" or $value == "sub" or $value == "sub"
9
+ @return true
10
+ @else
11
+ @return null
12
+
7
13
  @function font_weight($value)
8
14
  @if $value == "bold" or $value == "normal"
9
15
  @return true
@@ -32,3 +38,9 @@
32
38
  @return true
33
39
  @else
34
40
  @return null
41
+
42
+ @function white_space($value)
43
+ @if $value == "normal" or $value == "pre" or $value == "nowrap"
44
+ @return true
45
+ @else
46
+ @return null
@@ -3,8 +3,8 @@
3
3
  // $tale
4
4
  $tale-direction: optional_nth($tale, 1)
5
5
  $tale-color: optional_nth($tale, 2)
6
- $tale-width: optional_nth($tale, 3)
7
- $tale-height: optional_nth($tale, 4)
6
+ $tale-width: optional_nth($tale, 3, 0)
7
+ $tale-height: optional_nth($tale, 4, 0)
8
8
  $parent-boder-width: optional_nth($tale, 5, 0)
9
9
  //$tale-position-manual
10
10
  $tale-position-manual-direction1: optional_nth($tale-position-manual, 1)
@@ -13,7 +13,6 @@
13
13
  $tale-position-manual-value2: optional_nth($tale-position-manual, 4)
14
14
  //$tale-border
15
15
  $tale-border-color: optional_nth($tale-border, 1)
16
- $tale-border-width: optional_nth($tale-border, 2)
17
16
  &:#{if($tale-border, after, before)}
18
17
  position: absolute
19
18
  content: ""
@@ -24,14 +23,11 @@
24
23
  +border(reverse($tale-direction), $tale-color)
25
24
  @if position_vertical($tale-direction)
26
25
  // 矢印の向きが上下
26
+ +rem($tale-direction, $tale-height*2*-1 - if($tale-border, 0, $parent-boder-width))
27
27
  @if not $tale-position-manual or (length($tale-position-manual) == 2 and position_vertical($tale-position-manual-direction1))
28
28
  // manual が 一つだけ指定 上下方向 の場合
29
29
  left: 50%
30
30
  +rem('margin-left', $tale-width*-1)
31
- @if $tale-direction == top
32
- +rem($tale-direction, $tale-height*-1*2 + $parent-boder-width)
33
- @else
34
- +rem($tale-direction, $tale-height*-1*2 + $parent-boder-width*2)
35
31
  @if $tale-position-manual
36
32
  $tale-position-manuals: ($tale-position-manual-direction1: $tale-position-manual-value1, $tale-position-manual-direction2: $tale-position-manual-value2)
37
33
  @each $key, $value in $tale-position-manuals
@@ -46,11 +42,11 @@
46
42
  +rem($key, $value - if($tale-border, 0, $parent-boder-width))
47
43
  @if position_horizontal($tale-direction)
48
44
  // 矢印の向きが左右
45
+ +rem($tale-direction, $tale-width*2*-1 - if($tale-border, 0, $parent-boder-width))
49
46
  @if not $tale-position-manual or (length($tale-position-manual) == 2 and position_horizontal($tale-position-manual-direction1))
50
47
  // manual が 一つだけ指定 上下方向 の場合
51
48
  top: 50%
52
49
  +rem('margin-top', $tale-height*-1)
53
- +rem($tale-direction, $tale-width*-1*2 - if($tale-border, 0, $parent-boder-width))
54
50
  @if $tale-position-manual
55
51
  $tale-position-manuals: ($tale-position-manual-direction1: $tale-position-manual-value1, $tale-position-manual-direction2: $tale-position-manual-value2)
56
52
  @each $key, $value in $tale-position-manuals
@@ -67,51 +63,50 @@
67
63
  @if $tale-border
68
64
  // tale border があるとき - 以下 tale-border の設定
69
65
  &:before
66
+ $tale-border-width: $tale-width + round($parent-boder-width*1.5)
67
+ $tale-border-height: $tale-height + round($parent-boder-width*1.5)
70
68
  position: absolute
71
69
  content: ""
72
70
  display: block
73
71
  +border(all, solid transparent)
74
- +border(horizontal, $tale-width + $tale-border-width)
75
- +border(vertical, $tale-height + $tale-border-width)
72
+ +border(horizontal, $tale-border-width)
73
+ +border(vertical, $tale-border-height)
76
74
  +border(reverse($tale-direction), $tale-border-color)
77
75
  @if position_vertical($tale-direction)
78
76
  // 矢印の向きが上下
77
+ +rem($tale-direction, $tale-border-height*2*-1)
79
78
  @if not $tale-position-manual or (length($tale-position-manual) == 2 and position_vertical($tale-position-manual-direction1))
80
- // manual 一つだけ指定 上下方向 の場合
79
+ // manual なし もしくは 一つだけ指定 上下方向 の場合
81
80
  left: 50%
82
- +rem('margin-left', $tale-width*-1 - $tale-border-width)
83
- @if $tale-direction == top
84
- +rem($tale-direction, $tale-height*-1*2 - $tale-border-width*1.5)
85
- @else
86
- +rem($tale-direction, $tale-height*-1*2 - $tale-border-width)
81
+ +rem('margin-left', $tale-border-width*-1)
87
82
  @if $tale-position-manual
88
83
  $tale-position-manuals: ($tale-position-manual-direction1: $tale-position-manual-value1, $tale-position-manual-direction2: $tale-position-manual-value2)
89
84
  @each $key, $value in $tale-position-manuals
90
85
  @if position_horizontal($key)
91
86
  // manual が left or right の場合
92
- +rem($key, $value - $tale-border-width)
87
+ +rem($key, $value - $parent-boder-width*1.5)
93
88
  @else if $tale-direction == $key
94
89
  // 矢印の向きと manual で指定する方向が同じ場合
95
- +rem($key, $value - $tale-height - $tale-border-width*2)
90
+ +rem($key, $value - $tale-height - $parent-boder-width*3)
96
91
  @else if reverse($tale-direction) == $key
97
92
  // 上向き矢印 で manual が bottom の場合 or 下向き矢印 で manual が top の場合
98
93
  +rem($key, $value)
99
94
  @if position_horizontal($tale-direction)
100
95
  // 矢印の向きが左右
96
+ +rem($tale-direction, $tale-border-width*2*-1)
101
97
  @if not $tale-position-manual or (length($tale-position-manual) == 2 and position_horizontal($tale-position-manual-direction1))
102
- // manual 一つだけ指定 上下方向 の場合
98
+ // manual なし もしくは 一つだけ指定 左右方向 の場合
103
99
  top: 50%
104
- +rem('margin-top', $tale-height*-1 - $tale-border-width)
105
- +rem($tale-direction, $tale-width*-1*2 - $tale-border-width*2)
100
+ +rem('margin-top', $tale-border-height*-1)
106
101
  @if $tale-position-manual
107
102
  $tale-position-manuals: ($tale-position-manual-direction1: $tale-position-manual-value1, $tale-position-manual-direction2: $tale-position-manual-value2)
108
103
  @each $key, $value in $tale-position-manuals
109
104
  @if position_vertical($key)
110
105
  // manual が top or bottom の場合
111
- +rem($key, $value - $tale-border-width)
106
+ +rem($key, $value - $parent-boder-width*1.5)
112
107
  @else if $tale-direction == $key
113
108
  // 矢印の向きと manual で指定する方向が同じ場合
114
- +rem($key, $value - $tale-width - $tale-border-width*2)
109
+ +rem($key, $value - $tale-width - $parent-boder-width*3)
115
110
  @else if reverse($tale-direction) == $key
116
111
  // 左向き矢印 で manual が right の場合 or 右向き矢印 で manual が left の場合
117
112
  +rem($key, $value)
@@ -0,0 +1,3 @@
1
+ =center-image
2
+ display: block
3
+ +margin(horizontal, auto)
@@ -1,14 +1,30 @@
1
- =table($margin-bottom: 24px, $table-scroll: null)
2
- min-width: 100%
3
- +rem('margin-bottom', $margin-bottom)
4
- @if $table-scroll
5
- min-width: 100%
6
- @else
7
- width: 100%
8
-
9
- =table-cell($vertical-align: middle, $padding: 8px 12px, $is-nowrap: null)
1
+ =table-cell-assign($value)
2
+ $padding: if(list($value), if(unit_number(nth($value, 1)), $value, null), if(unit_number($value), $value, null))
3
+ white-space: if(white_space($value), $value, null)
4
+ background-color: if(color($value), $value, null)
5
+ vertical-align: if(vertical_align($value), $value, null)
10
6
  +rem('padding', $padding)
11
- vertical-align: $vertical-align
7
+
8
+ // +table-row($white #eeeeee, (bottom, solid 1px black))
9
+ =table-row($value1, $value2)
10
+ @if $value1
11
+ @if list($value1)
12
+ &:nth-child(odd)
13
+ background-color: nth($value1, 1)
14
+ &:nth-child(even)
15
+ background-color: nth($value1, 2)
16
+ @else if color($value1)
17
+ background-color: nth($value1, 1)
18
+ @if $value2
19
+ +border(nth($value2, 1), nth($value2, 2))
20
+
21
+ // +table-cell(middle (12px 16px) no_wrap $white, (14px 1.8 1.4em, black bold center), (bottom, solid 1px black))
22
+ =table-cell($value1, $value2, $value3)
12
23
  +box-sizing(border-box)
13
- @if $is-nowrap
14
- white-space: nowrap
24
+ @if $value1
25
+ @for $i from 1 through length($value1)
26
+ +table-cell-assign(nth($value1, $i))
27
+ @if $value2
28
+ +text-block(nth($value2, 1), optional_nth($value2, 2, false))
29
+ @if $value3
30
+ +border(nth($value3, 1), nth($value3, 2))
@@ -3,6 +3,7 @@
3
3
  font-weight: if(font_weight($value), $value, null)
4
4
  text-align: if(text_align($value), $value, null)
5
5
  color: if(color($value), $value, null)
6
+ white-space: if(white_space($value), $value, null)
6
7
  @if px($value)
7
8
  +top($value, null)
8
9
 
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.5.14
4
+ version: 0.5.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - machida
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-30 00:00:00.000000000 Z
11
+ date: 2014-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass-rails
@@ -362,14 +362,15 @@ files:
362
362
  - vendor/assets/stylesheets/settings/mixins/_basic-font.css.sass
363
363
  - vendor/assets/stylesheets/settings/mixins/_block.css.sass
364
364
  - vendor/assets/stylesheets/settings/mixins/_border.css.sass
365
- - vendor/assets/stylesheets/settings/mixins/_button-base.css.sass
365
+ - vendor/assets/stylesheets/settings/mixins/_button.css.sass
366
366
  - vendor/assets/stylesheets/settings/mixins/_color.css.sass
367
367
  - vendor/assets/stylesheets/settings/mixins/_filters.css.sass
368
368
  - vendor/assets/stylesheets/settings/mixins/_form.css.sass
369
369
  - vendor/assets/stylesheets/settings/mixins/_grids.css.sass
370
370
  - vendor/assets/stylesheets/settings/mixins/_html5-input-types.scss
371
371
  - vendor/assets/stylesheets/settings/mixins/_ie-hacks.css.sass
372
- - vendor/assets/stylesheets/settings/mixins/_lines.css.sass
372
+ - vendor/assets/stylesheets/settings/mixins/_image.css.sass
373
+ - vendor/assets/stylesheets/settings/mixins/_line.css.sass
373
374
  - vendor/assets/stylesheets/settings/mixins/_link.css.sass
374
375
  - vendor/assets/stylesheets/settings/mixins/_list.css.sass
375
376
  - vendor/assets/stylesheets/settings/mixins/_margin-padding.css.sass