material-sass 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. data/.gitignore +22 -0
  2. data/Gemfile +4 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +59 -0
  5. data/Rakefile +2 -0
  6. data/app/assets/fonts/FontAwesome.otf +0 -0
  7. data/app/assets/fonts/MaterialDesignIcon.eot +0 -0
  8. data/app/assets/fonts/MaterialDesignIcon.svg +767 -0
  9. data/app/assets/fonts/MaterialDesignIcon.ttf +0 -0
  10. data/app/assets/fonts/MaterialDesignIcon.woff +0 -0
  11. data/app/assets/fonts/fontawesome-webfont.eot +0 -0
  12. data/app/assets/fonts/fontawesome-webfont.svg +565 -0
  13. data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
  14. data/app/assets/fonts/fontawesome-webfont.woff +0 -0
  15. data/app/assets/fonts/fontawesome-webfont.woff2 +0 -0
  16. data/app/assets/javascripts/material-sprockets.js +1 -0
  17. data/app/assets/javascripts/material.js +403 -0
  18. data/app/assets/javascripts/material/_.js +11 -0
  19. data/app/assets/javascripts/material/btn.js +11 -0
  20. data/app/assets/javascripts/material/content.js +45 -0
  21. data/app/assets/javascripts/material/datepicker.js +21 -0
  22. data/app/assets/javascripts/material/dropdown.js +15 -0
  23. data/app/assets/javascripts/material/esc.js +10 -0
  24. data/app/assets/javascripts/material/footer.js +4 -0
  25. data/app/assets/javascripts/material/form-adv.js +65 -0
  26. data/app/assets/javascripts/material/header.js +17 -0
  27. data/app/assets/javascripts/material/menu.js +39 -0
  28. data/app/assets/javascripts/material/sortable.js +10 -0
  29. data/app/assets/javascripts/material/tab.js +31 -0
  30. data/app/assets/javascripts/material/tile.js +43 -0
  31. data/app/assets/javascripts/material/toast.js +68 -0
  32. data/app/assets/javascripts/material/winresize.js +13 -0
  33. data/app/assets/stylesheets/material.scss +3 -0
  34. data/app/assets/stylesheets/material/_addon.scss +2 -0
  35. data/app/assets/stylesheets/material/_code.scss +54 -0
  36. data/app/assets/stylesheets/material/_element.scss +15 -0
  37. data/app/assets/stylesheets/material/_grid.scss +83 -0
  38. data/app/assets/stylesheets/material/_mixin.scss +4 -0
  39. data/app/assets/stylesheets/material/_reset.scss +403 -0
  40. data/app/assets/stylesheets/material/_theme.scss +4 -0
  41. data/app/assets/stylesheets/material/_utilitise.scss +252 -0
  42. data/app/assets/stylesheets/material/_variable-color.scss +6 -0
  43. data/app/assets/stylesheets/material/_variable.scss +116 -0
  44. data/app/assets/stylesheets/material/addon/_font-awesome.scss +18 -0
  45. data/app/assets/stylesheets/material/addon/_material-design-icon.scss +3053 -0
  46. data/app/assets/stylesheets/material/addon/font-awesome/_animated.scss +33 -0
  47. data/app/assets/stylesheets/material/addon/font-awesome/_bordered-pulled.scss +11 -0
  48. data/app/assets/stylesheets/material/addon/font-awesome/_core.scss +10 -0
  49. data/app/assets/stylesheets/material/addon/font-awesome/_fixed-width.scss +5 -0
  50. data/app/assets/stylesheets/material/addon/font-awesome/_flipped-rotated.scss +29 -0
  51. data/app/assets/stylesheets/material/addon/font-awesome/_icon.scss +593 -0
  52. data/app/assets/stylesheets/material/addon/font-awesome/_icons.scss +593 -0
  53. data/app/assets/stylesheets/material/addon/font-awesome/_larger.scss +22 -0
  54. data/app/assets/stylesheets/material/addon/font-awesome/_list.scss +21 -0
  55. data/app/assets/stylesheets/material/addon/font-awesome/_mixins.scss +25 -0
  56. data/app/assets/stylesheets/material/addon/font-awesome/_path.scss +12 -0
  57. data/app/assets/stylesheets/material/addon/font-awesome/_stacked.scss +29 -0
  58. data/app/assets/stylesheets/material/addon/font-awesome/_variable.scss +601 -0
  59. data/app/assets/stylesheets/material/addon/font-awesome/_variables.scss +602 -0
  60. data/app/assets/stylesheets/material/base.scss +16 -0
  61. data/app/assets/stylesheets/material/element/_avatar.scss +63 -0
  62. data/app/assets/stylesheets/material/element/_button-float.scss +145 -0
  63. data/app/assets/stylesheets/material/element/_button.scss +131 -0
  64. data/app/assets/stylesheets/material/element/_card.scss +203 -0
  65. data/app/assets/stylesheets/material/element/_dropdown.scss +116 -0
  66. data/app/assets/stylesheets/material/element/_form-adv-datepicker.scss +265 -0
  67. data/app/assets/stylesheets/material/element/_form-adv.scss +277 -0
  68. data/app/assets/stylesheets/material/element/_form.scss +226 -0
  69. data/app/assets/stylesheets/material/element/_modal.scss +121 -0
  70. data/app/assets/stylesheets/material/element/_nav.scss +40 -0
  71. data/app/assets/stylesheets/material/element/_sortable.scss +8 -0
  72. data/app/assets/stylesheets/material/element/_tab.scss +71 -0
  73. data/app/assets/stylesheets/material/element/_table.scss +77 -0
  74. data/app/assets/stylesheets/material/element/_tile.scss +154 -0
  75. data/app/assets/stylesheets/material/element/_toast.scss +61 -0
  76. data/app/assets/stylesheets/material/mixin/_css3.scss +52 -0
  77. data/app/assets/stylesheets/material/mixin/_grid.scss +82 -0
  78. data/app/assets/stylesheets/material/mixin/_responsive.scss +32 -0
  79. data/app/assets/stylesheets/material/mixin/_utilitise.scss +35 -0
  80. data/app/assets/stylesheets/material/project.scss +2 -0
  81. data/app/assets/stylesheets/material/theme/_content.scss +79 -0
  82. data/app/assets/stylesheets/material/theme/_footer.scss +23 -0
  83. data/app/assets/stylesheets/material/theme/_header.scss +103 -0
  84. data/app/assets/stylesheets/material/theme/_menu.scss +221 -0
  85. data/lib/material-sass.rb +26 -0
  86. data/lib/material-sass/engine.rb +12 -0
  87. data/lib/material-sass/version.rb +5 -0
  88. data/material-sass.gemspec +23 -0
  89. metadata +166 -0
