oulu-rails 0.6.33 → 0.7.1

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: 913d2926042b17e0387b3d152c9e5af3b5dc4722
4
- data.tar.gz: 1977caa16d332a16ef452615efdddf5e02510cf8
3
+ metadata.gz: 8f1c93be9431f5462d4e20157fa35c3b0c8a5104
4
+ data.tar.gz: d812a338c8cc9ad57f78f49f3c3849ae78e8bc62
5
5
  SHA512:
6
- metadata.gz: 360c71129e2b7c0e1bf8774914ceef80759f3e7265d0c34a0e46fa2a74d63257e26a9b1b9cfdfc0365be9b99ca275e6de7e7276b755402c532e37d129c8f0290
7
- data.tar.gz: ec6440350c3084e8573ceab079890a17c1b9522d44d4b23a3f89ad3bb801bca664326ed143597fbc9e9a1474ff3f435bfa37a7639ce67a546a4a4cf99eab4b6f
6
+ metadata.gz: dc02cc17f7d94f2d8ddb6042aaf474e958b98e52ee628744186f506a9ed3bbfef92f0647c6e45973ac361c70ae709590128fc2f7364cf94142db30951a761404
7
+ data.tar.gz: 56146d3acc15802ef3bad9ea225d731572a7eded3aa30bbd227b03b34fd08dc77fe153f29b8e9b331490301dbf9b0d8516c8acc7e6a4d3584fbfabc0dda45b9d
@@ -1,3 +1,3 @@
1
1
  module OuluRails
2
- VERSION = "0.6.33"
2
+ VERSION = "0.7.1"
3
3
  end
@@ -29,7 +29,7 @@
29
29
  @import settings/functions/background
30
30
  @import settings/functions/border
31
31
  @import settings/functions/animation
32
- @import settings/functions/grid
32
+ //@import settings/functions/grid
33
33
 
34
34
  // mixins
35
35
  ///////////////////
@@ -49,7 +49,9 @@
49
49
  @import settings/mixins/balloon-tail
50
50
  @import settings/mixins/margin-padding
51
51
  @import settings/mixins/animation
52
- @import settings/mixins/grids
52
+ @import settings/mixins/grid/grid-framework
53
+ @import settings/mixins/grid/grid
54
+ @import settings/mixins/grid
53
55
  @import settings/mixins/responsive-utilities
54
56
  @import settings/mixins/background
55
57
  @import settings/mixins/line
@@ -1,7 +1,7 @@
1
1
  body
2
2
  // layout
3
3
  .has-no-gutter-grids
4
- +grid-columns(0)
4
+ +gird(0)
5
5
  .is-horizontal-center-block
6
6
  display: block
7
7
  +margin(horizontal, auto)
@@ -27,7 +27,7 @@
27
27
  $border-width: 0
28
28
  +text-block($font-size $height - ($border-width*2))
29
29
  +rem('height', $height)
30
- +padding(horizontal, $height/2)
30
+ +padding(horizontal, $height/1.6)
31
31
  @if $border-radius
32
32
  +border-radius($border-radius)
33
33
  @if $font-size > 12px
@@ -1,3 +1,5 @@
1
+ body
2
+ content: #{luma(#f2f2f2)}
1
3
  =flat-emboss-button($color: blue)
2
4
  +transition(.5s (background-image))
3
5
  background-color: $color
@@ -5,19 +7,19 @@
5
7
  box-shadow: shade($color, 18%) 0 3px 0
6
8
  text-shadow: if(luma_bright($color), lighten($color, 8%) 0 1px 0, darken($color, 8%) 0 -1px 0)
7
9
  &:hover,
8
- .hover,
9
- .is-hover
10
+ &.hover,
11
+ &.is-hover
10
12
  $color: lighten($color, 6%)
11
- @if $color == white
12
- background-color: #f4f4f4
13
+ @if luma($color) > 90
14
+ background-color: #f2f2f2
13
15
  @else
14
16
  background-color: $color
15
17
  &:active,
16
- .active,
17
- .is-active
18
+ &.active,
19
+ &.is-active
18
20
  $color: lighten($color, 6%)
19
- @if $color == white
20
- background-color: #f4f4f4
21
+ @if luma($color) > 90
22
+ background-color: #f2f2f2
21
23
  @else
