mui-sass 0.4.2 → 0.4.7

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.
@@ -1,5 +1,6 @@
1
1
  // Normalizer
2
- @import "mui/normalize-3.0.2";
2
+ @import
3
+ "mui/normalize-3.0.3";
3
4
 
4
5
  // Core variables and mixins
5
6
  @import
@@ -7,21 +8,29 @@
7
8
  "mui/variables",
8
9
  "mui/mixins";
9
10
 
10
- // Core css
11
+ // CSS Reboot
12
+ @import
13
+ "mui/reboot";
14
+
15
+ // Components
11
16
  @import
12
- "mui/scaffolding",
13
- "mui/layout",
17
+ "mui/appbar",
18
+ "mui/buttons",
19
+ "mui/checkbox-and-radio",
20
+ "mui/containers",
21
+ "mui/divider",
22
+ "mui/dropdown",
23
+ "mui/form",
14
24
  "mui/grid",
15
- "mui/typography",
16
25
  "mui/panel",
17
- "mui/buttons",
18
- "mui/ripple",
19
- "mui/appbar",
20
- "mui/semantic-markup",
21
- "mui/dividers",
22
- "mui/forms",
23
- "mui/tables",
24
- "mui/dropdowns",
26
+ "mui/select",
27
+ "mui/table",
25
28
  "mui/tabs",
29
+ "mui/textfield";
30
+
31
+ // Miscellaneous
32
+ @import
33
+ "mui/helpers",
26
34
  "mui/overlay",
27
- "mui/helpers";
35
+ "mui/ripple",
36
+ "mui/typography";
@@ -0,0 +1,60 @@
1
+ /**
2
+ * MUI Checkboxe and Radio Components
3
+ */
4
+
5
+ .mui-radio,
6
+ .mui-checkbox {
7
+ position: relative;
8
+ display: block;
9
+ margin-top: 10px;
10
+ margin-bottom: 10px;
11
+
12
+ > label {
13
+ min-height: $mui-base-line-height-computed;
14
+ padding-left: 20px;
15
+ margin-bottom: 0;
16
+ font-weight: normal;
17
+ cursor: pointer;
18
+ }
19
+ }
20
+
21
+ .mui-radio > label > input[type="radio"],
22
+ .mui-radio--inline > label > input[type="radio"],
23
+ .mui-checkbox > label> input[type="checkbox"],
24
+ .mui-checkbox--inline > label > input[type="checkbox"] {
25
+ position: absolute;
26
+ margin-left: -20px;
27
+ margin-top: 4px;
28
+ }
29
+
30
+ .mui-radio + .mui-radio,
31
+ .mui-checkbox + .mui-checkbox {
32
+ // Move up sibling radios or checkboxes for tighter spacing
33
+ margin-top: -5px;
34
+ }
35
+
36
+ .mui-radio--inline,
37
+ .mui-checkbox--inline {
38
+ // Radios and checkboxes on same line
39
+ display: inline-block;
40
+ padding-left: 20px;
41
+ margin-bottom: 0;
42
+ vertical-align: middle;
43
+ font-weight: normal;
44
+ cursor: pointer;
45
+
46
+ > input[type="radio"],
47
+ > input[type="checkbox"],
48
+ > label > input[type="radio"],
49
+ > label > input[type="checkbox"] {
50
+ margin: 4px 0 0;
51
+ line-height: normal;
52
+ }
53
+ }
54
+
55
+ .mui-radio--inline + .mui-radio--inline,
56
+ .mui-checkbox--inline + .mui-checkbox--inline {
57
+ // Space out consecutive inline controls
58
+ margin-top: 0;
59
+ margin-left: 10px;
60
+ }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * MUI Dividers module
2
+ * MUI Divider Component and CSS Helpers
3
3
  */
4
4
 
