material-sass 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/fonts/MaterialIcons-Regular.eot +0 -0
  3. data/app/assets/fonts/MaterialIcons-Regular.ttf +0 -0
  4. data/app/assets/fonts/MaterialIcons-Regular.woff +0 -0
  5. data/app/assets/fonts/MaterialIcons-Regular.woff2 +0 -0
  6. data/app/assets/javascripts/init.js +9 -0
  7. data/app/assets/javascripts/material/_.js +1 -5
  8. data/app/assets/javascripts/material/bootstrap.js +2 -2
  9. data/app/assets/javascripts/material/datepicker.js +58 -18
  10. data/app/assets/javascripts/material/dropdown.js +0 -13
  11. data/app/assets/javascripts/material/form-adv.js +2 -2
  12. data/app/assets/javascripts/material/header.js +39 -41
  13. data/app/assets/javascripts/material/menu.js +11 -35
  14. data/app/assets/javascripts/material/wave.js +10 -13
  15. data/app/assets/javascripts/material/webfont.js +33 -36
  16. data/app/assets/javascripts/material-sprockets.js +2 -1
  17. data/app/assets/stylesheets/material/_code.scss +1 -1
  18. data/app/assets/stylesheets/material/_reset.scss +16 -17
  19. data/app/assets/stylesheets/material/_utilities.scss +13 -16
  20. data/app/assets/stylesheets/material/_variable.scss +6 -3
  21. data/app/assets/stylesheets/material/addon/_material-design-icon.scss +6 -6
  22. data/app/assets/stylesheets/material/addon/_waves.scss +11 -17
  23. data/app/assets/stylesheets/material/addon/material-design-icon/_core.scss +18 -15
  24. data/app/assets/stylesheets/material/addon/material-design-icon/_larger.scss +20 -0
  25. data/app/assets/stylesheets/material/addon/material-design-icon/_path.scss +9 -8
  26. data/app/assets/stylesheets/material/addon/material-design-icon/_variables.scss +2 -776
  27. data/app/assets/stylesheets/material/base.scss +3 -0
  28. data/app/assets/stylesheets/material/element/_avatar.scss +2 -2
  29. data/app/assets/stylesheets/material/element/_breadcrumb.scss +2 -2
  30. data/app/assets/stylesheets/material/element/_button-flat.scss +32 -0
  31. data/app/assets/stylesheets/material/element/_button-float.scss +47 -60
  32. data/app/assets/stylesheets/material/element/_button.scss +18 -42
  33. data/app/assets/stylesheets/material/element/_card.scss +7 -19
  34. data/app/assets/stylesheets/material/element/_dropdown.scss +15 -18
  35. data/app/assets/stylesheets/material/element/_form-adv-checkbox.scss +12 -26
  36. data/app/assets/stylesheets/material/element/_form-adv-datepicker.scss +77 -55
  37. data/app/assets/stylesheets/material/element/_form-adv-label.scss +2 -2
  38. data/app/assets/stylesheets/material/element/_form-adv-switch.scss +38 -12
  39. data/app/assets/stylesheets/material/element/_form.scss +7 -7
  40. data/app/assets/stylesheets/material/element/_label.scss +1 -1
  41. data/app/assets/stylesheets/material/element/_modal.scss +22 -19
  42. data/app/assets/stylesheets/material/element/_progress-circular.scss +165 -0
  43. data/app/assets/stylesheets/material/element/_progress-loadbar.scss +103 -0
  44. data/app/assets/stylesheets/material/element/_progress.scss +7 -411
  45. data/app/assets/stylesheets/material/element/_sortable.scss +2 -2
  46. data/app/assets/stylesheets/material/element/_tab.scss +49 -17
  47. data/app/assets/stylesheets/material/element/_tile.scss +11 -13
  48. data/app/assets/stylesheets/material/element/_toast.scss +10 -11
  49. data/app/assets/stylesheets/material/mixin/_css3.scss +0 -45
  50. data/app/assets/stylesheets/material/theme/_content.scss +7 -7
  51. data/app/assets/stylesheets/material/theme/_header.scss +29 -173
  52. data/app/assets/stylesheets/material/theme/_menu.scss +160 -210
  53. data/lib/material-sass/engine.rb +1 -1
  54. data/lib/material-sass/version.rb +1 -1
  55. metadata +12 -9
  56. data/app/assets/fonts/MaterialDesignIcon.eot +0 -0
  57. data/app/assets/fonts/MaterialDesignIcon.svg +0 -773
  58. data/app/assets/fonts/MaterialDesignIcon.ttf +0 -0
  59. data/app/assets/fonts/MaterialDesignIcon.woff +0 -0
  60. data/app/assets/javascripts/material/sortable.js +0 -10
  61. data/app/assets/stylesheets/material/addon/material-design-icon/_icons.scss +0 -773