22
24
  background-color: $color
23
25
  box-shadow: shade($color, 18%) 0 2px 0
@@ -16,7 +16,7 @@
16
16
 
17
17
  =normal-button($color: blue)
18
18
  +transition(.5s (background-image))
19
- @if $color == white
19
+ @if luma($color) > 90
20
20
  +normal-button-color(#f2f2f2)
21
21
  @else
22
22
  +normal-button-color($color)
@@ -24,7 +24,7 @@
24
24
  &:hover,
25
25
  &.hover,
26
26
  &.is-hover
27
- @if $color == white
27
+ @if luma($color) > 90
28
28
  +normal-button-color(lighten(#f2f2f2, 5%), false)
29
29
  @else
30
30
  +normal-button-color(lighten($color, 5%), false)
@@ -32,7 +32,7 @@
32
32
  &.active,
33
33
  &.is-active
34
34
  +top(1px)
35
- @if $color == white
35
+ @if luma($color) > 90
36
36
  $color: lighten(#f2f2f2, 7%)
37
37
  +normal-button-color($color, false)
38
38
  box-shadow: darken($color, 12%) 0 1px 0 inset, rgba(white, .3) 0 1px 1px
@@ -22,8 +22,8 @@
22
22
  @else
23
23
  @return null
24
24
 
25
+ // Adapted from: https://gist.github.com/voxpelli/6304812
25
26
  @function luma($color)
26
- // Adapted from: https://gist.github.com/voxpelli/6304812
27
27
  $rgba: red($color), green($color), blue($color)
28
28
  $rgba2: ()
29
29
  @for $i from 1 through 3
@@ -33,8 +33,6 @@
33
33
  $rgba2: append($rgba2, $rgb)
34
34
  @return (.2126 * nth($rgba2, 1) + .7152 * nth($rgba2, 2) + .0722 * nth($rgba2, 3))*100
35
35
 
36
- $ruma-threshold: 100 / pi() !default
37
-
38
36
  @function luma_contrast($color-1, $color-2: null)
39
37
  @if $color-2
40
38
  @if abs(luma($color-1) - luma($color-2)) > $ruma-threshold
@@ -66,8 +64,6 @@ $ruma-threshold: 100 / pi() !default
66
64
  @return null
67
65
 
68
66
  @function luma_contrast_color($color)
69
- $luma-contrast-bright-color: #000000 !default
70
- $luma-contrast-dark-color: #ffffff !default
71
67
  @if luma_which($color) == bright
72
68
  @return $luma-contrast-bright-color
73
69
  @else
@@ -0,0 +1,88 @@
1
+ //
2
+ // Grid system
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Container widths
7
+ //
8
+ // Set the container width, and override it for fixed navbars in media queries.
9
+
10
+ .container
11
+ +container-fixed
12
+
13
+ @media (min-width: $screen-sm-min)
14
+ width: $container-sm
15
+
16
+ @media (min-width: $screen-md-min)
17
+ width: $container-md
18
+
19
+ @media (min-width: $screen-lg-min)
20
+ width: $container-lg
21
+
22
+
23
+
24
+ // Fluid container
25
+ //
26
+ // Utilizes the mixin meant for fixed width containers, but without any defined
27
+ // width for fluid, full width layouts.
28
+
29
+ .container-fluid
30
+ +container-fixed
31
+
32
+
33
+ // Row
34
+ //
35
+ // Rows contain and clear the floats of your columns.
36
+
37
+ .row
38
+ +make-row
39
+
40
+
41
+ // Columns
42
+ //
43
+ // Common styles for small and large grid columns
44
+
45
+ +make-grid-columns
46
+
47
+
48
+ // Extra small grid
49
+ //
50
+ // Columns, offsets, pushes, and pulls for extra small devices like
51
+ // smartphones.
52
+
53
+ +make-grid(xs)
54
+
55
+
56
+ // Small grid
57
+ //
58
+ // Columns, offsets, pushes, and pulls for the small device range, from phones
59
+ // to tablets.
60
+
61
+ @media (min-width: $screen-sm-min)
62
+ +make-grid(sm)
63
+
64
+
65
+ // Medium grid
66
+ //
67
+ // Columns, offsets, pushes, and pulls for the desktop device range.
68
+
69
+ @media (min-width: $screen-md-min)
70
+ +make-grid(md)
71
+
72
+
73
+ // Large grid
74
+ //
75
+ // Columns, offsets, pushes, and pulls for the large desktop device range.
76
+
77
+ @media (min-width: $screen-lg-min)
78
+ +make-grid(lg)
79
+
80
+ .row,
81
+ [class^="col-"]
82
+ box-sizing: border-box
83
+
84
+ =gird($gutter-size)
85
+ &.row
86
+ +margin(horizontal, $gutter-size/2 * -1)
87
+ >[class^="col-"]
88
+ +padding(horizontal, $gutter-size/2)
@@ -1,3 +1,21 @@
1
+ // device
2
+ =screen-xs
3
+ @media only screen and (max-width: $screen-xs)
4
+ @content
5
+ =screen-sm
6
+ @media only screen and (max-width: $screen-sm)
7
+ @content
8
+ =screen-md
9
+ @media only screen and (max-width: $screen-md)
10
+ @content
11
+ =screen-lg
12
+ @media only screen and (max-width: $screen-lg)
13
+ @content
14
+ =screen-xl
15
+ @media only screen and (min-width: $screen-lg)
16
+ @content
17
+
18
+
1
19
  // https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/bootstrap/_responsive-utilities.scss
2
20
 
3
21
  =responsive-visibility($parent)
@@ -0,0 +1,81 @@
1
+ // Framework grid generation
2
+ //
3
+ // Used only by Bootstrap to generate the correct number of grid classes given
4
+ // any value of `$grid-columns`.
5
+
6
+ // [converter] This is defined recursively in LESS, but Sass supports real loops
7
+ @mixin make-grid-columns($i: 1, $list: ".col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}") {
8
+ @for $i from (1 + 1) through $grid-columns {
9
+ $list: "#{$list}, .col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}";
10
+ }
11
+ #{$list} {
12
+ position: relative;
13
+ // Prevent columns from collapsing when empty
14
+ min-height: 1px;
15
+ // Inner gutter via padding
16
+ padding-left: ceil(($grid-gutter-width / 2));
17
+ padding-right: floor(($grid-gutter-width / 2));
18
+ }
19
+ }
20
+
21
+
22
+ // [converter] This is defined recursively in LESS, but Sass supports real loops
23
+ @mixin float-grid-columns($class, $i: 1, $list: ".col-#{$class}-#{$i}") {
24
+ @for $i from (1 + 1) through $grid-columns {
25
+ $list: "#{$list}, .col-#{$class}-#{$i}";
26
+ }
27
+ #{$list} {
28
+ float: left;
29
+ }
30
+ }
31
+
32
+
33
+ @mixin calc-grid-column($index, $class, $type) {
34
+ @if ($type == width) and ($index > 0) {
35
+ .col-#{$class}-#{$index} {
36
+ width: percentage(($index / $grid-columns));
37
+ }
38
+ }
39
+ @if ($type == push) and ($index > 0) {
40
+ .col-#{$class}-push-#{$index} {
41
+ left: percentage(($index / $grid-columns));
42
+ }
43
+ }
44
+ @if ($type == push) and ($index == 0) {
45
+ .col-#{$class}-push-0 {
46
+ left: auto;
47
+ }
48
+ }
49
+ @if ($type == pull) and ($index > 0) {
50
+ .col-#{$class}-pull-#{$index} {
51
+ right: percentage(($index / $grid-columns));
52
+ }
53
+ }
54
+ @if ($type == pull) and ($index == 0) {
55
+ .col-#{$class}-pull-0 {
56
+ right: auto;
57
+ }
58
+ }
59
+ @if ($type == offset) {
60
+ .col-#{$class}-offset-#{$index} {
61
+ margin-left: percentage(($index / $grid-columns));
62
+ }
63
+ }
64
+ }
65
+
66
+ // [converter] This is defined recursively in LESS, but Sass supports real loops
67
+ @mixin loop-grid-columns($columns, $class, $type) {
68
+ @for $i from 0 through $columns {
69
+ @include calc-grid-column($i, $class, $type);
70
+ }
71
+ }
72
+
73
+
74
+ // Create grid for specific class
75
+ @mixin make-grid($class) {
76
+ @include float-grid-columns($class);
77
+ @include loop-grid-columns($grid-columns, $class, width);
78
+ @include loop-grid-columns($grid-columns, $class, pull);
79
+ @include loop-grid-columns($grid-columns, $class, push);
80
+ @include loop-grid-columns($grid-columns, $class, offset);
81
+ }
@@ -0,0 +1,122 @@
1
+ // Grid system
2
+ //
3
+ // Generate semantic grid columns with these mixins.
4
+
5
+ // Centered container element
6
+ @mixin container-fixed($gutter: $grid-gutter-width) {
7
+ margin-right: auto;
8
+ margin-left: auto;
9
+ padding-left: ($gutter / 2);
10
+ padding-right: ($gutter / 2);
11
+ @include clearfix;
12
+ }
13
+
14
+ // Creates a wrapper for a series of columns
15
+ @mixin make-row($gutter: $grid-gutter-width) {
16
+ margin-left: ceil(($gutter / -2));
17
+ margin-right: floor(($gutter / -2));
18
+ @include clearfix;
19
+ }
20
+
21
+ // Generate the extra small columns
22
+ @mixin make-xs-column($columns, $gutter: $grid-gutter-width) {
23
+ position: relative;
24
+ float: left;
25
+ width: percentage(($columns / $grid-columns));
26
+ min-height: 1px;
27
+ padding-left: ($gutter / 2);
28
+ padding-right: ($gutter / 2);
29
+ }
30
+ @mixin make-xs-column-offset($columns) {
31
+ margin-left: percentage(($columns / $grid-columns));
32
+ }
33
+ @mixin make-xs-column-push($columns) {
34
+ left: percentage(($columns / $grid-columns));
35
+ }
36
+ @mixin make-xs-column-pull($columns) {
37
+ right: percentage(($columns / $grid-columns));
38
+ }
39
+
40
+ // Generate the small columns
41
+ @mixin make-sm-column($columns, $gutter: $grid-gutter-width) {
42
+ position: relative;
43
+ min-height: 1px;
44
+ padding-left: ($gutter / 2);
45
+ padding-right: ($gutter / 2);
46
+
47
+ @media (min-width: $screen-sm-min) {
48
+ float: left;
49
+ width: percentage(($columns / $grid-columns));
50
+ }
51
+ }
52
+ @mixin make-sm-column-offset($columns) {
53
+ @media (min-width: $screen-sm-min) {
54
+ margin-left: percentage(($columns / $grid-columns));
55
+ }
56
+ }
57
+ @mixin make-sm-column-push($columns) {
58
+ @media (min-width: $screen-sm-min) {
59
+ left: percentage(($columns / $grid-columns));
60
+ }
61
+ }
62
+ @mixin make-sm-column-pull($columns) {
63
+ @media (min-width: $screen-sm-min) {
64
+ right: percentage(($columns / $grid-columns));
65
+ }
66
+ }
67
+
68
+ // Generate the medium columns
69
+ @mixin make-md-column($columns, $gutter: $grid-gutter-width) {
70
+ position: relative;
71
+ min-height: 1px;
72
+ padding-left: ($gutter / 2);
73
+ padding-right: ($gutter / 2);
74
+
75
+ @media (min-width: $screen-md-min) {
76
+ float: left;
77
+ width: percentage(($columns / $grid-columns));
78
+ }
79
+ }
80
+ @mixin make-md-column-offset($columns) {
81
+ @media (min-width: $screen-md-min) {
82
+ margin-left: percentage(($columns / $grid-columns));
83
+ }
84
+ }
85
+ @mixin make-md-column-push($columns) {
86
+ @media (min-width: $screen-md-min) {
87
+ left: percentage(($columns / $grid-columns));
88
+ }
89
+ }
90
+ @mixin make-md-column-pull($columns) {
91
+ @media (min-width: $screen-md-min) {
92
+ right: percentage(($columns / $grid-columns));
93
+ }
94
+ }
95
+
96
+ // Generate the large columns
97
+ @mixin make-lg-column($columns, $gutter: $grid-gutter-width) {
98
+ position: relative;
99
+ min-height: 1px;
100
+ padding-left: ($gutter / 2);
101
+ padding-right: ($gutter / 2);
102
+
103
+ @media (min-width: $screen-lg-min) {
104
+ float: left;
105
+ width: percentage(($columns / $grid-columns));
106
+ }
107
+ }
108
+ @mixin make-lg-column-offset($columns) {
109
+ @media (min-width: $screen-lg-min) {
110
+ margin-left: percentage(($columns / $grid-columns));
111
+ }
112
+ }
113
+ @mixin make-lg-column-push($columns) {
114
+ @media (min-width: $screen-lg-min) {
115
+ left: percentage(($columns / $grid-columns));
116
+ }
117
+ }
118
+ @mixin make-lg-column-pull($columns) {
119
+ @media (min-width: $screen-lg-min) {
120
+ right: percentage(($columns / $grid-columns));
121
+ }
122
+ }
@@ -29,22 +29,74 @@ $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
35
36
  ////////////////