5
5
  .mui-divider {
@@ -0,0 +1,40 @@
1
+ /**
2
+ * MUI Form Component
3
+ */
4
+
5
+ .mui-form--inline {
6
+ @media (min-width: $mui-screen-sm-min) {
7
+ > .mui-textfield {
8
+ display: inline-block;
9
+ margin-bottom: 0;
10
+ }
11
+
12
+ > .mui-radio,
13
+ > .mui-checkbox {
14
+ display: inline-block;
15
+ margin-top: 0;
16
+ margin-bottom: 0;
17
+ vertical-align: middle;
18
+
19
+ > label {
20
+ padding-left: 0;
21
+ }
22
+ }
23
+
24
+ > .mui-radio > label > input[type="radio"],
25
+ > .mui-checkbox > label > input[type="checkbox"] {
26
+ position: relative;
27
+ margin-left: 0;
28
+ }
29
+
30
+ > .mui-select {
31
+ display: inline-block;
32
+ }
33
+
34
+ > .mui-btn {
35
+ margin-bottom: 0;
36
+ margin-top: 0;
37
+ vertical-align: bottom;
38
+ }
39
+ }
40
+ }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * MUI Scaffolding module
2
+ * MUI Reboot
3
3
  */
4
4
 
5
5
  // ============================================================================
@@ -108,3 +108,75 @@ hr {
108
108
  height: 1px;
109
109
  background-color: $mui-hr-color;
110
110
  }
111
+
112
+ // Form legend
113
+ legend {
114
+ display: block;
115
+ width: 100%;
116
+ padding: 0;
117
+ margin-bottom: $mui-base-line-height-computed / 2;
118
+ font-size: $mui-legend-font-size;
119
+ color: $mui-legend-font-color;
120
+ line-height: inherit;
121
+ border: 0;
122
+ }
123
+
124
+ // override content-box in normalize.css
125
+ input[type="search"] {
126
+ box-sizing: border-box;
127
+ -webkit-appearance: none; // Search inputs in iOS
128
+ }
129
+
130
+ input[type="file"]:focus,
131
+ input[type="radio"]:focus,
132
+ input[type="checkbox"]:focus {
133
+ // Focus for file, radio, and checkbox
134
+ @include mui-tab-focus();
135
+ }
136
+
137
+ input[type="radio"]:disabled,
138
+ input[type="checkbox"]:disabled {
139
+ cursor: $mui-cursor-disabled;
140
+ }
141
+
142
+ // Strong
143
+ strong {
144
+ font-weight: 700;
145
+ }
146
+
147
+ // Abbreviations
148
+ abbr[title] {
149
+ cursor: help;
150
+ border-bottom: 1px dotted $mui-abbr-border-color;
151
+ }
152
+
153
+ // headers
154
+ h1 {
155
+ @extend .mui--text-display1;
156
+ }
157
+
158
+ h2 {
159
+ @extend .mui--text-headline;
160
+ }
161
+
162
+ h3 {
163
+ @extend .mui--text-title;
164
+ }
165
+
166
+ h4 {
167
+ @extend .mui--text-subhead;
168
+ }
169
+
170
+ h5 {
171
+ @extend .mui--text-body2;
172
+ }
173
+
174
+ h1, h2, h3 {
175
+ margin-top: $mui-base-line-height-computed;
176
+ margin-bottom: ($mui-base-line-height-computed / 2);
177
+ }
178
+
179
+ h4, h5, h6 {
180
+ margin-top: ($mui-base-line-height-computed / 2);
181
+ margin-bottom: ($mui-base-line-height-computed / 2);
182
+ }
@@ -0,0 +1,111 @@
1
+ /**
2
+ * MUI Select Component
3
+ */
4
+
5
+ $xFormLabelLineHeight: floor($mui-label-font-size * 1.25);
6
+
7
+
8
+ .mui-select {
9
+ display: block;
10
+ padding-top: $xFormLabelLineHeight;
11
+ margin-bottom: $mui-form-group-margin-bottom;
12
+ position: relative;
13
+
14
+ &:focus {
15
+ outline: 0;
16
+
17
+ > select {
18
+ height: $mui-input-height + 1px;
19
+ margin-bottom: -1px;
20
+ border-color: $mui-input-border-color-focus;
21
+ border-width: 2px;
22
+ }
23
+ }
24
+
25
+ > select {
26
+ @include mui-node-inserted();
27
+
28
+ // Layout
29
+ display: block;
30
+ height: $mui-input-height;
31
+ width: 100%;
32
+
33
+ // Look and feel
34
+ appearance: none;
35
+ -webkit-appearance: none;
36
+ -moz-appearance: none;
37
+ outline: none;
38
+ border: none;
39
+ border-bottom: 1px solid $mui-input-border-color;
40
+ border-radius: 0px;
41
+ box-shadow: none;
42
+ background-color: $mui-input-bg-color;
43
+ background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNiIgd2lkdGg9IjEwIj48cG9seWdvbiBwb2ludHM9IjAsMCAxMCwwIDUsNiIgc3R5bGU9ImZpbGw6cmdiYSgwLDAsMCwuMjQpOyIvPjwvc3ZnPg==");
44
+ background-repeat: no-repeat;
45
+ background-position: right center;
46
+ cursor: pointer;
47
+
48
+ // Typography
49
+ color: $mui-input-font-color;
50
+ font-size: $mui-input-font-size;
51
+ padding: 0 25px 0 0;
52
+
53
+ &::-ms-expand {
54
+ display: none; // For IE
55
+ }
56
+
57
+ &:focus {
58
+ outline: 0;
59
+ height: $mui-input-height + 1px;
60
+ margin-bottom: -1px;
61
+ border-color: $mui-input-border-color-focus;
62
+ border-width: 2px;
63
+ }
64
+
65
+ &:disabled {
66
+ color: mui-color('black-alpha-38');
67
+ cursor: $mui-cursor-disabled;
68
+ background-color: $mui-input-bg-color-disabled;
69
+ opacity: 1; // iOS fix for unreadable disabled content
70
+ }
71
+ }
72
+ }
73
+
74
+ .mui-select__menu {
75
+ @extend .mui--z1;
76
+
77
+ // Positioning
78
+ position: absolute;
79
+ z-index: 1;
80
+
81
+ // Display
82
+ min-width: 100%;
83
+ overflow-y: auto;
84
+ padding: 8px 0;
85
+
86
+ // Other
87
+ background-color: mui-color('white');
88
+ font-size: $mui-input-font-size;
89
+
90
+ // IE10+ bugfix
91
+ @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
92
+ border-left: 1px solid mui-color('black-alpha-12');
93
+ border-top: 1px solid mui-color('black-alpha-12');
94
+ }
95
+
96
+ > div {
97
+ padding: 0 22px;
98
+ height: $mui-input-font-size + 26px;
99
+ line-height: $mui-input-font-size + 26px;
100
+ cursor: pointer;
101
+ white-space: nowrap;
102
+
103
+ &:hover {
104
+ background-color: mui-color('grey', '300');
105
+ }
106
+
107
+ &.mui--is-selected {
108
+ background-color: mui-color('grey', '200');
109
+ }
110
+ }
111
+ }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * MUI Tables module
2
+ * MUI Table Component
3
3
  */