@@ -1,83 +1,34 @@
1
1
  .menu {
2
+ backface-visibility: hidden;
3
+ background-color: transparent;
4
+ height: 100%;
5
+ overflow: hidden;
2
6
  position: fixed;
3
- top: ($line-height * 2);
4
- bottom: 0;
5
- left: -100%;
6
- width: 100%;
7
- z-index: ($header-base - 1);
8
- @include backface(hidden);
9
- @include transition(all 0.3s $timing);
10
- -webkit-transition-property: box-shadow, -webkit-transform;
11
- transition-property: box-shadow, transform;
7
+ top: 0;
8
+ left: 0;
9
+ transition: background-color 0.3s $timing, width 0s 0.3s;
10
+ width: 0;
11
+ z-index: ($header-base + 1);
12
12
  &.open {
13
+ background-color: rgba(0, 0, 0, 0.5);
14
+ transition: background-color 0.15s $timing, width 0s;
15
+ width: 100%;
16
+ }
17
+ &.menu-right {
13
18
  // position
14
- left: 0;
15
- @include box-shadow(0 0 10px rgba(0, 0, 0, 0.5));
16
- @include transition(all 0.3s $timing);
19
+ right: 0;
20
+ left: auto;
17
21
  }
18
- // 480
19
- @include responsive(xs) {
20
- // position
21
- left: ($grid-gutter * -20);
22
- width: ($grid-gutter * 20);
23
- }
24
- // menu right
25
- &.menu-right {
26
- // position
27
- right: -100%;
28
- left: auto;
22
+ // 992
23
+ @include responsive(md) {
29
24
  &.open {
30
- // position
31
- right: 0;
25
+ background-color: transparent;
26
+ overflow: visible;
27
+ width: ($grid-gutter * 20);
32
28
  }
33
- // 480
34
- @include responsive(xs) {
35
- // position
36
- right: ($grid-gutter * -20);
37
- // no-touch
38
- .no-touch & {
39
- &.open ~ .fbtn-container {
40
- // position
41
- right: ($grid-gutter * 21);
42
- }
43
- }
44
- }
45
- }
46
- }
47
-
48
- .menu-backdrop {
49
- display: none;
50
- .nav-drawer ~ &,
51
- .touch & {
52
- background-color: $black;
53
- display: block;
54
- height: 0;
55
- position: fixed;
56
- top: 0;
57
- left: 0;
58
- width: 0;
59
- z-index: ($header-base - 2);
60
- @include backface(hidden);
61
- @include opacity(0);
62
- @include transition(height 0s 0.3s, opacity 0.3s $timing, width 0s 0.3s, z-index 0s 0.3s);
63
- }
64
- .nav-drawer.open ~ &,
65
- .touch .menu.open ~ & {
66
- height: 100%;
67
- width: 100%;
68
- @include opacity(0.5);
69
- @include transition(opacity 0.3s $timing);
70
- }
71
- .nav-drawer.open ~ & {
72
- z-index: $header-base;
73
- }
74
- // 1440
75
- @include responsive(lg) {
76
- .nav-drawer.open ~ & {
77
- height: 0;
78
- width: 0;
79
- @include opacity(0);
80
- @include transition(none);
29
+ &.menu-right.open ~ .fbtn-container {
30
+ // position
31
+ right: ($grid-gutter * 21);
81
32
  }
82
33
  }
83
34
  }
@@ -98,31 +49,30 @@
98
49
  }
99
50
 
100
51
  .menu-collapse-toggle-close {
52
+ margin-top: ($font-size / -2);
53
+ opacity: 1;
101
54
  position: absolute;
102
- top: (($line-height * 2 - $font-size) / 2);
55
+ top: 50%;
103
56
  left: 0;
104
57
  text-align: center;
58
+ transform: rotate(0);
59
+ transition: all 0.3s $timing;
60
+ transition-property: opacity, transform;
105
61
  width: 100%;
106
- @include opacity(1);
107
- @include transform(rotate(0));
108
- @include transition(all 0.3s $timing);
109
- -webkit-transition-property: opacity, -webkit-transform;
110
- transition-property: opacity, transform;
111
62
  .menu-collapse-toggle.collapsed & {
112
- @include opacity(0);
113
- @include transform(rotate(-225deg));
63
+ opacity: 0;
64
+ transform: rotate(-225deg);
114
65
  }
115
66
  }
116
67
 
117
68
  .menu-collapse-toggle-default {
118
- @include opacity(0);
119
- @include transform(rotate(225deg));
120
- @include transition(all 0.3s $timing);
121
- -webkit-transition-property: opacity, -webkit-transform;
122
- transition-property: opacity, transform;
69
+ opacity: 0;
70
+ transform: rotate(225deg);
71
+ transition: all 0.3s $timing;
72
+ transition-property: opacity, transform;
123
73
  .menu-collapse-toggle.collapsed & {
124
- @include opacity(1);
125
- @include transform(rotate(0));
74
+ opacity: 1;
75
+ transform: rotate(0);
126
76
  }
127
77
  }
128
78
 
@@ -140,7 +90,7 @@
140
90
  a,
141
91
  .a {
142
92
  color: $black-sec;
143
- font-weight: 700;
93
+ font-weight: $font-weight-bold;
144
94
  overflow: hidden;
145
95
  text-overflow: ellipsis;
146
96
  white-space: nowrap;
@@ -157,34 +107,19 @@
157
107
  > a,
158
108
  > .a {
159
109
  color: $brand-color;
160
- .page-blue & {
161
- color: $palette-blue;
162
- }
163
- .page-green & {
164
- color: $palette-green;
165
- }
166
- .page-purple & {
167
- color: $palette-purple;
168
- }
169
- .page-red & {
170
- color: $palette-red;
171
- }
172
- .page-yellow & {
173
- color: $palette-yellow;
174
- }
175
110
  }
176
111
  }
177
112
  ul {
178
113
  a,
179
114
  .a {
180
- font-weight: 400;
115
+ font-weight: $font-weight;
181
116
  padding-left: ($grid-gutter * 2);
182
117
  }
183
118
  ul {
184
119
  a,
185
120
  .a {
186
121
  font-size: 90%;
187
- font-weight: 300;
122
+ font-weight: $font-weight-light;
188
123
  padding-top: ($line-height / 4);
189
124
  padding-bottom: ($line-height / 4);
190
125
  padding-left: ($grid-gutter * 3);
@@ -192,10 +127,6 @@
192
127
  }
193
128
  }
194
129
  }
195
- // 480
196
- @include responsive(xs) {
197
- width: ($grid-gutter * 20);
198
- }
199
130
  // no boxshadow
200
131
  .nav {
201
132
  .no-boxshadow & {
@@ -208,27 +139,74 @@
208
139
  }
209
140
  }
210
141
 
142
+ // colour
143
+ @each $color in $palette-list {
144
+ $i: index($palette-list, $color);
145
+
146
+ .page-#{$color} .menu-content .nav li.active {
147
+ > a,
148
+ > .a {
149
+ color: nth($palette-color, $i);
150
+ }
151
+ }
152
+ }
153
+
211
154
  .menu-content-inner {
212
155
  padding-right: $grid-gutter;
213
156
  padding-left: $grid-gutter;
214
157
  }