36
37
 
37
38
  // screens
39
+ //== Media queries breakpoints
40
+ //## Define the breakpoints at which your layout will change, adapting to different screen sizes.
41
+
42
+ // Extra small screen / phone
43
+ //** Deprecated `$screen-xs` as of v3.0.1
38
44
  $screen-xs: 480px !default
45
+ //** Deprecated `$screen-xs-min` as of v3.2.0
46
+ $screen-xs-min: $screen-xs !default
47
+ //** Deprecated `$screen-phone` as of v3.0.1
48
+ $screen-phone: $screen-xs-min !default
49
+
50
+ // Small screen / tablet
51
+ //** Deprecated `$screen-sm` as of v3.0.1
39
52
  $screen-sm: 768px !default
53
+ $screen-sm-min: $screen-sm !default
54
+ //** Deprecated `$screen-tablet` as of v3.0.1
55
+ $screen-tablet: $screen-sm-min !default
56
+
57
+ // Medium screen / desktop
58
+ //** Deprecated `$screen-md` as of v3.0.1
40
59
  $screen-md: 992px !default
60
+ $screen-md-min: $screen-md !default
61
+ //** Deprecated `$screen-desktop` as of v3.0.1
62
+ $screen-desktop: $screen-md-min !default
63
+
64
+ // Large screen / wide desktop
65
+ //** Deprecated `$screen-lg` as of v3.0.1
41
66
  $screen-lg: 1200px !default