4
4
 
5
5
  // Global styles
@@ -0,0 +1,233 @@
1
+ /**
2
+ * MUI Textfield Component
3
+ */
4
+
5
+ $xFormLabelLineHeight: floor($mui-label-font-size * 1.25);
6
+
7
+
8
+
9
+ // ============================================================================
10
+ // TEXTFIELD
11
+ // ============================================================================
12
+
13
+ .mui-textfield {
14
+ display: block;
15
+ padding-top: $xFormLabelLineHeight;
16
+ margin-bottom: $mui-form-group-margin-bottom;
17
+ position: relative;
18
+
19
+ > label {
20
+ // Positioning
21
+ position: absolute;
22
+ top: 0;
23
+
24
+ // Display
25
+ display: block;
26
+ width: 100%;
27
+
28
+ // Other
29
+ color: $mui-label-font-color;
30
+ font-size: $mui-label-font-size;
31
+ font-weight: 400;
32
+ line-height: $xFormLabelLineHeight;
33
+ overflow-x: hidden;
34
+ text-overflow: ellipsis;
35
+ white-space: nowrap;
36
+ }
37
+
38
+ > textarea {
39
+ padding-top: 5px;
40
+ }
41
+
42
+ > input,
43
+ > textarea {
44
+ display: block;
45
+
46
+ &:focus ~ label {
47
+ color: $mui-input-border-color-focus;
48
+ }
49
+ }
50
+ }
51
+
52
+ .mui-textfield--float-label {
53
+ > label {
54
+ // Layout
55
+ position: absolute;
56
+ transform: translate(0px, $xFormLabelLineHeight);
57
+
58
+ // Typography
59
+ font-size: $mui-input-font-size;
60
+ line-height: $mui-input-height;
61
+ color: $mui-input-placeholder-color;
62
+
63
+ // Overflow policy
64
+ text-overflow: clip;
65
+
66
+ // Cursor
67
+ cursor: text; // for ie10
68
+ pointer-events: none;
69
+ }
70
+
71
+ > input,
72
+ > textarea {
73
+ &:focus ~ label {
74
+ transform: translate(0px, 0px);
75
+ font-size: $mui-label-font-size;
76
+ line-height: $xFormLabelLineHeight;
77
+ text-overflow: ellipsis;
78
+ }
79
+
80
+ &:not(:focus) {
81
+ &.mui--is-not-empty,
82
+ &[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty),
83
+ &:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty) {
84
+ ~ label {
85
+ color: $mui-label-font-color;
86
+ font-size: $mui-label-font-size;
87
+ line-height: $xFormLabelLineHeight;
88
+ transform: translate(0px, 0px);
89
+ text-overflow: ellipsis;
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+
96
+ .mui-textfield--wrap-label {
97
+ display: table;
98
+ width: 100%;
99
+ padding-top: 0px;
100
+
101
+ &:not(.mui-textfield--float-label) > label {
102
+ display: table-header-group;
103
+ position: static;
104
+ white-space: normal;
105
+ overflow-x: visible;
106
+ }
107
+ }
108
+
109
+ .mui-textfield > input,
110
+ .mui-textfield > textarea {
111
+ @include mui-node-inserted();
112
+
113
+ display: block;
114
+ background-color: $mui-input-bg-color;
115
+ color: $mui-input-font-color;
116
+ border: none;
117
+ border-bottom: 1px solid $mui-input-border-color;
118
+ outline: none;
119
+ width: 100%;
120
+ font-size: $mui-input-font-size;
121
+ padding: 0;
122
+ box-shadow: none;
123
+ border-radius: 0px;
124
+
125
+ // Bugfix for firefox-android
126
+ background-image: none;
127
+
128
+ &:focus {
129
+ border-color: $mui-input-border-color-focus;
130
+ border-width: 2px;
131
+ }
132
+
133
+ &:disabled,
134
+ &:read-only {
135
+ cursor: $mui-cursor-disabled;
136
+ background-color: $mui-input-bg-color-disabled;
137
+ opacity: 1; // iOS fix for unreadable disabled content
138
+ }
139
+
140
+ &::placeholder {
141
+ color: $mui-input-placeholder-color;
142
+ opacity: 1; // Normalize firefox
143
+ }
144
+ }
145
+
146
+ .mui-textfield > input {
147
+ height: $mui-input-height;
148
+
149
+ // Compensate for height change on focus
150
+ &:focus {
151
+ height: $mui-input-height + 1px;
152
+ margin-bottom: -1px;
153
+ }
154
+ }
155
+
156
+ .mui-textfield > textarea {
157
+ min-height: $mui-textarea-height;
158
+
159
+ // Compensate for height change on focus
160
+ &[rows]:not([rows="2"]):focus {
161
+ margin-bottom: -1px;
162
+ }
163
+ }
164
+
165
+ .mui-textfield > input:focus {
166
+ // Compensate for height change on focus
167
+ height: $mui-input-height + 1px;
168
+ margin-bottom: -1px;
169
+ }
170
+
171
+
172
+
173
+
174
+ // ============================================================================
175
+ // FORM VALIDATION
176
+ // ============================================================================
177
+
178
+ .mui-textfield > input:invalid:not(:focus),
179
+ .mui-textfield > textarea:invalid:not(:focus),
180
+ .mui-textfield > input:not(:focus).mui--is-invalid,
181
+ .mui-textfield > textarea:not(:focus).mui--is-invalid {
182
+ &:not(:required),
183
+ &:required.mui--is-not-empty,
184
+ &:required.mui--is-empty.mui--is-dirty,
185
+ &:required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty),
186
+ &:required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty) {
187
+ border-color: $mui-danger-color;
188
+ border-width: 2px;
189
+ }
190
+ }
191
+
192
+ // Treat <input>'s different from <textarea>'s
193
+ .mui-textfield > input:invalid:not(:focus),
194
+ .mui-textfield > input:not(:focus).mui--is-invalid {
195
+ &:not(:required),
196
+ &:required.mui--is-not-empty,
197
+ &:required.mui--is-empty.mui--is-dirty,
198
+ &:required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty),
199
+ &:required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty) {
200
+ height: $mui-input-height + 1px;
201
+ margin-bottom: -1px;
202
+ }
203
+ }
204
+
205
+ .mui-textfield > input:invalid:not(:focus),
206
+ .mui-textfield > textarea:invalid:not(:focus),
207
+ .mui-textfield > input:not(:focus).mui--is-invalid,
208
+ .mui-textfield > textarea:not(:focus).mui--is-invalid {
209
+ // Set label color to danger color
210
+ &:not(:required),
211
+ &:required.mui--is-not-empty,
212
+ &:required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty),
213
+ &:required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty) {
214
+ ~ label {
215
+ color: $mui-danger-color;
216
+ }
217
+ }
218
+ }
219
+
220
+ .mui-textfield > input:not(:focus).mui--is-invalid,
221
+ .mui-textfield > textarea:not(:focus).mui--is-invalid {
222
+
223
+ }
224
+
225
+ .mui-textfield:not(.mui-textfield--float-label) > input:invalid:not(:focus),
226
+ .mui-textfield:not(.mui-textfield--float-label) > textarea:invalid:not(:focus),
227
+ .mui-textfield:not(.mui-textfield--float-label) > input:not(:focus).mui--is-invalid,
228
+ .mui-textfield:not(.mui-textfield--float-label) > textarea:not(:focus).mui--is-invalid {
229
+ // Set label color to danger color for dirty, empty fields
230
+ &:required.mui--is-empty.mui--is-dirty ~ label {
231
+ color: $mui-danger-color;
232
+ }
233
+ }