215
158
 
216
- .menu-open {
217
- // touch
218
- .touch & {
219
- overflow: hidden;
159
+ .menu-logo {
160
+ @extend .header-logo;
161
+ border-bottom: 1px solid $black-bg;
162
+ color: $black-text;
163
+ float: none;
164
+ margin-bottom: ($line-height / 2);
165
+ &:focus,
166
+ &:hover {
167
+ color: $black-text;
168
+ text-decoration: none;
169
+ }
170
+ .menu-content > & {
171
+ &:first-child {
172
+ margin-top: ($line-height / -2);
220
173
  }
174
+ }
221
175
  }
222
176
 
223
177
  .menu-scroll {
224
178
  background-color: $white;
225
179
  height: 100%;
180
+ max-width: 85%;
181
+ max-width: calc(100% - #{$grid-gutter * 4});
226
182
  overflow: hidden;
227
183
  position: absolute;
228
184
  top: 0;
229
- left: 0;
230
- width: 100%;
185
+ left: ($grid-gutter * -20);
186
+ transition: all 0.3s $timing;
187
+ transition-property: box-shadow, left;
188
+ width: ($grid-gutter * 20);
231
189
  z-index: 1;
190
+ .menu.open & {
191
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
192
+ // left
193
+ left: 0;
194
+ }
195
+ .menu-right & {
196
+ // position
197
+ right: ($grid-gutter * -20);
198
+ left: auto;
199
+ transition-property: box-shadow, right;
200
+ }
201
+ .menu-right.open & {
202
+ // position
203
+ right: 0;
204
+ left: auto;
205
+ }
206
+ // 992
207
+ @include responsive(md) {
208
+ max-width: none;
209
+ }
232
210
  // no boxshadow
233
211
  .no-boxshadow & {
234
212
  &:after {
@@ -264,31 +242,25 @@
264
242
  color: $white;
265
243
  }
266
244
  }
267
- // 480
268
- @include responsive(xs) {
269
- width: ($grid-gutter * 20);
270
- }
271
- // colour
272
- @each $color in $palette-list {
273
- $i: index($palette-list, $color);
274
-
275
- .page-#{$color} & {
276
- background-color: nth($palette-color-dark-m, $i);
277
- }
278
- }
279
245
  }
280
246
 
247
+ // colour
248
+ @each $color in $palette-list {
249
+ $i: index($palette-list, $color);
250
+
251
+ .page-#{$color} .menu-top {
252
+ background-color: nth($palette-color-dark-m, $i);
253
+ }
254
+ }
255
+
281
256
  .menu-top-form {
282
257
  margin-top: ($line-height / 4);
283
258
  margin-bottom: ($line-height / 4);
284
259
  }
285
260
 
286
261
  .menu-top-img {
287
- display: -webkit-box;
288
- display: -moz-box;
289
- display: -ms-flexbox;
290
- display: -webkit-flex;
291
- display: flex;
262
+ align-items: center;
263
+ display: flex;
292
264
  height: 100%;
293
265
  justify-content: center;
294
266
  overflow: hidden;
@@ -296,12 +268,10 @@
296
268
  top: 0;
297
269
  left: 0;
298
270
  width: 100%;
299
- -webkit-align-items: center;
300
- align-items: center;
301
271
  img {
302
272
  min-height: 100%;
303
273
  width: 100%;
304
- @include opacity(0.5);
274
+ opacity: 0.5;
305
275
  }
306
276
  }
307
277
 
@@ -310,14 +280,15 @@
310
280
  position: relative;
311
281
  }
