uniform-ui 1.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +5 -5
  2. data/lib/assets/config/manifest.js +1 -0
  3. data/lib/assets/javascripts/uniform/checkbox.js +31 -0
  4. data/lib/assets/javascripts/uniform/component.js +42 -0
  5. data/lib/assets/javascripts/uniform/dom-helpers.js +136 -0
  6. data/lib/assets/javascripts/uniform/dropdown.js +149 -0
  7. data/lib/assets/javascripts/uniform/floating-label.js +54 -0
  8. data/lib/assets/javascripts/uniform/icons.js +16 -0
  9. data/lib/assets/javascripts/uniform/modal.js +103 -0
  10. data/lib/assets/javascripts/uniform/resizer.js +43 -0
  11. data/lib/assets/javascripts/uniform/select.js +235 -0
  12. data/lib/assets/javascripts/uniform/tooltip.js +120 -0
  13. data/lib/assets/javascripts/uniform-es5.js +1 -0
  14. data/lib/assets/javascripts/uniform-jquery.js +124 -0
  15. data/lib/assets/javascripts/uniform.js +17 -0
  16. data/lib/assets/stylesheets/uniform/base.scss +3 -0
  17. data/lib/assets/stylesheets/uniform/components/alert.scss +72 -0
  18. data/lib/assets/stylesheets/uniform/components/buttons.scss +219 -0
  19. data/{vendor → lib}/assets/stylesheets/uniform/components/card.scss +33 -25
  20. data/lib/assets/stylesheets/uniform/components/container.scss +19 -0
  21. data/{vendor → lib}/assets/stylesheets/uniform/components/dropdown.scss +8 -4
  22. data/lib/assets/stylesheets/uniform/components/form/checkbox-collection.scss +103 -0
  23. data/lib/assets/stylesheets/uniform/components/form/checkbox.scss +58 -0
  24. data/lib/assets/stylesheets/uniform/components/form/floating-label.scss +64 -0
  25. data/lib/assets/stylesheets/uniform/components/form/input-group.scss +56 -0
  26. data/lib/assets/stylesheets/uniform/components/form.scss +143 -0
  27. data/lib/assets/stylesheets/uniform/components/grid.scss +158 -0
  28. data/lib/assets/stylesheets/uniform/components/label.scss +26 -0
  29. data/lib/assets/stylesheets/uniform/components/loaders.scss +80 -0
  30. data/{vendor → lib}/assets/stylesheets/uniform/components/modal.scss +26 -4
  31. data/lib/assets/stylesheets/uniform/components/nav.scss +124 -0
  32. data/lib/assets/stylesheets/uniform/components/row.scss +69 -0
  33. data/lib/assets/stylesheets/uniform/components/select.scss +122 -0
  34. data/lib/assets/stylesheets/uniform/components/table.scss +127 -0
  35. data/lib/assets/stylesheets/uniform/components/thumb.scss +41 -0
  36. data/lib/assets/stylesheets/uniform/components/tooltip.scss +63 -0
  37. data/lib/assets/stylesheets/uniform/components.scss +11 -0
  38. data/{vendor → lib}/assets/stylesheets/uniform/defaults.scss +7 -4
  39. data/lib/assets/stylesheets/uniform/functions.scss +31 -0
  40. data/lib/assets/stylesheets/uniform/helpers/border.scss +19 -0
  41. data/lib/assets/stylesheets/uniform/helpers/colors.scss +23 -0
  42. data/lib/assets/stylesheets/uniform/helpers/margin.scss +27 -0
  43. data/lib/assets/stylesheets/uniform/helpers/padding.scss +9 -0
  44. data/lib/assets/stylesheets/uniform/helpers/position.scss +13 -0
  45. data/lib/assets/stylesheets/uniform/helpers/sizes.scss +38 -0
  46. data/{vendor → lib}/assets/stylesheets/uniform/helpers/text.scss +86 -73
  47. data/lib/assets/stylesheets/uniform/helpers.scss +127 -0
  48. data/lib/assets/stylesheets/uniform/mixins.scss +116 -0
  49. data/lib/assets/stylesheets/uniform/print/grid.scss +50 -0
  50. data/lib/assets/stylesheets/uniform/variables.scss +72 -0
  51. data/lib/assets/stylesheets/uniform-print.scss +1 -0
  52. data/lib/assets/stylesheets/uniform.scss +11 -0
  53. data/lib/uniform/version.rb +3 -0
  54. data/lib/uniform.rb +15 -0
  55. metadata +87 -95
  56. data/.gitignore +0 -2
  57. data/CHANGELOG.md +0 -27
  58. data/CNAME +0 -1
  59. data/Gemfile +0 -8
  60. data/Gemfile.lock +0 -40
  61. data/LICENSE +0 -22
  62. data/README.md +0 -35
  63. data/Rakefile +0 -74
  64. data/index.html +0 -251
  65. data/lib/uniform/rails/engine.rb +0 -8
  66. data/lib/uniform/rails.rb +0 -6
  67. data/lib/uniform/ui.rb +0 -1
  68. data/preview/alerts.html.erb +0 -1
  69. data/preview/buttons.html.erb +0 -62
  70. data/preview/cards.html.erb +0 -23
  71. data/preview/colors.html.erb +0 -22
  72. data/preview/dropdown.html.erb +0 -1
  73. data/preview/form.html.erb +0 -233
  74. data/preview/grid.html.erb +0 -304
  75. data/preview/helpers.html.erb +0 -225
  76. data/preview/index.html.erb +0 -77
  77. data/preview/labels.html.erb +0 -1
  78. data/preview/layout.html.erb +0 -63
  79. data/preview/loaders.html.erb +0 -83
  80. data/preview/modal.html.erb +0 -1
  81. data/preview/nav.html.erb +0 -77
  82. data/preview/preview.scss +0 -76
  83. data/preview/rows.html.erb +0 -36
  84. data/preview/select.html.erb +0 -1
  85. data/preview/tables.html.erb +0 -1
  86. data/preview/tabs.html.erb +0 -17
  87. data/preview/tiles.html.erb +0 -1
  88. data/preview/tooltip.erb +0 -1
  89. data/preview.css +0 -0
  90. data/site/alerts.html +0 -157
  91. data/site/alerts.html copy +0 -133
  92. data/site/buttons.html +0 -286
  93. data/site/cards.html +0 -177
  94. data/site/colors.html +0 -275
  95. data/site/dropdown.html +0 -157
  96. data/site/dropdown.html copy +0 -141
  97. data/site/form.html +0 -369
  98. data/site/grid.html +0 -716
  99. data/site/helpers.html +0 -1008
  100. data/site/index.html +0 -251
  101. data/site/labels.html +0 -157
  102. data/site/layout.html +0 -313
  103. data/site/loaders.html +0 -233
  104. data/site/logo.png +0 -0
  105. data/site/modal.html +0 -157
  106. data/site/nav.html +0 -229
  107. data/site/preview.css +0 -1
  108. data/site/preview.js +0 -59
  109. data/site/rows.html +0 -190
  110. data/site/select.html +0 -157
  111. data/site/tables.html +0 -157
  112. data/site/tabs.html +0 -171
  113. data/site/tiles.html +0 -157
  114. data/site/tiles.html copy +0 -109
  115. data/site/tooltip +0 -157
  116. data/site/uniform.css +0 -1
  117. data/uniform.gemspec +0 -22
  118. data/vendor/assets/stylesheets/uniform/base.scss +0 -2
  119. data/vendor/assets/stylesheets/uniform/components/alert.scss +0 -27
  120. data/vendor/assets/stylesheets/uniform/components/buttons.scss +0 -212
  121. data/vendor/assets/stylesheets/uniform/components/form.scss +0 -290
  122. data/vendor/assets/stylesheets/uniform/components/grid.scss +0 -225
  123. data/vendor/assets/stylesheets/uniform/components/label.scss +0 -63
  124. data/vendor/assets/stylesheets/uniform/components/loaders.scss +0 -82
  125. data/vendor/assets/stylesheets/uniform/components/nav.scss +0 -197
  126. data/vendor/assets/stylesheets/uniform/components/row.scss +0 -92
  127. data/vendor/assets/stylesheets/uniform/components/select.scss +0 -98
  128. data/vendor/assets/stylesheets/uniform/components/table.scss +0 -83
  129. data/vendor/assets/stylesheets/uniform/components/tabs.scss +0 -45
  130. data/vendor/assets/stylesheets/uniform/components/tile.scss +0 -20
  131. data/vendor/assets/stylesheets/uniform/components/tooltip.scss +0 -46
  132. data/vendor/assets/stylesheets/uniform/helpers/colors.scss +0 -37
  133. data/vendor/assets/stylesheets/uniform/helpers/margin.scss +0 -44
  134. data/vendor/assets/stylesheets/uniform/helpers/padding.scss +0 -74
  135. data/vendor/assets/stylesheets/uniform/helpers/sizes.scss +0 -31
  136. data/vendor/assets/stylesheets/uniform/helpers.scss +0 -124
  137. data/vendor/assets/stylesheets/uniform/mixins.scss +0 -77
  138. data/vendor/assets/stylesheets/uniform/variables.scss +0 -36
  139. data/vendor/assets/stylesheets/uniform.scss +0 -9
