material_design_lite-sass 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +11 -0
  5. data/CHANGELOG.md +5 -0
  6. data/Gemfile +4 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +108 -0
  9. data/Rakefile +4 -0
  10. data/bin/console +14 -0
  11. data/bin/setup +7 -0
  12. data/lib/material_design_lite-sass.rb +46 -0
  13. data/lib/material_design_lite/sass/engine.rb +13 -0
  14. data/lib/material_design_lite/sass/version.rb +5 -0
  15. data/material_design_lite-sass.gemspec +28 -0
  16. data/vendor/assets/javascripts/material.js +3919 -0
  17. data/vendor/assets/javascripts/material/button.js +132 -0
  18. data/vendor/assets/javascripts/material/checkbox.js +265 -0
  19. data/vendor/assets/javascripts/material/data-table.js +149 -0
  20. data/vendor/assets/javascripts/material/icon-toggle.js +248 -0
  21. data/vendor/assets/javascripts/material/layout.js +434 -0
  22. data/vendor/assets/javascripts/material/mdlComponentHandler.js +346 -0
  23. data/vendor/assets/javascripts/material/menu.js +468 -0
  24. data/vendor/assets/javascripts/material/progress.js +116 -0
  25. data/vendor/assets/javascripts/material/rAF.js +38 -0
  26. data/vendor/assets/javascripts/material/radio.js +257 -0
  27. data/vendor/assets/javascripts/material/ripple.js +244 -0
  28. data/vendor/assets/javascripts/material/slider.js +252 -0
  29. data/vendor/assets/javascripts/material/spinner.js +140 -0
  30. data/vendor/assets/javascripts/material/switch.js +269 -0
  31. data/vendor/assets/javascripts/material/tabs.js +152 -0
  32. data/vendor/assets/javascripts/material/textfield.js +247 -0
  33. data/vendor/assets/javascripts/material/tooltip.js +146 -0
  34. data/vendor/assets/stylesheets/_material.scss +50 -0
  35. data/vendor/assets/stylesheets/material/_animation.scss +34 -0
  36. data/vendor/assets/stylesheets/material/_badge.scss +66 -0
  37. data/vendor/assets/stylesheets/material/_button.scss +298 -0
  38. data/vendor/assets/stylesheets/material/_card.scss +111 -0
  39. data/vendor/assets/stylesheets/material/_checkbox.scss +175 -0
  40. data/vendor/assets/stylesheets/material/_color-definitions.scss +599 -0
  41. data/vendor/assets/stylesheets/material/_data-table.scss +105 -0
  42. data/vendor/assets/stylesheets/material/_functions.scss +3 -0
  43. data/vendor/assets/stylesheets/material/_grid.scss +180 -0
  44. data/vendor/assets/stylesheets/material/_icon-toggle.scss +121 -0
  45. data/vendor/assets/stylesheets/material/_layout.scss +580 -0
  46. data/vendor/assets/stylesheets/material/_mega_footer.scss +309 -0
  47. data/vendor/assets/stylesheets/material/_menu.scss +193 -0
  48. data/vendor/assets/stylesheets/material/_mini_footer.scss +88 -0
  49. data/vendor/assets/stylesheets/material/_mixins.scss +268 -0
  50. data/vendor/assets/stylesheets/material/_palette.scss +2303 -0
  51. data/vendor/assets/stylesheets/material/_progress.scss +115 -0
  52. data/vendor/assets/stylesheets/material/_radio.scss +155 -0
  53. data/vendor/assets/stylesheets/material/_resets.scss +55 -0
  54. data/vendor/assets/stylesheets/material/_ripple.scss +42 -0
  55. data/vendor/assets/stylesheets/material/_shadow.scss +42 -0
  56. data/vendor/assets/stylesheets/material/_slider.scss +396 -0
  57. data/vendor/assets/stylesheets/material/_spinner.scss +248 -0
  58. data/vendor/assets/stylesheets/material/_switch.scss +199 -0
  59. data/vendor/assets/stylesheets/material/_tabs.scss +115 -0
  60. data/vendor/assets/stylesheets/material/_textfield.scss +190 -0
  61. data/vendor/assets/stylesheets/material/_tooltip.scss +66 -0
  62. data/vendor/assets/stylesheets/material/_typography.scss +297 -0
  63. data/vendor/assets/stylesheets/material/_variables.scss +572 -0
  64. data/vendor/assets/stylesheets/material/resets/_h5bp.scss +284 -0
  65. data/vendor/assets/stylesheets/material/resets/_mobile.scss +25 -0
  66. metadata +151 -0
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Copyright 2015 Google Inc. All Rights Reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ /* Material Design Lite */
18
+
19
+ // Variables and mixins
20
+ @import "material/variables";
21
+ @import "material/mixins";
22
+
23
+ // Resets and dependencies
24
+ @import "material/resets";
25
+ @import "material/typography";
26
+
27
+ // Components
28
+ @import "material/palette";
29
+ @import "material/ripple";
30
+ @import "material/animation";
31
+ @import "material/badge";
32
+ @import "material/button";
33
+ @import "material/card";
34
+ @import "material/checkbox";
35
+ @import "material/data-table";
36
+ @import "material/mega_footer";
37
+ @import "material/mini_footer";
38
+ @import "material/icon-toggle";
39
+ @import "material/menu";
40
+ @import "material/progress";
41
+ @import "material/layout";
42
+ @import "material/radio";
43
+ @import "material/slider";
44
+ @import "material/spinner";
45
+ @import "material/switch";
46
+ @import "material/tabs";
47
+ @import "material/textfield";
48
+ @import "material/tooltip";
49
+ @import "material/shadow";
50
+ @import "material/grid";
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Copyright 2015 Google Inc. All Rights Reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ @import "variables";
18
+
19
+
20
+ .mdl-animation--default {
21
+ transition-timing-function: $animation-curve-default;
22
+ }
23
+
24
+ .mdl-animation--fast-out-slow-in {
25
+ transition-timing-function: $animation-curve-fast-out-slow-in;
26
+ }
27
+
28
+ .mdl-animation--linear-out-slow-in {
29
+ transition-timing-function: $animation-curve-linear-out-slow-in;
30
+ }
31
+
32
+ .mdl-animation--fast-out-linear-in {
33
+ transition-timing-function: $animation-curve-fast-out-linear-in;
34
+ }
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Copyright 2015 Google Inc. All Rights Reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ @import "variables";
18
+
19
+ .mdl-badge {
20
+ position : relative;
21
+ white-space: nowrap;
22
+ margin-right: ($badge-size + $badge-padding);
23
+
24
+ &:not([data-badge]) {
25
+ margin-right: auto;
26
+ }
27
+
28
+ &[data-badge]:after {
29
+ content: attr(data-badge);
30
+
31
+ display: flex;
32
+ flex-direction: row;
33
+ flex-wrap: wrap;
34
+ justify-content: center;
35
+ align-content: center;
36
+ align-items: center;
37
+
38
+ position: absolute;
39
+ top: -($badge-size / 2);
40
+ right: -($badge-size + $badge-padding);
41
+
42
+ .mdl-button & {
43
+ top: -10px;
44
+ right: -5px;
45
+ }
46
+
47
+ font-family: $preferred_font;
48
+ font-weight: 600;
49
+ font-size: 12px;
50
+ width: $badge-size;
51
+ height: $badge-size;
52
+ border-radius : 50%;
53
+
54
+ background: $badge-background;
55
+ color: $badge-color;
56
+ }
57
+
58
+ &.mdl-badge--no-background {
59
+ &[data-badge]:after {
60
+ color: $badge-color-inverse;
61
+ background: $badge-background-inverse;
62
+
63
+ box-shadow: 0 0 1px gray;
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,298 @@
1
+ /**
2
+ * Copyright 2015 Google Inc. All Rights Reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ @import "variables";
18
+ @import "mixins";
19
+
20
+ // The button component. Defaults to a flat button.
21
+ .mdl-button {
22
+ background: transparent;
23
+ border: none;
24
+ border-radius: $button-border-radius;
25
+ color: $button-secondary-color;
26
+ display: block;
27
+ position: relative;
28
+ height: $button-height;
29
+ min-width: $button-min-width;
30
+ padding: 0 $button-padding;
31
+ display: inline-block;
32
+ @include typo-button();
33
+ overflow: hidden;
34
+ will-change: box-shadow, transform;
35
+ transition: box-shadow 0.2s $animation-curve-fast-out-linear-in,
36
+ background-color 0.2s $animation-curve-default,
37
+ color 0.2s $animation-curve-default;
38
+ outline: none;
39
+ cursor: pointer;
40
+ text-decoration: none;
41
+ text-align: center;
42
+ line-height: $button-height;
43
+ vertical-align: middle;
44
+
45
+ &::-moz-focus-inner {
46
+ border: 0;
47
+ }
48
+
49
+ &:hover {
50
+ background-color: $button-hover-color;
51
+ }
52
+
53
+ &:focus:not(:active) {
54
+ background-color: $button-focus-color;
55
+ }
56
+
57
+ &:active {
58
+ background-color: $button-active-color;
59
+ }
60
+
61
+ &.mdl-button--colored {
62
+ color: $button-primary-color-alt;
63
+
64
+ &:focus:not(:active) {
65
+ background-color: $button-focus-color-alt;
66
+ }
67
+ }
68
+ }
69
+
70
+ input.mdl-button[type="submit"] {
71
+ -webkit-appearance:none;
72
+ }
73
+
74
+ // Raised buttons
75
+ .mdl-button--raised {
76
+ background: $button-primary-color;
77
+ @include shadow-2dp();
78
+
79
+ &:active {
80
+ @include shadow-4dp();
81
+ background-color: $button-active-color;
82
+ }
83
+
84
+ &:focus:not(:active) {
85
+ @include focus-shadow();
86
+ background-color: $button-active-color;
87
+ }
88
+
89
+ &.mdl-button--colored {
90
+ background: $button-primary-color-alt;
91
+ color: $button-secondary-color-alt;
92
+
93
+ &:hover {
94
+ background-color: $button-hover-color-alt;
95
+ }
96
+
97
+ &:active {
98
+ background-color: $button-active-color-alt;
99
+ }
100
+
101
+ &:focus:not(:active) {
102
+ background-color: $button-active-color-alt;
103
+ }
104
+
105
+ & .mdl-ripple {
106
+ background: $button-ripple-color-alt;
107
+ }
108
+ }
109
+ }
110
+
111
+
112
+ // FABs
113
+ .mdl-button--fab {
114
+ border-radius: 50%;
115
+ font-size: $button-fab-font-size;
116
+ height: $button-fab-size;
117
+ margin: auto;
118
+ min-width: $button-fab-size;
119
+ width: $button-fab-size;
120
+ padding: 0;
121
+ overflow: hidden;
122
+ background: $button-primary-color;
123
+ box-shadow: 0 1px 1.5px 0 rgba(0,0,0,0.12), 0 1px 1px 0 rgba(0,0,0,0.24);
124
+ position: relative;
125
+ line-height: normal;
126
+
127
+ & .material-icons {
128
+ position: absolute;
129
+ top: 50%;
130
+ left: 50%;
131
+ transform: translate(- $button-fab-font-size / 2, - $button-fab-font-size / 2);
132
+ line-height: $button-fab-font-size;
133
+ width: $button-fab-font-size;
134
+ }
135
+
136
+ &.mdl-button--mini-fab {
137
+ height: $button-fab-size-mini;
138
+ min-width: $button-fab-size-mini;
139
+ width: $button-fab-size-mini;
140
+ }
141
+
142
+ & .mdl-button__ripple-container {
143
+ border-radius: 50%;
144
+ // Fixes clipping bug in Safari.
145
+ -webkit-mask-image: -webkit-radial-gradient(circle, white, black);
146
+ }
147
+
148
+ &:active {
149
+ @include shadow-4dp();
150
+ background-color: $button-active-color;
151
+ }
152
+
153
+ &:focus:not(:active) {
154
+ @include focus-shadow();
155
+ background-color: $button-active-color;
156
+ }
157
+
158
+ &.mdl-button--colored {
159
+ background: $button-fab-color-alt;
160
+ color: $button-fab-text-color-alt;
161
+
162
+ &:hover {
163
+ background-color: $button-fab-hover-color-alt;
164
+ }
165
+
166
+ &:focus:not(:active) {
167
+ background-color: $button-fab-active-color-alt;
168
+ }
169
+
170
+ &:active {
171
+ background-color: $button-fab-active-color-alt;
172
+ }
173
+
174
+ & .mdl-ripple {
175
+ background: $button-fab-ripple-color-alt;
176
+ }
177
+ }
178
+ }
179
+
180
+
181
+ // Icon buttons
182
+ .mdl-button--icon {
183
+ border-radius: 50%;
184
+ font-size: $button-fab-font-size;
185
+ height: $button-icon-size;
186
+ margin-left: 0;
187
+ margin-right: 0;
188
+ min-width: $button-icon-size;
189
+ width: $button-icon-size;
190
+ padding: 0;
191
+ overflow: hidden;
192
+ color: inherit;
193
+ line-height: normal;
194
+
195
+ & .material-icons {
196
+ position: absolute;
197
+ top: 50%;
198
+ left: 50%;
199
+ transform: translate(- $button-fab-font-size / 2, - $button-fab-font-size / 2);
200
+ line-height: $button-fab-font-size;
201
+ width: $button-fab-font-size;
202
+ }
203
+
204
+ &.mdl-button--mini-icon {
205
+ height: $button-icon-size-mini;
206
+ min-width: $button-icon-size-mini;
207
+ width: $button-icon-size-mini;
208
+
209
+ & .material-icons {
210
+ top: ($button-icon-size-mini - $button-fab-font-size) / 2;
211
+ left: ($button-icon-size-mini - $button-fab-font-size) / 2;
212
+ }
213
+ }
214
+
215
+ & .mdl-button__ripple-container {
216
+ border-radius: 50%;
217
+ // Fixes clipping bug in Safari.
218
+ -webkit-mask-image: -webkit-radial-gradient(circle, white, black);
219
+ }
220
+ }
221
+
222
+
223
+ // Ripples
224
+ .mdl-button__ripple-container {
225
+ display: block;
226
+ height: 100%;
227
+ left: 0px;
228
+ position: absolute;
229
+ top: 0px;
230
+ width: 100%;
231
+ z-index: 0;
232
+ overflow: hidden;
233
+
234
+ .mdl-button[disabled] & .mdl-ripple {
235
+ background-color: transparent;
236
+ }
237
+ }
238
+
239
+ // Colorized buttons
240
+
241
+ .mdl-button--primary.mdl-button--primary {
242
+ color: $button-primary-color-alt;
243
+ & .mdl-ripple {
244
+ background: $button-secondary-color-alt;
245
+ }
246
+ &.mdl-button--raised, &.mdl-button--fab {
247
+ color: $button-secondary-color-alt;
248
+ background-color: $button-primary-color-alt;
249
+ }
250
+ }
251
+
252
+ .mdl-button--accent.mdl-button--accent {
253
+ color: $button-fab-color-alt;
254
+ & .mdl-ripple {
255
+ background: $button-fab-text-color-alt;
256
+ }
257
+ &.mdl-button--raised, &.mdl-button--fab {
258
+ color: $button-fab-text-color-alt;
259
+ background-color: $button-fab-color-alt;
260
+ }
261
+ }
262
+
263
+ // Disabled buttons
264
+
265
+ .mdl-button {
266
+ // Bump up specificity by using [disabled] twice.
267
+ &[disabled][disabled] {
268
+ color: $button-secondary-color-disabled;
269
+ cursor: auto;
270
+ background-color: transparent;
271
+ }
272
+
273
+ &--fab {
274
+ // Bump up specificity by using [disabled] twice.
275
+ &[disabled][disabled] {
276
+ background-color: $button-primary-color-disabled;
277
+ color: $button-secondary-color-disabled;
278
+ @include shadow-2dp();
279
+ }
280
+ }
281
+
282
+ &--raised {
283
+ // Bump up specificity by using [disabled] twice.
284
+ &[disabled][disabled] {
285
+ background-color: $button-primary-color-disabled;
286
+ color: $button-secondary-color-disabled;
287
+ @include shadow-2dp();
288
+ }
289
+ }
290
+ &--colored {
291
+ // Bump up specificity by using [disabled] twice.
292
+ &[disabled][disabled] {
293
+ background-color: $button-primary-color-disabled;
294
+ color: $button-secondary-color-disabled;
295
+ @include shadow-2dp();
296
+ }
297
+ }
298
+ }