67
+ $screen-lg-min: $screen-lg !default
68
+ //** Deprecated `$screen-lg-desktop` as of v3.0.1
69
+ $screen-lg-desktop: $screen-lg-min !default
42
70
 
43
- // 横一列の最大カラム数
44
- $columns-count: 12 !default
71
+ // So media queries don't overlap when required, provide a maximum
72
+ $screen-xs-max: ($screen-sm-min - 1) !default
73
+ $screen-sm-max: ($screen-md-min - 1) !default
74
+ $screen-md-max: ($screen-lg-min - 1) !default
75
+ $screen-lg-max: ($screen-lg-min - 1) !default
45
76
 
77
+ // 横一列の最大カラム数
78
+ $grid-columns: 12 !default
46
79
  // カラムとカラムの間のスペース
47
- $gutter-width: 50px !default
80
+ $grid-gutter-width: 32px
81
+
82
+
83
+ //== Container sizes
84
+ //## Define the maximum width of `.container` for different screen sizes.
85
+
86
+ // Small screen / tablet
87
+ $container-tablet: (720px + $grid-gutter-width) !default
88
+ //** For `$screen-sm-min` and up.
89
+ $container-sm: $container-tablet !default
90
+
91
+ // Medium screen / desktop
92
+ $container-desktop: (940px + $grid-gutter-width) !default
93
+ //** For `$screen-md-min` and up.
94
+ $container-md: $container-desktop !default
95
+
96
+ // Large screen / wide desktop
97
+ $container-large-desktop: (1140px + $grid-gutter-width) !default
98
+ //** For `$screen-lg-min` and up.
99
+ $container-lg: $container-large-desktop !default
48
100
 