312
282
 
283
+ .menu-top-info-sub {
284
+ font-weight: $font-weight-light;
285
+ padding: ($line-height / 2) $grid-gutter;
286
+ position: relative;
287
+ }
288
+
313
289
  .menu-top-user {
314
- display: -webkit-box;
315
- display: -moz-box;
316
- display: -ms-flexbox;
317
- display: -webkit-flex;
318
- display: flex;
319
- -webkit-align-items: center;
320
- align-items: center;
290
+ align-items: center;
291
+ display: flex;
321
292
  @include clearfix();
322
293
  }
323
294
 
@@ -339,80 +310,59 @@
339
310
  }
340
311
  }
341
312
 
342
- .nav-drawer {
343
- max-width: 85%;
344
- max-width: calc(100% - #{$grid-gutter * 4});
345
- // position
346
- top: 0;
347
- left: ($grid-gutter * -20);
348
- width: ($grid-gutter * 20);
349
- z-index: ($header-base + 1);
350
- .menu-content {
351
- padding-top: 0;
313
+ @mixin nav-drawer() {
314
+ background-color: transparent;
315
+ overflow: visible;
316
+ width: ($grid-gutter * 15);
317
+ .menu-scroll {
318
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
319
+ // left
320
+ left: 0;
321
+ width: ($grid-gutter * 15);
352
322
  }
353
- // 1440
354
- @include responsive(lg) {
323
+ &.menu-left {
324
+ ~ .content {
325
+ margin-left: ($grid-gutter * 15);
326
+ .content-heading,
327
+ .content-inner {
328
+ padding-left: $grid-gutter;
329
+ }
330
+ }
331
+ ~ .footer,
332
+ ~ .header {
333
+ padding-left: $grid-gutter;
355
334
  // position
356
- left: 0;
357
- width: ($grid-gutter * 15);
358
- @include box-shadow(0 0 10px rgba(0, 0, 0, 0.5));
359
- .menu-content,
360
- .menu-top {
361
- width: ($grid-gutter * 15);
335
+ left: ($grid-gutter * 15);
336
+ }
337
+ }
338
+ &.menu-right {
339
+ ~ .content {
340
+ margin-right: ($grid-gutter * 15);
341
+ .content-heading,
342
+ .content-inner {
343
+ padding-right: $grid-gutter;
362
344
  }
363
- // menu left
364
- &.menu-left {
365
- ~ .content {
366
- margin-left: ($grid-gutter * 15);
367
- .content-heading,
368
- .content-inner {
369
- padding-left: $grid-gutter;
370
- }
371
- }
372
- ~ .footer,
373
- ~ .header {
374
- padding-left: $grid-gutter;
375
- // position
376
- left: ($grid-gutter * 15);
377
- }
378
- }
379
- // menu right
380
- &.menu-right {
381
- // position
382
- right: 0;
383
- ~ .content {
384
- margin-right: ($grid-gutter * 15);
385
- .content-heading,
386
- .content-inner {
387
- padding-right: $grid-gutter;
388
- }
389
- }
390
- ~ .footer,
391
- ~ .header {
392
- padding-right: $grid-gutter;
393
- // position
394
- right: ($grid-gutter * 15);
395
- }
396
- }
397
345
  }
398
- }
399
-
400
- .nav-drawer-logo {
401
- @extend .header-logo;
402
- border-bottom: 1px solid $black-bg;
403
- color: $black-text;
404
- float: none;
405
- margin-bottom: ($line-height / 2);
406
- &:focus,
407
- &:hover {
408
- text-decoration: none;
346
+ ~ .footer,
347
+ ~ .header {
348
+ padding-right: $grid-gutter;
349
+ // position
350
+ right: ($grid-gutter * 15);
351
+ }
409
352
  }
410
353
  }
411
354
 
412
- .nav-drawer-open {
413
- overflow: hidden;
355
+ .nav-drawer {
356
+ // 992
357
+ @include responsive(md) {
358
+ &.nav-drawer-md {
359
+ @include nav-drawer()
360
+ }
361
+ }
414
362
  // 1440
415
363
  @include responsive(lg) {
416
- overflow: auto;
364
+ &.nav-drawer-lg {
365
+ @include nav-drawer();
366
+ }
417
367
  }
418
- }
368
+ }
@@ -5,7 +5,7 @@ module Material
5
5
  %w(stylesheets javascripts fonts images).each do |sub|
6
6
  app.config.assets.paths << root.join('app/assets', sub).to_s
7
7
  end
8
- app.config.assets.precompile << %r(MaterialDesignIcon\.(?:eot|svg|ttf|woff2?)$)
8
+ app.config.assets.precompile << %r(MaterialIcons-Regular\.(?:eot|svg|ttf|woff|woff2?)$)
9
9
  end
10
10
  end
11
11
  end
@@ -1,5 +1,5 @@
1
1
  module Material
2
2
  module Sass
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: material-sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - mkhairi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-21 00:00:00.000000000 Z
11
+ date: 2016-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -50,10 +50,11 @@ files:
50
50
  - LICENSE.txt
51
51
  - README.md
52
52
  - Rakefile
53
- - app/assets/fonts/MaterialDesignIcon.eot
54
- - app/assets/fonts/MaterialDesignIcon.svg
55
- - app/assets/fonts/MaterialDesignIcon.ttf
56
- - app/assets/fonts/MaterialDesignIcon.woff
53
+ - app/assets/fonts/MaterialIcons-Regular.eot
54
+ - app/assets/fonts/MaterialIcons-Regular.ttf
55
+ - app/assets/fonts/MaterialIcons-Regular.woff
56
+ - app/assets/fonts/MaterialIcons-Regular.woff2
57
+ - app/assets/javascripts/init.js
57
58
  - app/assets/javascripts/material-sprockets.js
58
59
  - app/assets/javascripts/material.js
59
60
  - app/assets/javascripts/material/_.js
@@ -68,7 +69,6 @@ files:
68
69
  - app/assets/javascripts/material/header.js
69
70
  - app/assets/javascripts/material/menu.js
70
71
  - app/assets/javascripts/material/modal.js
71
- - app/assets/javascripts/material/sortable.js
72
72
  - app/assets/javascripts/material/tab.js
73
73
  - app/assets/javascripts/material/tile.js
74
74
  - app/assets/javascripts/material/toast.js
@@ -86,12 +86,13 @@ files:
86
86
  - app/assets/stylesheets/material/addon/_material-design-icon.scss
87
87
  - app/assets/stylesheets/material/addon/_waves.scss
88
88
  - app/assets/stylesheets/material/addon/material-design-icon/_core.scss
89
- - app/assets/stylesheets/material/addon/material-design-icon/_icons.scss
89
+ - app/assets/stylesheets/material/addon/material-design-icon/_larger.scss
90
90
  - app/assets/stylesheets/material/addon/material-design-icon/_path.scss
91
91
  - app/assets/stylesheets/material/addon/material-design-icon/_variables.scss
92
92
  - app/assets/stylesheets/material/base.scss
93
93
  - app/assets/stylesheets/material/element/_avatar.scss
94
94
  - app/assets/stylesheets/material/element/_breadcrumb.scss
95
+ - app/assets/stylesheets/material/element/_button-flat.scss
95
96
  - app/assets/stylesheets/material/element/_button-float.scss
96
97
  - app/assets/stylesheets/material/element/_button.scss
97
98
  - app/assets/stylesheets/material/element/_card.scss
@@ -105,6 +106,8 @@ files:
105
106
  - app/assets/stylesheets/material/element/_label.scss
106
107
  - app/assets/stylesheets/material/element/_modal.scss
107
108
  - app/assets/stylesheets/material/element/_nav.scss
109
+ - app/assets/stylesheets/material/element/_progress-circular.scss
110
+ - app/assets/stylesheets/material/element/_progress-loadbar.scss
108
111
  - app/assets/stylesheets/material/element/_progress.scss
109
112
  - app/assets/stylesheets/material/element/_sortable.scss
110
113
  - app/assets/stylesheets/material/element/_tab.scss
@@ -144,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
147
  version: '0'
145
148
  requirements: []
146
149
  rubyforge_project:
147
- rubygems_version: 2.4.4
150
+ rubygems_version: 2.4.8
148
151
  signing_key:
149
152
  specification_version: 4
150
153
  summary: HTML5 UI design based on Google Material