@@ -0,0 +1,35 @@
1
+ @mixin clearfix() {
2
+ &:after,
3
+ &:before {
4
+ content: "";
5
+ display: table;
6
+ line-height: 0;
7
+ }
8
+ &:after {
9
+ clear: both;
10
+ }
11
+ }
12
+
13
+ @mixin form-label() {
14
+ line-height: $line-height;
15
+ margin-top: 0;
16
+ margin-bottom: 0;
17
+ padding-top: (($input-height - $line-height) / 2);
18
+ padding-bottom: (($input-height - $line-height) / 2);
19
+ text-align: right;
20
+ }
21
+
22
+ @mixin img-responsive() {
23
+ display: block;
24
+ height: auto;
25
+ max-width: 100%;
26
+ width: 100% \9;
27
+ }
28
+
29
+ @mixin text-overflow() {
30
+ display: block;
31
+ line-height: inherit;
32
+ overflow: hidden;
33
+ text-overflow: ellipsis;
34
+ white-space: nowrap;
35
+ }
@@ -0,0 +1,2 @@
1
+ @import "mixin";
2
+ @import "variable";
@@ -0,0 +1,79 @@
1
+ .content {
2
+ padding-bottom: $line-height;
3
+ .searching & {
4
+ display: none;
5
+ }
6
+ }
7
+
8
+ .content-heading {
9
+ background-color: $brand-color;
10
+ color: $white;
11
+ overflow: hidden;
12
+ padding-top: ($line-height * 2);
13
+ position: relative;
14
+ z-index: 1;
15
+ @include transition(background-color 0.3s $timing, color 0.3s $timing);
16
+ @each $color in $palette-list {
17
+ $i: index($palette-list, $color);
18
+
19
+ .page-#{$color} & {
20
+ background-color: nth($palette-color, $i);
21
+ }
22
+ }
23
+ .heading {
24
+ font-weight: 300;
25
+ }
26
+ }
27
+
28
+ .content-nav {
29
+ background-color: $white;
30
+ @include box-shadow(0 0 1px rgba(0, 0, 0, 0.5));
31
+ }
32
+
33
+ .content-sub-heading {
34
+ color: $brand-color;
35
+ font-size: $font-size-h4;
36
+ font-weight: 400;
37
+ line-height: $line-height-h4;
38
+ @each $color in $palette-list {
39
+ $i: index($palette-list, $color);
40
+
41
+ .page-#{$color} & {
42
+ color: nth($palette-color, $i);
43
+ }
44
+ }
45
+ }
46
+
47
+ // fixed left/right hand side column
48
+ .content-fix.fixed {
49
+ .content-fix-wrap {
50
+ overflow-x: hidden;
51
+ overflow-y: auto;
52
+ padding-right: ($grid-gutter * 2);
53
+ padding-left: ($grid-gutter * 2);
54
+ position: absolute;
55
+ top: 0;
56
+ right: ($grid-gutter * -1);
57
+ bottom: 0;
58
+ left: ($grid-gutter * -1);
59
+ -webkit-overflow-scrolling: touch;
60
+ -ms-overflow-style: -ms-autohiding-scrollbar;
61
+ }
62
+ .content-fix-scroll {
63
+ position: fixed;
64
+ top: ($line-height * 2);
65
+ bottom: 0;
66
+ }
67
+ }
68
+
69
+ .content-fix-scroll {
70
+ margin-right: ($grid-gutter * -1);
71
+ margin-left: ($grid-gutter * -1);
72
+ overflow: hidden;
73
+ padding-right: $grid-gutter;
74
+ padding-left: $grid-gutter;
75
+ }
76
+
77
+ .row-fix {
78
+ position: relative;
79
+ }
@@ -0,0 +1,23 @@
1
+ .footer {
2
+ background-color: $white-bg-light;
3
+ border-top: 1px solid $black-bg;
4
+ color: $black-hint;
5
+ text-align: center;
6
+ position: absolute;
7
+ bottom: 0;
8
+ left: 0;
9
+ width: 100%;
10
+ a {
11
+ color: $black-hint;
12
+ &:focus,
13
+ &:hover {
14
+ color: $black-text;
15
+ }
16
+ }
17
+ }
18
+
19
+ .footer-fix {
20
+ background-color: $white-bg;
21
+ position: fixed;
22
+ z-index: $header-base;
23
+ }
@@ -0,0 +1,103 @@
1
+ .header {
2
+ background-color: $brand-color;
3
+ color: $white;
4
+ position: fixed;
5
+ top: 0;
6
+ left: 0;
7
+ width: 100%;
8
+ z-index: $header-base;
9
+ @include box-shadow(0 0 0 rgba(0, 0, 0, 0));
10
+ @include clearfix();
11
+ @include transition(background-color 0.3s $timing, box-shadow 0.15s linear);
12
+ &.fixed,
13
+ .menu-open & {
14
+ background-color: $brand-color-dark-m;
15
+ @include box-shadow(0 1px 10px rgba(0, 0, 0, 0.5));
16
+ }
17
+ @each $color in $palette-list {
18
+ $i: index($palette-list, $color);
19
+
20
+ .page-#{$color} & {
21
+ background-color: nth($palette-color, $i);
22
+ &.fixed {
23
+ background-color: nth($palette-color-dark-m, $i);
24
+ }
25
+ }
26
+ .menu-open.page-#{$color} & {
27
+ background-color: nth($palette-color-dark-m, $i);
28
+ }
29
+ }
30
+ a {
31
+ color: $white;
32
+ }
33
+ .dropdown.open .dropdown-toggle {
34
+ color: $black-text;
35
+ }
36
+ .dropdown-menu a {
37
+ color: $black-text;
38
+ }
39
+ .nav {
40
+ margin: 0;
41
+ > li {
42
+ > a {
43
+ .avatar,
44
+ .fa,
45
+ .icon {
46
+ @include transition(all 0.3s $timing);
47
+ }
48
+ .header-close {
49
+ position: absolute;
50
+ top: ($line-height / 2 + ($line-height - $font-size) / 2);
51
+ left: 0;
52
+ text-align: center;
53
+ width: 100%;
54
+ @include opacity(0);
55
+ @include transform(rotate(-225deg));
56
+ }
57
+ }
58
+ &.active > a {
59
+ .avatar,
60
+ .fa,
61
+ .icon {
62
+ @include opacity(0);
63
+ @include transform(rotate(225deg));
64
+ }
65
+ .header-close {
66
+ @include opacity(1);
67
+ @include transform(rotate(0));
68
+ }
69
+ }
70
+ }
71
+ }
72
+ }
73
+
74
+ .header-btn {
75
+ display: block;
76
+ float: left;
77
+ height: ($line-height * 2);
78
+ padding: (($line-height * 2 - $line-height-h4) / 2) $grid-gutter;
79
+ text-align: center;
80
+ &:focus,
81
+ &:hover {
82
+ text-decoration: none;
83
+ }
84
+ }
85
+
86
+ .header-logo,
87
+ .header-text {
88
+ display: block;
89
+ float: left;
90
+ font-weight: 300;
91
+ height: ($line-height * 2);
92
+ line-height: $line-height-h4;
93
+ margin: 0;
94
+ padding: (($line-height * 2 - $line-height-h4) / 2) 0;
95
+ &:focus,
96
+ &:hover {
97
+ text-decoration: none;
98
+ }
99
+ }
100
+
101
+ .header-logo {
102
+ font-size: $font-size-h4;
103
+ }
@@ -0,0 +1,221 @@
1
+ .menu {
2
+ position: fixed;
3
+ top: ($line-height * 2);
4
+ bottom: 0;
5
+ left: 0;
6
+ width: 100%;
7
+ z-index: ($header-base - 1);
8
+ @include box-shadow(0 0 0 rgba(0, 0, 0, 0));
9
+ @include transform(translate3d(-100%, 0, 0));
10
+ -webkit-transition: -webkit-box-shadow 0s linear 0.3s, -webkit-transform 0.3s $timing 0s;
11
+ transition: box-shadow 0s linear 0.3s, transform 0.3s $timing 0s;
12
+ &.menu-right {
13
+ // position
14
+ right: 0;
15
+ left: auto;
16
+ @include transform(translate3d(100%, 0, 0));
17
+ }
18
+ &.open {
19
+ @include box-shadow(0 0 10px rgba(0, 0, 0, 0.5));
20
+ @include transform(translate3d(0, 0, 0));
21
+ -webkit-transition: -webkit-box-shadow 0s linear 0s, -webkit-transform 0.3s $timing 0s;
22
+ transition: box-shadow 0s linear 0s, transform 0.3s $timing 0s;
23
+ }
24
+ // 480
25
+ @include responsive(xs) {
26
+ width: 320px;
27
+ }
28
+ // 992
29
+ @include responsive(md) {
30
+ width: 400px;
31
+ }
32
+ // no boxshadow
33
+ .no-boxshadow & {
34
+ border-right: 1px solid $black-hint;
35
+ &.menu-right {
36
+ border-right: 0;
37
+ border-left: 1px solid $black-hint;
38
+ }
39
+ }
40
+ // no csstransforms
41
+ .no-csstransforms & {
42
+ display: none;
43
+ &.open {
44
+ display: block;
45
+ }
46
+ }
47
+ }
48
+
49
+ .menu-content {
50
+ padding-top: $line-height;
51
+ padding-bottom: $line-height;
52
+ hr {
53
+ border-top-color: $black-bg;
54
+ }
55
+ .nav {
56
+ margin-top: 0;
57
+ margin-bottom: 0;
58
+ a {
59
+ color: $black-sec;
60
+ font-weight: 700;
61
+ overflow: hidden;
62
+ text-overflow: ellipsis;
63
+ white-space: nowrap;
64
+ &:focus,
65
+ &:hover {
66
+ background-color: $white-bg-light;
67
+ }
68
+ .fa,
69
+ .icon {
70
+ margin-right: $grid-gutter;
71
+ }
72
+ }
73
+ li.active > a {
74
+ background-color: $white-bg;
75
+ color: $brand-color;
76
+ .page-blue & {
77
+ color: $palette-blue;
78
+ }
79
+ .page-green & {
80
+ color: $palette-green;
81
+ }
82
+ .page-purple & {
83
+ color: $palette-purple;
84
+ }
85
+ .page-red & {
86
+ color: $palette-red;
87
+ }
88
+ .page-yellow & {
89
+ color: $palette-yellow;
90
+ }
91
+ }
92
+ > li.active > a {
93
+ background-color: $white-bg-dark;
94
+ }
95
+ ul a {
96
+ font-weight: 400;
97
+ padding-left: ($grid-gutter * 3);
98
+ }
99
+ }
100
+ // 480
101
+ @include responsive(xs) {
102
+ width: 320px;
103
+ }
104
+ // 992
105
+ @include responsive(md) {
106
+ width: 400px;
107
+ }
108
+ }
109
+
110
+ .menu-content-inner {
111
+ padding-right: $grid-gutter;
112
+ padding-left: $grid-gutter;
113
+ }
114
+
115
+ .menu-scroll {
116
+ background-color: $white;
117
+ height: 100%;
118
+ overflow: hidden;
119
+ position: absolute;
120
+ top: 0;
121
+ left: 0;
122
+ width: 100%;
123
+ z-index: 1;
124
+ }
125
+
126
+ .menu-top {
127
+ background-color: $black-text;
128
+ color: $white-bg;
129
+ position: relative;
130
+ a {
131
+ color: $white-bg;
132
+ text-decoration: none;
133
+ &:focus,
134
+ &:hover {
135
+ color: $white;
136
+ }
137
+ }
138
+ // 480
139
+ @include responsive(xs) {
140
+ width: 320px;
141
+ }
142
+ // 992
143
+ @include responsive(md) {
144
+ width: 400px;
145
+ }
146
+ }
147
+
148
+ .menu-top-form {
149
+ margin-top: ($line-height / 4);
150
+ margin-bottom: ($line-height / 4);
151
+ }
152
+
153
+ .menu-top-img {
154
+ display: -webkit-box;
155
+ display: -moz-box;
156
+ display: -ms-flexbox;
157
+ display: -webkit-flex;
158
+ display: flex;
159
+ height: 100%;
160
+ justify-content: center;
161
+ overflow: hidden;
162
+ position: absolute;
163
+ top: 0;
164
+ left: 0;
165
+ width: 100%;
166
+ -webkit-align-items: center;
167
+ align-items: center;
168
+ img {
169
+ min-height: 100%;
170
+ width: 100%;
171
+ @include opacity(0.5);
172
+ }
173
+ }
174
+
175
+ .menu-top-info {
176
+ padding: ($line-height * 1.5) $grid-gutter;
177
+ position: relative;
178
+ }
179
+
180
+ .menu-top-user {
181
+ display: -webkit-box;
182
+ display: -moz-box;
183
+ display: -ms-flexbox;
184
+ display: -webkit-flex;
185
+ display: flex;
186
+ -webkit-align-items: center;
187
+ align-items: center;
188
+ @include clearfix();
189
+ }
190
+
191
+ .menu-wrap {
192
+ overflow-x: hidden;
193
+ overflow-y: auto;
194
+ position: absolute;
195
+ top: 0;
196
+ right: 0;
197
+ bottom: 0;
198
+ left: 0;
199
+ -webkit-overflow-scrolling: touch;
200
+ -ms-overflow-style: -ms-autohiding-scrollbar;
201
+ // 480
202
+ @include responsive(xs) {
203
+ padding-right: ($grid-gutter * 2);
204
+ // position
205
+ right: ($grid-gutter * -2);
206
+ }
207
+ }
208
+
209
+ // fbtn
210
+ .menu-right.open ~ .fbtn-container{
211
+ // 480
212
+ @include responsive(xs) {
213
+ // position
214
+ right: ($grid-gutter + 320);
215
+ }
216
+ // 992
217
+ @include responsive(md) {
218
+ // position
219
+ right: ($grid-gutter + 400);
220
+ }
221
+ }