49
101
  /////////////////
50
102
  // font
@@ -83,3 +135,10 @@ $twitter: #55acee
83
135
  $facebook: #3b5998
84
136
  $hatena: #008FDE
85
137
  $pocket: #f23c53
138
+
139
+ $default-text: black !default
140
+ $reversal-text: white !default
141
+
142
+ // luma contrast color
143
+ $luma-contrast-bright-color: $default-text !global
144
+ $luma-contrast-dark-color: $reversal-text !global
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.33
4
+ version: 0.7.1
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-29 00:00:00.000000000 Z
11
+ date: 2015-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass-rails
@@ -156,7 +156,7 @@ files:
156
156
  - vendor/assets/stylesheets/settings/mixins/_border.sass
157
157
  - vendor/assets/stylesheets/settings/mixins/_filters.sass
158
158
  - vendor/assets/stylesheets/settings/mixins/_form.sass
159
- - vendor/assets/stylesheets/settings/mixins/_grids.sass
159
+ - vendor/assets/stylesheets/settings/mixins/_grid.sass
160
160
  - vendor/assets/stylesheets/settings/mixins/_ie-hacks.sass
161
161
  - vendor/assets/stylesheets/settings/mixins/_image.sass
162
162
  - vendor/assets/stylesheets/settings/mixins/_line.sass
