oulu-rails 0.5.22 → 0.5.23

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: a41503a22bfaa91c20a0822774a841b66bcc0d3f
4
- data.tar.gz: 17b8f2144bd3c27d56cdebb3be47778aa18cd246
3
+ metadata.gz: 7cc02577935cc850eb539e0018cf8f19b3c870c7
4
+ data.tar.gz: 9cf37168a8a6b39a5708850c6c53d25e08cedf20
5
5
  SHA512:
6
- metadata.gz: 58c59c6439d5143affc3770a3eaac125e20545c581714a78a67366b90b4672719f094aef77e400c96481358776323dc5c2355e47719f74cf23291db7920ab2af
7
- data.tar.gz: 607c29b656b466f90cc973ca92a985c0707d7fe5a27c6b08e3885635bc734715212d6db061e98780825693db0823f42d31f90991c677e920890dc46f4a30442c
6
+ metadata.gz: f929bd6881fd463834e7da5d069181492c8ddd1d62033ce157ed9594d06f7bbc3ef72dea3878a9b9a634f5daa189551f99506e0aa50df44817b5a2366a258255
7
+ data.tar.gz: 0c4fecbc0fb96a0934d46a8b92adc99fefbc3ee09fca014074313dcd7bb485c04727778b5f6a1c022f28f965bd224da1c01d929bf7397d4f2abd85d60fb33775
@@ -1,3 +1,3 @@
1
1
  module OuluRails
2
- VERSION = "0.5.22"
2
+ VERSION = "0.5.23"
3
3
  end
@@ -46,6 +46,7 @@
46
46
  @import settings/functions/background
47
47
  @import settings/functions/border
48
48
  @import settings/functions/animation
49
+ @import settings/functions/grid
49
50
 
50
51
  // mixins
51
52
  ///////////////////
@@ -0,0 +1,34 @@
1
+ @function gutter_width($value)
2
+ @if $value == 0 or px($value)
3
+ @return true
4
+ @else
5
+ @return null
6
+
7
+ @function columns_count($value)
8
+ @if unitless_number($value)
9
+ @if $value > 0
10
+ @return true
11
+ @else
12
+ @return null
13
+ @else
14
+ @return null
15
+
16
+ @function break_point($value)
17
+ @if string($value) and ($value == 'xs' or $value == 'sm' or $value == 'md' or $value == 'lg' or $value == 'xl')
18
+ @return true
19
+ @else if list($value) and (nth($value, 1) == 'xs' or nth($value, 1) == 'sm' or nth($value, 1) == 'md' or nth($value, 1) == 'lg' or nth($value, 1) == 'xl')
20
+ @return true
21
+ @else
22
+ @return null
23
+
24
+ @function row_class_name($value)
25
+ @if string($value) and str-slice($value, 1, 1) == ('.')
26
+ @return true
27
+ @else
28
+ @return null
29
+
30
+ @function offsets($value)
31
+ @if string($value) and $value == offsets
32
+ @return true
33
+ @else
34
+ @return null
@@ -38,7 +38,6 @@ $screen-md-max: ($screen-lg-min - 1) !default
38
38
  @media only screen and (max-width: $screen-lg)
39
39
  @content
40
40
 
41
-
42
41
  // カラムのラッパーのクラス名
43
42
  $row-class-name: '.row' !default
44
43
  // カラムのネームスペース ※classの".(カンマ)"もネームスペースの一部
@@ -50,6 +49,7 @@ $break-point-xs-namespace: 'xs-' !default
50
49
  $break-point-sm-namespace: 'sm-' !default
51
50
  $break-point-md-namespace: 'md-' !default
52
51
  $break-point-lg-namespace: 'lg-' !default
52
+ $break-point-xl-namespace: 'xl-' !default
53
53
 
54
54
  // ブレイクポイントを配列にする
55
55
  $break-points: $break-point-xs-namespace, $break-point-sm-namespace, $break-point-md-namespace, $break-point-lg-namespace
@@ -67,7 +67,7 @@ $break-points: $break-point-xs-namespace, $break-point-sm-namespace, $break-poin
67
67
  @else if $screen-lg and $break-point == $break-point-lg-namespace
68
68
  @media only screen and (min-width: $screen-md)
69
69
  @content
70
- @else if $screen-xl and $break-point == $break-point-xl-namespace
70
+ @else if $break-point == $break-point-xl-namespace
71
71
  @media only screen and (min-width: $screen-lg)
72
72
  @content
73
73
 
@@ -77,24 +77,18 @@ $break-points: $break-point-xs-namespace, $break-point-sm-namespace, $break-poin
77
77
  +margin(horizontal, ($gutter-width / 2) * -1)
78
78
  // clearfix
79
79
  +rem('min-height', 1px)
80
- &:before,
81
- &:after
82
- display: table
83
- content: " "
84
- &:after
85
- clear: both
80
+ +pie-clearfix
86
81
 
87
82
  // カラムの基本設定
88
83
  =column($number, $columns-gutter-width: $gutter-width)
89
84
  +rem('width', 100 / $columns-count * $number * 1%)
90
- +rem('min-height', 1px)
91
85
  +padding(horizontal, $columns-gutter-width / 2)
92
- float: left
93
86
  +box-sizing(border-box)
87
+ float: left
94
88
 
95
89
  // カラムをサイズごとに作る
96
90
  @each $break-point in $break-points