@@ -1,212 +0,0 @@
1
- //----------------------------------------------------------------
2
- // Buttons
3
- //----------------------------------------------------------------
4
- .uniformButtonGroup a,
5
- .uniformButton{
6
- outline: none;
7
- appearance: none;
8
- cursor: pointer;
9
- display: inline-block;
10
- text-decoration: none;
11
-
12
- padding: 0.5em 0.75em;
13
- vertical-align: middle;
14
- text-align: center;
15
- line-height:1;
16
- position:relative; // for adding loaders to buttons which have position:absolute
17
- transition: all 0.2s;
18
-
19
- color:$gray;
20
- background-color: white;
21
- background-image: linear-gradient(white 33%, darken(white, 7));
22
- border-radius: 0.25em;
23
- border:1px solid lighten($gray, 40);
24
-
25
- .fortycon{
26
- line-height:0;
27
- vertical-align:-1px;
28
- font-size:1.2em;
29
- margin-right:3px;
30
- &.end{
31
- margin-right: 0;
32
- margin-left: 3px;
33
- }
34
- }
35
-
36
- &:visited{
37
- color:$gray;
38
- }
39
-
40
- &:hover,
41
- &:focus,
42
- &.hover{
43
- box-shadow: inset 0 0 10px rgba(black, 0.1);
44
- }
45
- &:active,
46
- &.active{
47
- }
48
-
49
- &.green,
50
- &.blue,
51
- &.red {
52
- color: white;
53
- }
54
- &.green { background: $green;}
55
- &.blue { background: $blue;}
56
- &.red { background: $red;}
57
- &.green { background: $green;}
58
- &.blue { background: $blue;}
59
- &.red { background: $red;}
60
-
61
-
62
- //----------------------------------------------------------------
63
- // styles
64
- //----------------------------------------------------------------
65
- &.clear{
66
- background: none;
67
- border-color: transparent;
68
- }
69
- &.outline{
70
- border-color: $gray;
71
- background:none !important;
72
- text-shadow:none !important;
73
- &.dashed{
74
- border-style:dashed;
75
- }
76
- }
77
- &.small{
78
- padding: 0.3em 0.5em;
79
- font-size: 0.8em;
80
- }
81
- &.large{
82
- padding: 1em 2em;
83
- font-weight:bold;
84
- .fortycon{
85
- line-height:0.5em;
86
- vertical-align:-6px;
87
- font-size:2em;
88
- margin-right:7px;
89
- font-weight:normal;
90
- }
91
- }
92
-
93
- &.warn:hover{
94
- border-color:$red;
95
- background: $red;
96
- color: white;
97
- &.clear{
98
- color: $red;
99
- background: none;
100
- }
101
- &.outline{
102
- color: $red;
103
- border-color: lighten($gray, 30);
104
- }
105
- }
106
-
107
- &.block{
108
- padding-left:0.5em !important;
109
- padding-right:0.5em !important;
110
- display:block;
111
- width:100%;
112
- }
113
-
114
-
115
- //----------------------------------------------------------------
116
- // colors
117
- //----------------------------------------------------------------
118
-
119
- &.green{
120
- background-color: darken($green, 3);
121
- background-image: linear-gradient(lighten($green, 5), darken($green, 3));
122
- border-color: darken($green, 3);
123
-
124
- &.outline{
125
- border-color: $green-dark;
126
- color:$green-dark;
127
- }
128
- }
129
-
130
- &.green,
131
- &.red,
132
- &.blue{
133
- color:white;
134
- text-shadow:0 1px 2px rgba(black, 0.1);
135
- }
136
-
137
- &.red{
138
- background-color: darken($red, 3);
139
- background-image: linear-gradient($red, darken($red, 3));
140
- border-color: darken($red, 3);
141
- &.outline{
142
- color:$red-dark;
143
- border-color:$red-dark;
144
- }
145
- }
146
-
147
- &.blue{
148
- background-color: darken($blue, 3);
149
- background-image: linear-gradient($blue, darken($blue, 3));
150
- border-color:darken($blue, 3);
151
-
152
- &.outline{
153
- color:$blue;
154
- border-color: $blue;
155
- }
156
- }
157
- &.white{
158
- &.outline{
159
- color:white;
160
- border-color:white;
161
- }
162
- }
163
-
164
- &.gray{
165
- color: lighten($gray, 20);
166
- &.outline{
167
- color: lighten($gray, 20);
168
- border-color: lighten($gray, 30);
169
- }
170
- }
171
-
172
- &:disabled,
173
- &.disabled,
174
- &:disabled:hover,
175
- &.disabled:hover{
176
- cursor: not-allowed;
177
- color:lighten($gray, 40);
178
- background-image:none !important;
179
- background-color: darken($background, 10);
180
- border-color: lighten($gray, 40);
181
- text-shadow: none;
182
- }
183
- }
184
- span.uniformButton{
185
- cursor: auto;
186
- }
187
- a.uniformButton{
188
- user-select: none;
189
- }
190
-
191
- .uniformButtonGroup {
192
- font-size: 0;
193
- a{
194
- font-size: 1rem;
195
- position:relative;
196
- z-index: 1;
197
- margin-right: -1px;
198
- border-radius: 0;
199
- &:last-of-type{
200
- border-radius: 0 0.25em 0.25em 0;
201
- }
202
- &:first-of-type{
203
- border-radius: 0.25em 0 0 0.25em;
204
- }
205
- &.active{
206
- background-color: darken($green, 3);
207
- background-image: linear-gradient(lighten($green, 5), darken($green, 3));
208
- border-color: darken($green, 3);
209
- color: white;
210
- }
211
- }
212
- }
@@ -1,290 +0,0 @@
1
- div.uniformInputGroup{
2
- background: white;
3
- border: 1px solid lighten($gray, 40);
4
- display: flex;
5
- align-items: center;
6
- transition: box-shadow 0.2s ease-in;
7
- &>*{
8
- flex: 0 1 auto;
9
- }
10
- input{
11
- border: none !important;
12
- background:none;
13
- appearance: none;
14
- outline: none;
15
- display:block;
16
- width: 100%;
17
- border-radius: 0 !important;
18
- &:focus{
19
- box-shadow: none;
20
- }
21
- }
22
- .input{
23
- padding: 0;
24
- flex: 1 1 auto;
25
- }
26
- &>*:not(input){
27
- padding: 0 0.5em;
28
- &.pad-tiny{
29
- padding: 0 0.25em;
30
- }
31
- }
32
- &.focus{
33
- box-shadow: inset 0 -2px 0 $green;
34
- }
35
- .label{
36
- color: lighten($gray, 20);
37
- }
38
- @include media($sm){
39
- input{
40
- padding-top: 0.5em;
41
- padding-bottom: 0.5em;
42
- }
43
- }
44
- &.border-none{
45
- border: none;
46
- }
47
- }
48
-
49
- select.uniformInput,
50
- textarea.uniformInput,
51
- input.uniformInput,
52
- button.uniformInput,
53
- .uniformInput input,
54
- .uniformForm #{$text-inputs},
55
- .uniformForm textarea{
56
- font-family: $system-font;
57
- border:1px solid lighten($gray, 40);
58
- padding: 0.5em;
59
- line-height: 1.3;
60
- outline: none;
61
- appearance: none;
62
- transition: box-shadow 0.2s ease-in;
63
- &:focus{
64
- box-shadow: inset 0 -2px 0 $green;
65
- }
66
- &.block{
67
- width: 100%;
68
- max-width: 100%;
69
- }
70
- @include media($sm){
71
- font-size: 1.142em;
72
- }
73
- &.pad-more{
74
- padding: 1em;
75
- }
76
- &.large{
77
- font-size:1.2em;
78
- }
79
- }
80
- select.uniformInput{
81
- color: $gray;
82
- background: white url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyNy4xNjdweCIgaGVpZ2h0PSIyOHB4IiB2aWV3Qm94PSIwIDAgMjcuMTY3IDI4IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNy4xNjcgMjgiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxnIGlkPSJpY29tb29uLWlnbm9yZSI+PC9nPjxwYXRoIGZpbGw9IiM1MDUxNTMiIGQ9Ik0xNiwxMWMwLDAuMjcxLTAuMSwwLjUwNS0wLjI5NywwLjcwM2wtNyw3QzguNTA1LDE4LjksOC4yNzEsMTksOCwxOXMtMC41MDUtMC4xLTAuNzAzLTAuMjk3bC03LTdDMC4wOTksMTEuNTA1LDAsMTEuMjcxLDAsMTFzMC4wOTktMC41MDUsMC4yOTctMC43MDNDMC40OTUsMTAuMDk5LDAuNzI5LDEwLDEsMTBoMTRjMC4yNzEsMCwwLjUwNSwwLjA5OSwwLjcwMywwLjI5N0MxNS45LDEwLjQ5NSwxNiwxMC43MjksMTYsMTF6Ii8+PC9zdmc+);
83
- background-position: center right;
84
- background-repeat: no-repeat;
85
- background-size: auto 40%;
86
- position: relative;
87
- border-radius: 0;
88
- padding-right: 1.5em !important;
89
- }
90
- button.uniformInput{
91
- background: white;
92
- @include text-overflow;
93
- }
94
-
95
- .uniformError{
96
- position:relative;
97
- border-color: $red;
98
- color: $red;
99
- input{
100
- border-color: $red !important;
101
- }
102
- }
103
-
104
- .uniformErrorMessage{
105
- color: $red;
106
- font-size:11px;
107
- line-height: 1.1;
108
- }
109
-
110
- @mixin uniformForm-table{
111
- display: table;
112
- width: 100%;
113
- .form-group{
114
- display: table-row;
115
- & > * {
116
- display: table-cell;
117
- &.fill{
118
- width: 100%;
119
- }
120
- }
121
- & > label,
122
- & > div,
123
- & > span {
124
- padding-bottom: 1em;
125
- padding-right: 0.5em;
126
- &:last-child{
127
- padding-right: 0;
128
- }
129
- }
130
- }
131
- }
132
-
133
- .uniformForm{
134
- .form-group{
135
- position: relative;
136
- margin-bottom: 0.9em;
137
- label{
138
- font-weight:bold;
139
- display:block;
140
- }
141
- &.collapse{
142
- margin-bottom: 0;
143
- }
144
- }
145
- [data-error-message]{
146
- position: relative;
147
- color: $red;
148
- input{
149
- border-color: $red !important;
150
- }
151
- &::after{
152
- content: attr(data-error-message);
153
- color: $red;
154
- position: absolute;
155
- bottom: -7px;
156
- left: 1em;
157
- border: 1px solid $red;
158
- background: white;
159
- font-size:11px;
160
- line-height: 14px;
161
- @include text-overflow;
162
- padding: 0 0.5em;
163
- max-width: 100%;
164
- }
165
- }
166
- select.uniformInput,
167
- #{$text-inputs},
168
- textarea{
169
- display:block;
170
- width: 100%;
171
- max-width: 100%;
172
- }
173
-
174
- .uniformForm-table,
175
- &.uniformForm-table{
176
- @include uniformForm-table;
177
- }
178
-
179
- &.invert{
180
- #{$text-inputs},
181
- textarea,
182
- .uniformCheckboxCollection.inline,
183
- .uniformCheckboxCollection.inline-md{
184
- border-color: $gray;
185
- border-radius: 0.25em;
186
- }
187
- .has-error{
188
- color: $red-bright;
189
- }
190
- .uniformInputGroup{
191
- overflow: hidden;
192
- border-color: $gray;
193
- border-radius: 0.25em;
194
- }
195
- }
196
- }
197
- @include apply-media-sizes('.uniformCheckboxCollection'){
198
- label{
199
- display:block;
200
- margin-right: 1em;
201
- font-weight: normal;
202
- input{
203
- margin-right: 0.25em;
204
- }
205
- }
206
- &.inline{
207
- color: $gray;
208
- border:1px solid lighten($gray, 40);
209
- background: white;
210
- display: flex;
211
- align-items: center;
212
- label{
213
- margin-right: 0;
214
- padding: 0.5em;
215
- line-height: 1.3;
216
- flex: 1 1 auto;
217
- border-left: 1px solid lighten($gray, 40);
218
- text-align: center;
219
- &:first-of-type{
220
- border-left:none;
221
- }
222
- }
223
- }
224
- }
225
- @include apply-media-sizes('.uniformForm-table'){
226
- @include uniformForm-table;
227
- }
228
-
229
- .uniformFloatingLabel{
230
- display: flex;
231
- align-items: center;
232
- border: 1px solid lighten($gray, 40);
233
- position:relative;
234
- background:white;
235
- &>*{
236
- flex: 0 1 auto;
237
- }
238
- label{
239
- z-index: 1;
240
- padding: 0 1em;
241
- font-weight:normal !important;
242
- }
243
- & > input,
244
- & > textarea,
245
- & > select,
246
- & > .uniformInputGroup{
247
- position:relative;
248
- display:block;
249
- width: 100%;
250
- border:none !important;
251
- background:none;
252
- }
253
- & > select {
254
- z-index: 2;
255
- }
256
- & > .uniformInputGroup{
257
- display: flex;
258
- }
259
-
260
- &.enabled{
261
- label{
262
- transition: font-size 0.1s, line-height 0.1s, opacity 0.1s;
263
- }
264
- }
265
-
266
- &.inactive{
267
- input,
268
- textarea,
269
- select{
270
- &::placeholder{
271
- color: transparent;
272
- }
273
- }
274
- }
275
- &.float{
276
- label{
277
- font-size: 80%;
278
- opacity: 0.8;
279
- }
280
- }
281
- &.active{
282
- label{
283
- color: $green-dark;
284
- opacity: 1;
285
- }
286
- }
287
- input.pad-more{
288
- padding: 1em;
289
- }
290
- }
@@ -1,225 +0,0 @@
1
- $grid-columns: 12;
2
- $grid-gutter: 1em;
3
-
4
- .container{
5
- max-width: 100%;
6
- width: 100%;
7
- margin-left: auto;
8
- margin-right: auto;
9
- padding-left: 0.5em;
10
- padding-right: 0.5em;
11
- // @include media($md) {
12
- // padding: 0;
13
- // max-width: 720px;
14
- // }
15
- @include media($lg) {
16
- max-width: 1080px;
17
- }
18
- @include media($xl) {
19
- max-width: 1440px;
20
- }
21
- }
22
-
23
- @mixin grid{
24
- display: flex;
25
- flex-wrap: wrap;
26
-
27
- &.grid-h-left {justify-content: flex-start;}
28
- &.grid-h-center {justify-content: center;}
29
- &.grid-h-right {justify-content: flex-end;}
30
- &.grid-h-around {justify-content: space-around;}
31
- &.grid-h-between {justify-content: space-between;}
32
-
33
- &.grid-v-top {align-content: flex-start;}
34
- &.grid-v-center {align-content: center;}
35
- &.grid-v-bottom {align-content: flex-end;}
36
- &.grid-v-around {align-content: space-around;}
37
- &.grid-v-between {align-content: space-between;}
38
- &.grid-v-stretch {align-content: space-stretch;}
39
-
40
- &.grid-center {align-items: center;}
41
- &.grid-top {align-items: flex-start;}
42
- &.grid-bottom {align-items: flex-end;}
43
- &.grid-stretch {align-items: stretch;}
44
- &.grid-nowrap {flex-wrap:nowrap;}
45
-
46
- &.grid-vertical{
47
- flex-direction: column;
48
- .col,
49
- [class*="col-"]{
50
- padding-left: 0;
51
- padding-right: 0;
52
- padding-top: $grid-gutter;
53
- padding-bottom: $grid-gutter;
54
- &:first-child{
55
- padding-top: 0;
56
- }
57
- &:last-child{
58
- padding-bottom: 0;
59
- }
60
- }
61
- }
62
-
63
- &.no-wrap{
64
- flex-wrap:nowrap;
65
- }
66
-
67
- &.no-gutter{
68
- .col,
69
- [class*="col-"]{
70
- padding-left: 0;
71
- padding-right: 0;
72
- }
73
- }
74
-
75
- &.nest{
76
- margin-left: -$grid-gutter;
77
- margin-right: -$grid-gutter;
78
- @include media($sm) {
79
- margin-left: -$grid-gutter/2;
80
- margin-right: -$grid-gutter/2;
81
- }
82
- .col,
83
- [class*="col-"]{
84
- &:first-child{
85
- padding-left: $grid-gutter/2;
86
- }
87
- &:last-child{
88
- padding-right: $grid-gutter/2;
89
- }
90
- @include media($md){
91
- &:first-child{
92
- padding-left:$grid-gutter;
93
- }
94
- &:last-child{
95
- padding-right: $grid-gutter;
96
- }
97
- }
98
- }
99
- }
100
-
101
- .col,
102
- [class*="col-"]{
103
- position: relative;
104
- padding-left: $grid-gutter/2;
105
- padding-right: $grid-gutter/2;
106
- &:first-child{
107
- padding-left: 0;
108
- }
109
- &:last-child{
110
- padding-right: 0;
111
- &.pad{
112
- padding-right: $grid-gutter/2;
113
- }
114
- }
115
- &.no-gutter{
116
- padding-left: 0;
117
- padding-right: 0;
118
- }
119
- @include media($md){
120
- padding-left:$grid-gutter;
121
- padding-right: $grid-gutter;
122
- &:last-child{
123
- &.pad{
124
- padding-right: $grid-gutter;
125
- }
126
- }
127
- }
128
-
129
- &.col-center {align-self: center;}
130
- &.col-top {align-self: flex-start;}
131
- &.col-bottom {align-self: flex-end;}
132
- &.col-stretch {align-self: stretch;}
133
- }
134
- }
135
-
136
- .grid{
137
- @include grid;
138
- }
139
-
140
- // fix for IE https://codepen.io/anon/pen/gxNraR
141
- .grid-min-height-fix{
142
- width: 100%;
143
- display: flex;
144
- flex-direction: row;
145
- .grid{
146
- width: 100%;
147
- }
148
- }
149
-
150
- .col{
151
- flex: 0 1 auto;
152
- max-width: 100%;
153
- }
154
- .col-fill{
155
- flex: 1 1 auto;
156
- max-width: 100%;
157
- }
158
- @for $i from 1 through $grid-columns {
159
- .col-#{$i} {
160
- flex: 0 0 #{($i / $grid-columns * 100) + "%"};
161
- max-width: #{($i / $grid-columns * 100) + "%"};
162
- }
163
- .col-offset-#{$i} {
164
- margin-left: #{($i / $grid-columns * 100) + "%"};
165
- }
166
- .col-push-#{$i} {
167
- position:relative;
168
- left: #{($i / $grid-columns * 100) + "%"};
169
- }
170
- .col-pull-#{$i} {
171
- position:relative;
172
- right: #{($i / $grid-columns * -100) + "%"};
173
- }
174
- .col-fill-#{$i}{
175
- flex: #{$i};
176
- }
177
- }
178
-
179
- @each $name, $size in ('sm', $sm) ('md', $md) ('lg', $lg) ('xl', $xl) {
180
- .show-#{$name}{
181
- display:none !important;
182
- }
183
- @include media($size){
184
- .grid-#{$name}{
185
- @include grid;
186
- }
187
- .text-col-2-#{$name}{
188
- column-count: 2;
189
- column-gap: 5em;
190
- }
191
- .show-#{$name}{
192
- display:inherit !important;
193
- &.block{
194
- display:block !important;
195
- }
196
- }
197
- .hide-#{$name}{
198
- display:none !important;
199
- }
200
- .col-#{$name}{
201
- flex: 0 1 auto;
202
- max-width: 100%;
203
- }
204
- .col-fill-#{$name}{
205
- flex: 1 1 auto;
206
- }
207
-
208
- @for $i from 1 through $grid-columns {
209
- .col-#{$i}-#{$name} {
210
- flex: 0 0 #{($i / $grid-columns * 100) + "%"};
211
- max-width: #{($i / $grid-columns * 100) + "%"};
212
- }
213
- .col-offset-#{$i}-#{$name} {
214
- margin-left: #{($i / $grid-columns * 100) + "%"};
215
- }
216
- .col-push-#{$i}-#{$name} {
217
- left: #{($i / $grid-columns * 100) + "%"};
218
- }
219
- .col-pull-#{$i}-#{$name} {
220
- right: #{($i / $grid-columns * 100) + "%"};
221
- }
222
- }
223
- }
224
- }
225
-