@@ -170,6 +170,8 @@ files:
170
170
  - vendor/assets/stylesheets/settings/mixins/_responsive-utilities.sass
171
171
  - vendor/assets/stylesheets/settings/mixins/_table.sass
172
172
  - vendor/assets/stylesheets/settings/mixins/_text.sass
173
+ - vendor/assets/stylesheets/settings/mixins/grid/_grid-framework.scss
174
+ - vendor/assets/stylesheets/settings/mixins/grid/_grid.scss
173
175
  - vendor/assets/stylesheets/settings/variables/_default.sass
174
176
  homepage: http://oulu.github.io/
175
177
  licenses: []
@@ -1,146 +0,0 @@
1
- // Extra small screen / phone
2
- //** Deprecated `$screen-xs-min` as of v3.2.0
3
- $screen-xs-min: $screen-xs !default
4
- //** Deprecated `$screen-phone` as of v3.0.1
5
- $screen-phone: $screen-xs-min !default
6
-
7
- // Small screen / tablet
8
- $screen-sm-min: $screen-sm !default
9
- //** Deprecated `$screen-tablet` as of v3.0.1
10
- $screen-tablet: $screen-sm-min !default
11
-
12
- // Medium screen / desktop
13
- $screen-md-min: $screen-md !default
14
- //** Deprecated `$screen-desktop` as of v3.0.1
15
- $screen-desktop: $screen-md-min !default
16
-
17
- // Large screen / wide desktop
18
- $screen-lg-min: $screen-lg !default
19
- //** Deprecated `$screen-lg-desktop` as of v3.0.1
20
- $screen-lg-desktop: $screen-lg-min !default
21
-
22
- // So media queries don't overlap when required, provide a maximum
23
- $screen-xs-max: ($screen-sm-min - 1) !default
24
- $screen-sm-max: ($screen-md-min - 1) !default
25
- $screen-md-max: ($screen-lg-min - 1) !default
26
- $screen-lg-max: ($screen-lg-min - 1) !default
27
-
28
- // device
29
- =screen-xs
30
- @media only screen and (max-width: $screen-xs)
31
- @content
32
- =screen-sm
33
- @media only screen and (max-width: $screen-sm)
34
- @content
35
- =screen-md
36
- @media only screen and (max-width: $screen-md)
37
- @content
38
- =screen-lg
39
- @media only screen and (max-width: $screen-lg)
40
- @content
41
- =screen-xl
42
- @media only screen and (min-width: $screen-lg)
43
- @content
44
-
45
- // カラムのラッパーのクラス名
46
- $row-class-name: '.row' !default
47
- // カラムのネームスペース ※classの".(カンマ)"もネームスペースの一部
48
- $column-namespace: '.col-' !default
49
- // オフセットカラムのネームスペース
50
- $column-offset-namespace: 'offset-' !default
51
- // ブレイクポイントごとのカラムのプレフィックスのネームスペース
52
- $break-point-xs-namespace: 'xs-' !default
53
- $break-point-sm-namespace: 'sm-' !default
54
- $break-point-md-namespace: 'md-' !default
55
- $break-point-lg-namespace: 'lg-' !default
56
- $break-point-xl-namespace: 'xl-' !default
57
-
58
- // ブレイクポイントを配列にする
59
- $break-points: $break-point-xs-namespace, $break-point-sm-namespace, $break-point-md-namespace, $break-point-lg-namespace, $break-point-xl-namespace
60
-
61
- // デバイスごとの media query を作る
62
- =break-points($break-point: $break-point-xs-namespace)
63
- @if $screen-xs and $break-point == $break-point-xs-namespace
64
- @content
65
- @else if $screen-sm and $break-point == $break-point-sm-namespace
66
- @media only screen and (min-width: $screen-xs)
67
- @content
68
- @else if $screen-md and $break-point == $break-point-md-namespace
69
- @media only screen and (min-width: $screen-sm)
70
- @content
71
- @else if $screen-lg and $break-point == $break-point-lg-namespace
72
- @media only screen and (min-width: $screen-md)
73
- @content
74
- @else if $screen-lg and $break-point == $break-point-xl-namespace
75
- @media only screen and (min-width: $screen-lg)
76
- @content
77
-
78
- // カラムのラッパーの設定
79
- #{$row-class-name}
80
- // カラムのマージン分だけ両サイドにネガティブマージンを取る
81
- +margin(horizontal, ($gutter-width / 2) * -1)
82
- +rem('min-height', 1px)
83
- +clearfix
84
-
85
- // カラムの基本設定
86
- =column($number, $columns-gutter-width: $gutter-width)
87
- +rem('width', 100 / $columns-count * $number * 1%)
88
- +padding(horizontal, $columns-gutter-width / 2)
89
- box-sizing: border-box
90
- float: left
91
-
92
- // カラムをサイズごとに作る
93
- @each $break-point in $break-points
94
- +break-points($break-point)
95
- @for $i from 1 through $columns-count
96
- #{$column-namespace}#{$break-point}#{$i}
97
- +column($i)
98
-
99
- // オフセットカラムの基本設定
100
- =column-offset($number)
101
- +rem('margin-left', 100 / $columns-count * $number * 1%)
102
-
103
- // オフセットカラムをサイズごとに作る
104
- @each $break-point in $break-points
105
- +break-points($break-point)
106
- @for $i from 1 through $columns-count
107
- #{$column-namespace}#{$break-point}#{$column-offset-namespace}#{$i}
108
- +column-offset($i)
109
-
110
- =grid-columns($values)
111
- $columns-gutter-width: 0 !default
112
- $temp-columns-count: 12 !default
113
- $temp-break-points: 'xs', 'sm', 'md', 'lg' !default
114
- $grid-columns-row-class-name: '.row' !default
115
- $offsets: false !default
116
- @for $i from 1 through length($values)
117
- @if gutter_width(nth($values, $i))
118
- $columns-gutter-width: nth($values, $i)
119
- @else if columns_count(nth($values, $i))
120
- $temp-columns-count: nth($values, $i)
121
- @else if break_point(nth($values, $i))
122
- $temp-break-points: nth($values, $i)
123
- @else if row_class_name(nth($values, $i))
124
- $grid-columns-row-class-name: nth($values, $i)
125
- @else if offsets(nth($values, $i))
126
- $offsets: nth($values, $i)
127
- #{$grid-columns-row-class-name}
128
- // カラムのマージン分だけ両サイドにネガティブマージンを取る
129
- +margin(horizontal, ($columns-gutter-width / 2) * -1)
130
- +clearfix
131
- // カラムをサイズごとに作る
132
- $break-points: ()
133
- @each $temp-break-point in $temp-break-points
134
- $break-points: append($break-points, if($temp-break-point == 'xs', $break-point-xs-namespace, null))
135
- $break-points: append($break-points, if($temp-break-point == 'sm', $break-point-sm-namespace, null))
136
- $break-points: append($break-points, if($temp-break-point == 'md', $break-point-md-namespace, null))
137
- $break-points: append($break-points, if($temp-break-point == 'lg', $break-point-lg-namespace, null))
138
- $break-points: append($break-points, if($temp-break-point == 'xl', $break-point-xl-namespace, null))
139
- @each $break-point in $break-points
140
- +break-points($break-point)
141
- @for $i from 1 through $temp-columns-count
142
- #{$column-namespace}#{$break-point}#{$i}
143
- +column($i, $columns-gutter-width)
144
- @if $offsets
145
- #{$column-namespace}#{$break-point}#{$column-offset-namespace}#{$i}
146
- +column-offset($i)