97
- +break-points(#{$break-point})
91
+ +break-points($break-point)
98
92
  @for $i from 1 through $columns-count
99
93
  #{$column-namespace}#{$break-point}#{$i}
100
94
  +column($i)
@@ -105,47 +99,46 @@ $break-points: $break-point-xs-namespace, $break-point-sm-namespace, $break-poin
105
99
 
106
100
  // オフセットカラムをサイズごとに作る
107
101
  @each $break-point in $break-points
108
- +break-points(#{$break-point})
102
+ +break-points($break-point)
109
103
  @for $i from 1 through $columns-count
110
104
  #{$column-namespace}#{$break-point}#{$column-offset-namespace}#{$i}
111
105
  +column-offset($i)
112
106
 
113
- function
114
-
115
- =grid-columns($columns-gutter-width: $gutter-width, $grid-columns-row-class-name: '.row')
116
- #{$grid-columns-row-class-name}
117
- // カラムのマージン分だけ両サイドにネガティブマージンを取る
118
- +margin(horizontal, ($columns-gutter-width / 2) * -1)
119
- // clearfix
120
- +rem('min-height', 1px)
121
- &:before,
122
- &:after
123
- display: table
124
- content: " "
125
- &:after
126
- clear: both
127
- // カラムをサイズごとに作る
128
- @each $break-point in $break-points
129
- +break-points(#{$break-point})
130
- @for $i from 1 through $columns-count
131
- #{$column-namespace}#{$break-point}#{$i}
132
- +column($i, $columns-gutter-width)
133
-
134
- =grid-column-offsets($columns-gutter-width: $gutter-width, $grid-columns-row-class-name: '.row')
107
+ =grid-columns($values)
108
+ $columns-gutter-width: 0 !default
109
+ $temp-columns-count: 12 !default
110
+ $temp-break-points: 'xs', 'sm', 'md', 'lg' !default
111
+ $grid-columns-row-class-name: '.row' !default
112
+ $offsets: false !default
113
+ @for $i from 1 through length($values)
114
+ @if gutter_width(nth($values, $i))
115
+ $columns-gutter-width: nth($values, $i)
116
+ @else if columns_count(nth($values, $i))
117
+ $temp-columns-count: nth($values, $i)
118
+ @else if break_point(nth($values, $i))
119
+ $temp-break-points: nth($values, $i)
120
+ @else if row_class_name(nth($values, $i))
121
+ $grid-columns-row-class-name: nth($values, $i)
122
+ @else if offsets(nth($values, $i))
123
+ $offsets: nth($values, $i)
135
124
  #{$grid-columns-row-class-name}
136
125
  // カラムのマージン分だけ両サイドにネガティブマージンを取る
137
126
  +margin(horizontal, ($columns-gutter-width / 2) * -1)
138
- // clearfix
139
- +rem('min-height', 1px)
140
- &:before,
141
- &:after
142
- display: table
143
- content: " "
144
- &:after
145
- clear: both
146
- // オフセットカラムをサイズごとに作る
147
- @each $break-point in $break-points
148
- +break-points(#{$break-point})
149
- @for $i from 1 through $columns-count
150
- #{$column-namespace}#{$break-point}#{$column-offset-namespace}#{$i}
151
- +column-offset($i)
127
+ +pie-clearfix
128
+ // カラムをサイズごとに作る
129
+ $break-points: ()
130
+ @each $temp-break-point in $temp-break-points
131
+ $break-points: append($break-points, if($temp-break-point == 'xs', $break-point-xs-namespace, null))
132
+ $break-points: append($break-points, if($temp-break-point == 'sm', $break-point-sm-namespace, null))
133
+ $break-points: append($break-points, if($temp-break-point == 'md', $break-point-md-namespace, null))
134
+ $break-points: append($break-points, if($temp-break-point == 'lg', $break-point-lg-namespace, null))
135
+ $break-points: append($break-points, if($temp-break-point == 'xl', $break-point-xl-namespace, null))
136
+ content: $temp-columns-count
137
+ @each $break-point in $break-points
138
+ +break-points($break-point)
139
+ @for $i from 1 through $temp-columns-count
140
+ #{$column-namespace}#{$break-point}#{$i}
141
+ +column($i, $columns-gutter-width)
142
+ @if $offsets
143
+ #{$column-namespace}#{$break-point}#{$column-offset-namespace}#{$i}
144
+ +column-offset($i)
@@ -1,4 +1,4 @@
1
- // https://github.com/twbs/bootstrap-sass/blob/master/vendor/assets/stylesheets/bootstrap/_responsive-utilities.scss
1
+ // https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/bootstrap/_responsive-utilities.scss
2
2
 
3
3
  =responsive-visibility($parent)
4
4
  #{$parent}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oulu-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.22
4
+ version: 0.5.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - machida
@@ -348,6 +348,7 @@ files:
348
348
  - vendor/assets/stylesheets/settings/functions/_color.css.sass
349
349
  - vendor/assets/stylesheets/settings/functions/_content.css.sass
350
350
  - vendor/assets/stylesheets/settings/functions/_cursor.css.sass
351
+ - vendor/assets/stylesheets/settings/functions/_grid.css.sass
351
352
  - vendor/assets/stylesheets/settings/functions/_image.css.sass
352
353
  - vendor/assets/stylesheets/settings/functions/_length.css.sass
353
354
  - vendor/assets/stylesheets/settings/functions/_list.css.sass