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,190 @@
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 container for the whole component.
21
+ .mdl-textfield {
22
+ position: relative;
23
+
24
+ font-size: 16px;
25
+
26
+ display: inline-block;
27
+
28
+ box-sizing: border-box;
29
+ width: 300px;
30
+ max-width: 100%;
31
+ margin: 0;
32
+ padding: $input-text-vertical-spacing 0;
33
+
34
+ // Align buttons, if used.
35
+ & .mdl-button {
36
+ position: absolute;
37
+ bottom: $input-text-vertical-spacing;
38
+ }
39
+ }
40
+
41
+ // Optional class to align right.
42
+ .mdl-textfield--align-right {
43
+ text-align: right;
44
+ }
45
+
46
+ // Optional class to display at full width.
47
+ .mdl-textfield--full-width {
48
+ width: 100%;
49
+ }
50
+
51
+ // Optional class to make the text field expandable.
52
+ .mdl-textfield--expandable {
53
+ min-width: $input-text-button-size;
54
+ width: auto;
55
+ min-height: $input-text-button-size;
56
+ }
57
+
58
+ // Styling for the input element.
59
+ .mdl-textfield__input {
60
+ border: none;
61
+ border-bottom: 1px solid $input-text-bottom-border-color;
62
+ display: inline-block;
63
+ font-size: $input-text-font-size;
64
+ margin: 0;
65
+ padding: $input-text-padding 0;
66
+ width: $input-text-width;
67
+ background: $input-text-font-size;
68
+ text-align: left;
69
+ color: inherit;
70
+
71
+ .mdl-textfield.is-focused & {
72
+ outline: none;
73
+ }
74
+
75
+ .mdl-textfield.is-invalid & {
76
+ border-color: $input-text-error-color;
77
+ box-shadow: none;
78
+ }
79
+
80
+ .mdl-textfield.is-disabled & {
81
+ background-color: transparent;
82
+ border-bottom: 1px dotted $input-text-disabled-color;
83
+ }
84
+ }
85
+
86
+ // Styling for the label / floating label.
87
+ .mdl-textfield__label {
88
+ bottom: 0;
89
+ color: $input-text-label-color;
90
+ font-size: $input-text-font-size;
91
+ left: 0;
92
+ right: 0;
93
+ pointer-events: none;
94
+ position: absolute;
95
+ top: ($input-text-padding + $input-text-vertical-spacing);
96
+ width: 100%;
97
+ overflow: hidden;
98
+ white-space: nowrap;
99
+ text-align: left;
100
+
101
+ .mdl-textfield.is-dirty & {
102
+ visibility: hidden;
103
+ }
104
+
105
+ // Floating Label
106
+ .mdl-textfield--floating-label & {
107
+ @include material-animation-default();
108
+ }
109
+
110
+ .mdl-textfield--floating-label.is-focused &,
111
+ .mdl-textfield--floating-label.is-dirty & {
112
+ color: $input-text-highlight-color;
113
+ font-size : $input-text-floating-label-fontsize;
114
+ top: $input-text-vertical-spacing - ($input-text-floating-label-fontsize + $input-text-padding);
115
+ visibility: visible;
116
+ }
117
+
118
+ .mdl-textfield--floating-label.is-focused .mdl-textfield__expandable-holder &,
119
+ .mdl-textfield--floating-label.is-dirty .mdl-textfield__expandable-holder &{
120
+ top: -($input-text-floating-label-fontsize + $input-text-padding);
121
+ }
122
+
123
+ .mdl-textfield--floating-label.is-invalid & {
124
+ color: $input-text-error-color;
125
+ font-size: 12px;
126
+ }
127
+
128
+ // The after label is the colored underline for the TextField.
129
+ &:after {
130
+ background-color: $input-text-highlight-color;
131
+ bottom: $input-text-vertical-spacing;
132
+ content: '';
133
+ height: 2px;
134
+ left: 45%;
135
+ position: absolute;
136
+ @include material-animation-default();
137
+ visibility: hidden;
138
+ width: 10px;
139
+ }
140
+
141
+ .mdl-textfield.is-focused &:after {
142
+ left: 0;
143
+ visibility: visible;
144
+ width: 100%;
145
+ }
146
+
147
+ .mdl-textfield.is-invalid &:after {
148
+ background-color: $input-text-error-color;
149
+ }
150
+ }
151
+
152
+ // TextField Error.
153
+ .mdl-textfield__error {
154
+ color: $input-text-error-color;
155
+ position: absolute;
156
+ font-size: 12px;
157
+ margin-top: 3px;
158
+ visibility: hidden;
159
+
160
+ .mdl-textfield.is-invalid & {
161
+ visibility: visible;
162
+ }
163
+ }
164
+
165
+ // Expandable Holder.
166
+ .mdl-textfield__expandable-holder {
167
+ display: inline-block;
168
+ position: relative;
169
+ margin-left: $input-text-button-size;
170
+
171
+ @include material-animation-default();
172
+ display: inline-block;
173
+
174
+ // Safari (possibly others) need to be convinced that this field is actually
175
+ // visible, otherwise it cannot be tabbed to nor focused via a <label>.
176
+ // TODO: In some cases (Retina displays), this is big enough to render the
177
+ // inner element :(
178
+ max-width: 0.1px;
179
+
180
+ .mdl-textfield.is-focused &, .mdl-textfield.is-dirty & {
181
+ // This is an unfortunate hack. Animating between widths in percent (%)
182
+ // in many browsers (Chrome, Firefox) only animates the inner visual style
183
+ // of the input - the outer bounding box still 'jumps'.
184
+ // Thus assume a sensible maximum, and animate to/from that value.
185
+ max-width: 600px;
186
+ }
187
+ .mdl-textfield__label:after {
188
+ bottom: 0;
189
+ }
190
+ }
@@ -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-tooltip {
20
+ transform: scale(0);
21
+ transform-origin: top center;
22
+ will-change: transform;
23
+ z-index: 999;
24
+ background: $tooltip-background-color;
25
+ border-radius: 2px;
26
+ color: $tooltip-text-color;
27
+ display: inline-block;
28
+ font-size: 10px;
29
+ font-weight: 500;
30
+ line-height: 14px;
31
+ max-width: 170px;
32
+ position: fixed;
33
+ top: -500px;
34
+ left: -500px;
35
+ padding: 8px;
36
+ text-align: center;
37
+ }
38
+ .mdl-tooltip.is-active {
39
+ animation: pulse 200ms $animation-curve-linear-out-slow-in forwards;
40
+ }
41
+
42
+ .mdl-tooltip--large {
43
+ line-height: 14px;
44
+ font-size: 14px;
45
+ padding: 16px;
46
+ }
47
+
48
+ @keyframes pulse {
49
+ 0% {
50
+ transform: scale(0);
51
+ opacity: 0;
52
+ }
53
+ 50% {
54
+ // Fixes a weird bug with the interaction between Safari and the result of
55
+ // the SASS compilation for the animation.
56
+ // Essentially, we need to make sure that "50%" and "100%" don't get merged
57
+ // into a single "50%, 100%" entry, so we need to avoid them having any
58
+ // matching properties.
59
+ transform: scale(0.99);
60
+ }
61
+ 100% {
62
+ transform: scale(1);
63
+ opacity: 1;
64
+ visibility: visible;
65
+ }
66
+ }
@@ -0,0 +1,297 @@
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
+ @if $target-elements-directly == true {
21
+ html, body {
22
+ font-family: $performance_font;
23
+ font-size: 14px;
24
+ font-weight: 400;
25
+ line-height: 20px;
26
+ }
27
+
28
+ h1, h2, h3, h4, h5, h6, p {
29
+ margin: 0;
30
+ padding: 0;
31
+ }
32
+
33
+ /**
34
+ * Styles for HTML elements
35
+ */
36
+
37
+ h1 small, h2 small, h3 small, h4 small, h5 small, h6 small {
38
+ @include typo-display-3($colorContrast: true);
39
+
40
+ font-size: 0.6em;
41
+ }
42
+
43
+ h1 {
44
+ @include typo-display-3;
45
+
46
+ margin-top: 24px;
47
+ margin-bottom: 24px;
48
+ }
49
+
50
+ h2 {
51
+ @include typo-display-2;
52
+
53
+ margin-top: 24px;
54
+ margin-bottom: 24px;
55
+ }
56
+
57
+ h3 {
58
+ @include typo-display-1;
59
+
60
+ margin-top: 24px;
61
+ margin-bottom: 24px;
62
+ }
63
+
64
+ h4 {
65
+ @include typo-headline;
66
+
67
+ margin-top: 24px;
68
+ margin-bottom: 16px;
69
+ }
70
+
71
+ h5 {
72
+ @include typo-title;
73
+
74
+ margin-top: 24px;
75
+ margin-bottom: 16px;
76
+ }
77
+
78
+ h6 {
79
+ @include typo-subhead;
80
+
81
+ margin-top: 24px;
82
+ margin-bottom: 16px;
83
+ }
84
+
85
+ p {
86
+ @include typo-body-1;
87
+
88
+ margin-bottom: 16px;
89
+ }
90
+
91
+ a {
92
+ color: $text-link-color;
93
+ font-weight: 500;
94
+ }
95
+
96
+ blockquote {
97
+ @include typo-blockquote;
98
+ }
99
+
100
+ mark {
101
+ background-color: #f4ff81;
102
+ }
103
+
104
+ dt {
105
+ font-weight: 700;
106
+ }
107
+
108
+ address {
109
+ @include typo-caption;
110
+
111
+ font-style: normal;
112
+ }
113
+
114
+ ul, ol {
115
+ @include typo-body-1;
116
+ }
117
+ }
118
+
119
+ /**
120
+ * Class Name Styles
121
+ */
122
+
123
+ .mdl-typography--display-4 {
124
+ @include typo-display-4;
125
+ }
126
+
127
+ .mdl-typography--display-4-color-contrast {
128
+ @include typo-display-4($colorContrast: true);
129
+ }
130
+
131
+ .mdl-typography--display-3 {
132
+ @include typo-display-3;
133
+ }
134
+
135
+ .mdl-typography--display-3-color-contrast {
136
+ @include typo-display-3($colorContrast: true);
137
+ }
138
+
139
+ .mdl-typography--display-2 {
140
+ @include typo-display-2;
141
+ }
142
+
143
+ .mdl-typography--display-2-color-contrast {
144
+ @include typo-display-2($colorContrast: true);
145
+ }
146
+
147
+ .mdl-typography--display-1 {
148
+ @include typo-display-1;
149
+ }
150
+
151
+ .mdl-typography--display-1-color-contrast {
152
+ @include typo-display-1($colorContrast: true);
153
+ }
154
+
155
+ .mdl-typography--headline {
156
+ @include typo-headline;
157
+ }
158
+
159
+ .mdl-typography--headline-color-contrast {
160
+ @include typo-headline($colorContrast: true);
161
+ }
162
+
163
+ .mdl-typography--title {
164
+ @include typo-title;
165
+ }
166
+
167
+ .mdl-typography--title-color-contrast {
168
+ @include typo-title($colorContrast: true);
169
+ }
170
+
171
+ .mdl-typography--subhead {
172
+ @include typo-subhead;
173
+ }
174
+
175
+ .mdl-typography--subhead-color-contrast {
176
+ @include typo-subhead($colorContrast: true);
177
+ }
178
+
179
+ .mdl-typography--body-2 {
180
+ @include typo-body-2;
181
+ }
182
+
183
+ .mdl-typography--body-2-color-contrast {
184
+ @include typo-body-2($colorContrast: true);
185
+ }
186
+
187
+ .mdl-typography--body-1 {
188
+ @include typo-body-1;
189
+ }
190
+
191
+ .mdl-typography--body-1-color-contrast {
192
+ @include typo-body-1($colorContrast: true);
193
+ }
194
+
195
+ .mdl-typography--body-2-force-preferred-font {
196
+ @include typo-body-2($usePreferred: true);
197
+ }
198
+
199
+ .mdl-typography--body-2-force-preferred-font-color-contrast {
200
+ @include typo-body-2($colorContrast: true, $usePreferred: true);
201
+ }
202
+
203
+ .mdl-typography--body-1-force-preferred-font {
204
+ @include typo-body-1($usePreferred: true);
205
+ }
206
+
207
+ .mdl-typography--body-1-force-preferred-font-color-contrast {
208
+ @include typo-body-1($colorContrast: true, $usePreferred: true);
209
+ }
210
+
211
+ .mdl-typography--caption {
212
+ @include typo-caption;
213
+ }
214
+
215
+ .mdl-typography--caption-force-preferred-font {
216
+ @include typo-caption($usePreferred: true);
217
+ }
218
+
219
+ .mdl-typography--caption-color-contrast {
220
+ @include typo-caption($colorContrast: true);
221
+ }
222
+
223
+ .mdl-typography--caption-force-preferred-font-color-contrast {
224
+ @include typo-caption($colorContrast: true, $usePreferred: true);
225
+ }
226
+
227
+ .mdl-typography--menu {
228
+ @include typo-menu;
229
+ }
230
+
231
+ .mdl-typography--menu-color-contrast {
232
+ @include typo-menu($colorContrast: true);
233
+ }
234
+
235
+ .mdl-typography--button {
236
+ @include typo-button;
237
+ }
238
+
239
+ .mdl-typography--button-color-contrast {
240
+ @include typo-button($colorContrast: true);
241
+ }
242
+
243
+ .mdl-typography--text-left {
244
+ text-align: left;
245
+ }
246
+
247
+ .mdl-typography--text-right {
248
+ text-align: right;
249
+ }
250
+
251
+ .mdl-typography--text-center {
252
+ text-align: center;
253
+ }
254
+
255
+ .mdl-typography--text-justify {
256
+ text-align: justify;
257
+ }
258
+
259
+ .mdl-typography--text-nowrap {
260
+ white-space: nowrap;
261
+ }
262
+
263
+ .mdl-typography--text-lowercase {
264
+ text-transform: lowercase;
265
+ }
266
+
267
+ .mdl-typography--text-uppercase {
268
+ text-transform: uppercase;
269
+ }
270
+
271
+ .mdl-typography--text-capitalize {
272
+ text-transform: capitalize;
273
+ }
274
+
275
+ .mdl-typography--font-thin {
276
+ font-weight: 200 !important;
277
+ }
278
+
279
+ .mdl-typography--font-light {
280
+ font-weight: 300 !important;
281
+ }
282
+
283
+ .mdl-typography--font-regular {
284
+ font-weight: 400 !important;
285
+ }
286
+
287
+ .mdl-typography--font-medium {
288
+ font-weight: 500 !important;
289
+ }
290
+
291
+ .mdl-typography--font-bold {
292
+ font-weight: 700 !important;
293
+ }
294
+
295
+ .mdl-typography--font-black {
296
+ font-weight: 900 !important;
297
+ }