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,16 @@
1
+ // 1. import mixins and variables
2
+ @import "mixin";
3
+ @import "variable";
4
+
5
+ // 2. reset css
6
+ @import "reset";
7
+
8
+ // 3. ui elements
9
+ @import "addon";
10
+ @import "code";
11
+ @import "grid";
12
+ @import "utilitise";
13
+
14
+ // 4. theme elements
15
+ @import "element";
16
+ @import "theme";
@@ -0,0 +1,63 @@
1
+ .avatar {
2
+ background-color: $black-bg;
3
+ border-radius: 50%;
4
+ color: $black-text;
5
+ display: block;
6
+ height: ($line-height * 2);
7
+ line-height: ($line-height * 2);
8
+ text-align: center;
9
+ width: ($line-height * 2);
10
+ &:focus,
11
+ &:hover {
12
+ text-decoration: none;
13
+ }
14
+ &.avatar-inline {
15
+ display: inline-block;
16
+ }
17
+ &.avatar-lg {
18
+ height: ($line-height * 4);
19
+ line-height: ($line-height * 4);
20
+ width: ($line-height * 4);
21
+ }
22
+ &.avatar-sm {
23
+ height: ($line-height * 1.5);
24
+ line-height: ($line-height * 1.5);
25
+ margin-top: ($line-height * -0.25);
26
+ margin-bottom: ($line-height * -0.25);
27
+ width: ($line-height * 1.5);
28
+ }
29
+ &.avatar-transparent {
30
+ background-color: transparent;
31
+ }
32
+ &.pull-left {
33
+ margin-right: $grid-gutter;
34
+ }
35
+ &.pull-right {
36
+ margin-left: $grid-gutter;
37
+ }
38
+ img {
39
+ border-radius: 50%;
40
+ height: 100%;
41
+ vertical-align: top;
42
+ width: 100%;
43
+ }
44
+ .fa {
45
+ display: block;
46
+ height: 100%;
47
+ line-height: inherit;
48
+ text-align: center;
49
+ }
50
+ .fa-text {
51
+ font-family: inherit;
52
+ }
53
+ }
54
+
55
+ // colour
56
+ @each $color in $palette-list {
57
+ $i: index($palette-list, $color);
58
+
59
+ .avatar-#{$color} {
60
+ background-color: nth($palette-color, $i);
61
+ color: $white;
62
+ }
63
+ }
@@ -0,0 +1,145 @@
1
+ .fbtn {
2
+ background-color: $black-bg;
3
+ border-radius: 50%;
4
+ clear: both;
5
+ color: $white;
6
+ cursor: pointer;
7
+ display: block;
8
+ font-size: $line-height;
9
+ padding: ($line-height / 2) 0;
10
+ position: relative;
11
+ text-align: center;
12
+ width: ($line-height * 2);
13
+ @include box-shadow(0 3px 10px rgba(0, 0, 0, 0.5));
14
+ .fbtn-dropdown & {
15
+ margin-bottom: ($line-height / 2);
16
+ @include opacity(0);
17
+ @include transform(scale(0.5));
18
+ -webkit-transition: opacity 0.15s $timing 0s, -webkit-transform 0.15s $timing 0s;
19
+ transition: opacity 0.15s $timing 0s, transform 0.15s $timing 0s;
20
+ &:nth-last-child(1) {
21
+ -webkit-transition-delay: 300ms;
22
+ transition-delay: 300ms;
23
+ }
24
+ &:nth-last-child(2) {
25
+ -webkit-transition-delay: 250ms;
26
+ transition-delay: 250ms;
27
+ }
28
+ &:nth-last-child(3) {
29
+ -webkit-transition-delay: 200ms;
30
+ transition-delay: 200ms;
31
+ }
32
+ &:nth-last-child(4) {
33
+ -webkit-transition-delay: 150ms;
34
+ transition-delay: 150ms;
35
+ }
36
+ &:nth-last-child(5) {
37
+ -webkit-transition-delay: 100ms;
38
+ transition-delay: 100ms;
39
+ }
40
+ &:nth-last-child(6) {
41
+ -webkit-transition-delay: 50ms;
42
+ transition-delay: 50ms;
43
+ }
44
+ .fbtn-inner.open & {
45
+ @include opacity(1);
46
+ @include transform(scale(1));
47
+ -webkit-transition-delay: 300ms;
48
+ transition-delay: 300ms;
49
+ &:nth-last-child(1) {
50
+ -webkit-transition-delay: 0s;
51
+ transition-delay: 0s;
52
+ }
53
+ &:nth-last-child(2) {
54
+ -webkit-transition-delay: 50ms;
55
+ transition-delay: 50ms;
56
+ }
57
+ &:nth-last-child(3) {
58
+ -webkit-transition-delay: 100ms;
59
+ transition-delay: 100ms;
60
+ }
61
+ &:nth-last-child(4) {
62
+ -webkit-transition-delay: 150ms;
63
+ transition-delay: 150ms;
64
+ }
65
+ &:nth-last-child(5) {
66
+ -webkit-transition-delay: 200ms;
67
+ transition-delay: 200ms;
68
+ }
69
+ &:nth-last-child(6) {
70
+ -webkit-transition-delay: 250ms;
71
+ transition-delay: 250ms;
72
+ }
73
+ }
74
+ }
75
+ }
76
+
77
+ a.fbtn {
78
+ &:focus,
79
+ &:hover {
80
+ color: $white;
81
+ @include box-shadow(0 3px 10px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(0, 0, 0, 0.5));
82
+ }
83
+ }
84
+
85
+ .fbtn-container {
86
+ position: fixed;
87
+ right: $grid-gutter;
88
+ bottom: $line-height;
89
+ z-index: ($header-base + 1);
90
+ @include transition(margin-bottom 0.3s $timing, right 0.3s $timing);
91
+ }
92
+
93
+ .fbtn-dropdown {
94
+ max-height: 0;
95
+ overflow: hidden;
96
+ padding-right: $grid-gutter;
97
+ padding-left: $grid-gutter;
98
+ position: absolute;
99
+ right: ($grid-gutter * -1);
100
+ bottom: 100%;
101
+ @include transition(max-height 0s linear 0.5s);
102
+ .fbtn-inner.open & {
103
+ max-height: 99999px;
104
+ overflow: visible;
105
+ @include transition(max-height 0s linear 0s);
106
+ }
107
+ }
108
+
109
+ .fbtn-rotate {
110
+ @include transform(rotate(0deg));
111
+ -webkit-transition: -webkit-transform 0.3s $timing 0s;
112
+ transition: transform 0.3s $timing 0s;
113
+ .fbtn-inner.open & {
114
+ @include transform(rotate(225deg));
115
+ }
116
+ }
117
+
118
+ .fbtn-text {
119
+ background-color: $black-text;
120
+ background-color: rgba(0, 0, 0, 0.8);
121
+ border-radius: 2px;
122
+ display: none;
123
+ font-size: $font-size-h6;
124
+ margin-top: ($line-height / -2);
125
+ margin-right: $grid-gutter;
126
+ padding-right: ($grid-gutter / 2);
127
+ padding-left: ($grid-gutter / 2);
128
+ position: absolute;
129
+ top: 50%;
130
+ right: 100%;
131
+ white-space: nowrap;
132
+ .no-touch .fbtn-inner.open .fbtn:hover &,
133
+ .touch .fbtn-inner.open & {
134
+ display: block;
135
+ }
136
+ }
137
+
138
+ // colour
139
+ @each $color in $palette-list {
140
+ $i: index($palette-list, $color);
141
+
142
+ .fbtn-#{$color} {
143
+ background-color: nth($palette-color, $i);
144
+ }
145
+ }
@@ -0,0 +1,131 @@
1
+ .btn {
2
+ background-color: $white;
3
+ background-image: none;
4
+ background-position: 50% 50%;
5
+ background-size: 100% 100%;
6
+ border: 1px solid transparent;
7
+ border-radius: 2px;
8
+ color: $black-text;
9
+ cursor: pointer;
10
+ display: inline-block;
11
+ font-size: $font-size;
12
+ font-weight: 400;
13
+ line-height: $line-height;
14
+ margin-bottom: 0;
15
+ max-width: 100%;
16
+ padding: (($btn-height - $line-height - 2) / 2) $grid-gutter;
17
+ position: relative;
18
+ text-align: center;
19
+ text-transform: uppercase;
20
+ vertical-align: middle;
21
+ white-space: nowrap;
22
+ @include box-shadow(0 1px 5px rgba(0, 0, 0, 0.15), 0 1px 5px rgba(0, 0, 0, 0.15));
23
+ @include transition(all 0.45s $timing, background-color 0.3s linear 0s);
24
+ @include user-select(none);
25
+ &:active,
26
+ &:focus,
27
+ &:hover {
28
+ color: $black-text;
29
+ outline: 0;
30
+ text-decoration: none;
31
+ @include box-shadow(0 5px 10px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.15));
32
+ }
33
+ &:active {
34
+ background-color: $white-bg;
35
+ @include transition(all 0.45s $timing, background-color 0s linear 0.45s);
36
+ }
37
+ &[disabled],
38
+ fieldset[disabled] & {
39
+ cursor: not-allowed;
40
+ @include opacity(0.5);
41
+ }
42
+ &.btn-active {
43
+ background-image: -webkit-radial-gradient(circle, $white-bg 10%, $white 11%);
44
+ background-image: radial-gradient(circle, $white-bg 10%, $white 11%);
45
+ background-size: 900% 900%;
46
+ }
47
+ }
48
+
49
+ .btn-block {
50
+ display: block;
51
+ white-space: normal;
52
+ width: 100%;
53
+ }
54
+
55
+ .btn-sm {
56
+ padding: 0 ($grid-gutter / 2);
57
+ }
58
+
59
+ // colour
60
+ @each $color in $palette-list {
61
+ $i: index($palette-list, $color);
62
+
63
+ .btn-#{$color} {
64
+ background-color: nth($palette-color, $i);
65
+ color: $white;
66
+ &:active,
67
+ &:focus,
68
+ &:hover {
69
+ color: $white;
70
+ }
71
+ &:active {
72
+ background-color: nth($palette-color-light-m, $i);
73
+ }
74
+ &[disabled],
75
+ fieldset[disabled] & {
76
+ background-color: nth($palette-color, $i);
77
+ }
78
+ &.btn-active {
79
+ background-image: -webkit-radial-gradient(circle, nth($palette-color-light-m, $i) 10%, nth($palette-color, $i) 11%);
80
+ background-image: radial-gradient(circle, nth($palette-color-light-m, $i) 10%, nth($palette-color, $i) 11%);
81
+ }
82
+ }
83
+ }
84
+
85
+ // flat
86
+ .btn-flat {
87
+ background-color: transparent;
88
+ @include box-shadow(none);
89
+ &[disabled],
90
+ fieldset[disabled] & {
91
+ color: $black-text;
92
+ }
93
+ }
94
+
95
+ // flat colour
96
+ @each $color in $palette-list {
97
+ $i: index($palette-list, $color);
98
+
99
+ .btn-flat.btn-#{$color} {
100
+ color: nth($palette-color, $i);
101
+ &:active {
102
+ background-color: nth($palette-color-light, $i);
103
+ }
104
+ &[disabled],
105
+ fieldset[disabled] & {
106
+ color: nth($palette-color, $i);
107
+ }
108
+ &.btn-active {
109
+ background-image: -webkit-radial-gradient(circle, nth($palette-color-light, $i) 10%, $white 11%);
110
+ background-image: radial-gradient(circle, nth($palette-color-light, $i) 10%, $white 11%);
111
+ }
112
+ }
113
+ }
114
+
115
+ // size
116
+ .btn-sm {
117
+ font-size: $font-size-h6;
118
+ line-height: ($line-height - 2);
119
+ padding-top: 0;
120
+ padding-bottom: 0;
121
+ }
122
+
123
+ // text
124
+ .btn-text {
125
+ color: $black-text;
126
+ display: inline-block;
127
+ font-size: $font-size;
128
+ font-weight: 400;
129
+ line-height: $line-height;
130
+ padding: (($btn-height - $line-height) / 2) 0;
131
+ }
@@ -0,0 +1,203 @@
1
+ .card {
2
+ background-color: $white;
3
+ border-radius: 2px;
4
+ display: block;
5
+ display: -webkit-box;
6
+ display: -moz-box;
7
+ display: -ms-flexbox;
8
+ display: -webkit-flex;
9
+ display: flex;
10
+ margin-bottom: $line-height;
11
+ position: relative;
12
+ @include box-shadow(0 0 1px rgba(0, 0, 0, 0.5));
13
+ @include transition(box-shadow 0.3s $timing);
14
+ &:focus,
15
+ &:hover {
16
+ @include box-shadow(0 0 5px rgba(0, 0, 0, 0.25));
17
+ }
18
+ }
19
+
20
+ .card-action {
21
+ position: relative;
22
+ @include clearfix();
23
+ &:before {
24
+ border-top: 1px solid $black-bg;
25
+ content: '';
26
+ display: block;
27
+ position: absolute;
28
+ top: 0;
29
+ left: 0;
30
+ width: 100%;
31
+ .card-header + & {
32
+ display: none;
33
+ }
34
+ }
35
+ .nav {
36
+ margin-top: 0;
37
+ margin-bottom: 0;
38
+ > li {
39
+ > a {
40
+ color: $black-sec;
41
+ &:focus,
42
+ &:hover {
43
+ color: $link-color;
44
+ }
45
+ }
46
+ &.active > a,
47
+ &.open > a {
48
+ color: $link-color;
49
+ }
50
+ }
51
+ }
52
+ }
53
+
54
+ .card-header {
55
+ padding-top: ($line-height / 4);
56
+ padding-bottom: ($line-height / 4);
57
+ position: relative;
58
+ @include clearfix();
59
+ &:before {
60
+ border-bottom: 1px solid $black-bg;
61
+ content: '';
62
+ display: block;
63
+ position: absolute;
64
+ bottom: 0;
65
+ left: 0;
66
+ width: 100%;
67
+ }
68
+ }
69
+
70
+ .card-heading {
71
+ display: block;
72
+ font-size: $font-size-h4;
73
+ line-height: $line-height-h4;
74
+ margin-top: $line-height;
75
+ margin-bottom: $line-height;
76
+ .card-header & {
77
+ margin-top: 0;
78
+ margin-bottom: 0;
79
+ }
80
+ }
81
+
82
+ .card-img {
83
+ position: relative;
84
+ img {
85
+ display: block;
86
+ height: auto;
87
+ width: 100%;
88
+ }
89
+ }
90
+
91
+ .card-img-heading {
92
+ background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5));
93
+ color: $white;
94
+ font-size: $font-size-h4;
95
+ line-height: $line-height-h4;
96
+ margin: 0;
97
+ padding: ($line-height / 2) $grid-gutter;
98
+ position: absolute;
99
+ bottom: 0;
100
+ left: 0;
101
+ width: 100%;
102
+ }
103
+
104
+ .card-inner {
105
+ padding-right: $grid-gutter;
106
+ padding-left: $grid-gutter;
107
+ position: relative;
108
+ z-index: 1;
109
+ .card-header & {
110
+ padding-top: ($line-height / 2);
111
+ padding-bottom: ($line-height / 2);
112
+ }
113
+ }
114
+
115
+ .card-main {
116
+ -webkit-box-flex: 1;
117
+ -moz-box-flex: 1;
118
+ -webkit-flex: 1;
119
+ -ms-flex: 1;
120
+ flex: 1;
121
+ }
122
+
123
+ .card-side {
124
+ background-color: $white-bg;
125
+ max-width: 33.33333%;
126
+ padding-right: $grid-gutter;
127
+ padding-left: $grid-gutter;
128
+ &[href] {
129
+ color: $black-text;
130
+ &:focus,
131
+ &:hover {
132
+ background-color: $white-bg-dark;
133
+ text-decoration: none;
134
+ }
135
+ }
136
+ &.card-side-img {
137
+ overflow: hidden;
138
+ padding-right: 0;
139
+ padding-left: 0;
140
+ }
141
+ &.card-side-right {
142
+ -webkit-box-ordinal-group: 2;
143
+ -moz-box-ordinal-group: 2;
144
+ -ms-flex-order: 2;
145
+ -webkit-order: 2;
146
+ order: 2;
147
+ }
148
+ }
149
+
150
+ .card-wrap {
151
+ margin-top: $line-height;
152
+ }
153
+
154
+ // colour
155
+ @each $color in $palette-list {
156
+ $i: index($palette-list, $color);
157
+
158
+ .card-#{$color} {
159
+ @include box-shadow(0 0 1px nth($palette-color, $i));
160
+ &:focus,
161
+ &:hover {
162
+ @include box-shadow(0 0 5px nth($palette-color, $i));
163
+ }
164
+ .card-action:before {
165
+ border-top-color: nth($palette-color-light, $i);
166
+ }
167
+ .card-side {
168
+ background-color: nth($palette-color, $i);
169
+ color: $white;
170
+ &[href] {
171
+ &:focus,
172
+ &:hover {
173
+ background-color: nth($palette-color-dark-m, $i);
174
+ }
175
+ }
176
+ }
177
+ }
178
+
179
+ .card-#{$color}-bg {
180
+ background-color: nth($palette-color, $i);
181
+ .card-side {
182
+ background-color: nth($palette-color-dark-m, $i);
183
+ &[href] {
184
+ &:focus,
185
+ &:hover {
186
+ background-color: nth($palette-color-dark, $i);
187
+ }
188
+ }
189
+ }
190
+ }
191
+ }
192
+
193
+ .card[class*="-bg"] {
194
+ color: $white;
195
+ .card-action .nav > li {
196
+ > a {
197
+ color: $white;
198
+ }
199
+ &.open > a {
200
+ color: $black-text;
201
+ }
202
+ }
203
+ }