dlegr250_material_design 0.5.80 → 0.5.81

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dlegr250_material_design/version.rb +1 -1
  3. data/vendor/assets/stylesheets/base/base.scss +1 -28
  4. data/vendor/assets/stylesheets/base/global_classes.scss +59 -51
  5. data/vendor/assets/stylesheets/base/mixins.scss +120 -70
  6. data/vendor/assets/stylesheets/base/variables/colors.scss +295 -296
  7. data/vendor/assets/stylesheets/base/variables/dimensions.scss +57 -92
  8. data/vendor/assets/stylesheets/components/blank_states.scss +2 -1
  9. data/vendor/assets/stylesheets/components/dialogs.scss +13 -13
  10. data/vendor/assets/stylesheets/components/dividers.scss +37 -51
  11. data/vendor/assets/stylesheets/components/layout/application_container.scss +12 -0
  12. data/vendor/assets/stylesheets/components/layout/grid.scss +102 -0
  13. data/vendor/assets/stylesheets/components/layout/main.scss +16 -0
  14. data/vendor/assets/stylesheets/components/layout/overlay.scss +31 -0
  15. data/vendor/assets/stylesheets/components/layout/sidebar.scss +17 -0
  16. data/vendor/assets/stylesheets/components/layout/toolbar.scss +129 -0
  17. data/vendor/assets/stylesheets/components/search.scss +146 -0
  18. data/vendor/assets/stylesheets/components/tables.scss +106 -64
  19. data/vendor/assets/stylesheets/dlegr250_material_design.scss +7 -6
  20. metadata +9 -8
  21. data/vendor/assets/stylesheets/components/borders.scss +0 -8
  22. data/vendor/assets/stylesheets/components/breadcrumbs.scss +0 -32
  23. data/vendor/assets/stylesheets/components/circles.scss +0 -16
  24. data/vendor/assets/stylesheets/components/cursors.scss +0 -6
  25. data/vendor/assets/stylesheets/components/overlay.scss +0 -24
  26. data/vendor/assets/stylesheets/components/underlines.scss +0 -7
@@ -2,70 +2,42 @@
2
2
  // SCSS variables accessible in every SCSS file imported after this one.
3
3
  //======================================================================
4
4
 
5
- // Dimensions - application
5
+ // Dimensions - toolbars
6
6
  //----------------------------------------------------------------------
7
7
 
8
- $application-container-min-width: 300px;
9
- $body-background-color: #eee !default;
8
+ $toolbar-height-device-small: 56px !default;
9
+ $toolbar-height-device-medium: 64px !default;
10
+ $toolbar-height-device-large: 72px !default;
11
+ $toolbar-height-device-xlarge: 72px !default;
10
12
 
11
- // Dimensions - appbar
12
- //----------------------------------------------------------------------
13
-
14
- // DEPRECATE
15
- $appbar-height-small: 56px !default; // Small devices
16
- $appbar-height-medium: 64px !default; // Medium to large devices
17
- $appbar-height: $appbar-height-medium !default;
18
-
19
- // Use
20
- $appbar-height-device-small: 56px !default;
21
- $toolbar-height-device-small: 56px !default;
22
-
23
- $appbar-height-device-medium: 64px !default;
24
- $toolbar-height-device-medium: 56px !default;
25
-
26
- $appbar-height-device-large: 64px !default;
27
- $toolbar-height-device-large: 56px !default;
28
-
29
- $appbar-button-height: 48px !default;
30
-
31
- // Dimensions - toolbar
32
- //----------------------------------------------------------------------
33
-
34
- $toolbar-height: $appbar-height !default;
13
+ $toolbar-button-height: 48px !default;
35
14
 
36
15
  // Dimensions - sidebars
37
16
  //----------------------------------------------------------------------
38
17
 
39
- $sidebar-width: 280px !default;
40
-
41
- // Dimensions - main
42
- //----------------------------------------------------------------------
43
-
44
- $main-top: $appbar-height;
45
- $main-left: $sidebar-width + 1; // Allows for 1px border
46
-
47
- // Dimensions - cards
48
- //----------------------------------------------------------------------
49
-
50
- $card-width-xsmall: 180px;
51
- $card-width-small: 220px;
52
- $card-width: 280px;
53
- $card-width-normal: $card-width; // For consistency
54
- $card-width-large: 360px;
55
- $card-width-xlarge: 420px;
18
+ $sidebar-width: 250px !default;
56
19
 
57
20
  // Text fields
58
21
  //----------------------------------------------------------------------
59
22
 
60
- $text-fields: "input[type='email'], input[type='number'], input[type='search'], input[type='text'], input[type='tel'], input[type='url'], input[type='password'], textarea";
23
+ $text-fields: "
24
+ input[type='email'],
25
+ input[type='number'],
26
+ input[type='search'],
27
+ input[type='text'],
28
+ input[type='tel'],
29
+ input[type='url'],
30
+ input[type='password'],
31
+ textarea
32
+ ";
61
33
 
62
34
  // Dimensions - lists
63
35
  //----------------------------------------------------------------------
64
36
 
65
- $list-one-line-height: 48px;
37
+ $list-one-line-height: 48px;
66
38
  $list-one-line-with-avatar-height: 56px;
67
- $list-two-lines-height: 72px;
68
- $list-three-lines-height: 88px;
39
+ $list-two-lines-height: 72px;
40
+ $list-three-lines-height: 88px;
69
41
 
70
42
  // 72px is the specification, but minus 32px for 16px left/right padding.
71
43
  $list-item-icon-width: 40px;
@@ -73,17 +45,19 @@ $list-item-icon-width: 40px;
73
45
  // Dimensions - dialogs
74
46
  //----------------------------------------------------------------------
75
47
 
76
- $dialog-width-xsmall: 280px; // From Google Material Design spec, min size
77
- $dialog-width-small: 360px;
78
- $dialog-width-normal: 500px;
79
- $dialog-width-large: 760px;
48
+ $dialog-header-height: $toolbar-height-device-large !default;
49
+
50
+ $dialog-width-xsmall: 280px; // From Google Material Design spec, min size
51
+ $dialog-width-small: 360px;
52
+ $dialog-width-normal: 500px;
53
+ $dialog-width-large: 760px;
80
54
  $dialog-width-xlarge: 1000px;
81
55
 
82
56
  // Dimensions - menus
83
57
  //----------------------------------------------------------------------
84
58
 
85
59
  $menu-max-height: 500px;
86
- $menu-width: 56px;
60
+ $menu-width: 56px;
87
61
  $menu-width-factors: 1, 2, 3, 4, 5, 6, 7;
88
62
 
89
63
  // Dimensions - tabs
@@ -95,13 +69,12 @@ $tab-height: 50px;
95
69
  //----------------------------------------------------------------------
96
70
 
97
71
  $button-height-dense: 32px;
98
- $button-height: 40px;
72
+ $button-height: 40px;
99
73
  $button-height-large: 56px;
100
74
 
101
75
  $button-icon-height: $button-height;
102
76
 
103
- $button-fab-height: 56px;
104
-
77
+ $button-fab-height: 56px;
105
78
  $button-fab-min-height: 40px;
106
79
 
107
80
  // Dimensions - inputs (text-fields, etc...)
@@ -113,9 +86,9 @@ $input-height: 40px;
113
86
  //----------------------------------------------------------------------
114
87
 
115
88
  $font-size-xsmall: 10px;
116
- $font-size-small: 12px;
89
+ $font-size-small: 12px;
117
90
  $font-size-normal: 14px;
118
- $font-size-large: 20px;
91
+ $font-size-large: 20px;
119
92
  $font-size-xlarge: 34px;
120
93
 
121
94
  $font-size-10: 10px;
@@ -133,48 +106,40 @@ $font-size-icon: 24px;
133
106
  // Spacing
134
107
  //----------------------------------------------------------------------
135
108
 
136
- $spacing-xsmall: 4px;
137
- $spacing-small: 8px;
109
+ $spacing-xsmall: 4px;
110
+ $spacing-small: 8px;
138
111
  $spacing-normal: 16px;
139
- $spacing-large: 24px;
112
+ $spacing-large: 24px;
140
113
  $spacing-xlarge: 32px;
141
114
 
142
115
  // Elevation (z-index)
143
116
  // See: https://material.io/guidelines/material-design/elevation-shadows.html#elevation-shadows-elevation-android
144
117
  //----------------------------------------------------------------------
145
118
 
146
- $elevation-1: 1; // Switch
147
- $elevation-2: 2; // Card, button
148
- $elevation-3: 3; // Refresh indicator,
149
- $elevation-4: 4; // Appbar
150
- $elevation-6: 6; // FAB (resting), snackbar
151
- $elevation-8: 8; // Bottom nav, menu, raised button
152
- $elevation-9: 9; // Submenu
153
- $elevation-12: 12; // FAB (pressed)
154
- $elevation-14: 14; // Overlay
155
- $elevation-16: 16; // Sidebar, modal bottom sheet
156
- $elevation-24: 24; // Dialog, pickers
157
- $elevation-26: 26; // Popups on top of dialogs
158
-
159
- // DEPRECATED: USE ELEVATION VARIABLES
160
- $layout-depth: 10;
161
- $menu-depth: 20;
162
- $overlay-depth: 30;
163
- $sidebar-depth: 40;
164
- $dialog-depth: 50;
119
+ // $elevation-1: 1; // Switch
120
+ // $elevation-2: 2; // Card, button
121
+ // $elevation-3: 3; // Refresh indicator,
122
+ // $elevation-4: 4; // Appbar
123
+ // $elevation-6: 6; // FAB (resting), snackbar
124
+ // $elevation-8: 8; // Bottom nav, menu, raised button
125
+ // $elevation-9: 9; // Submenu
126
+ // $elevation-12: 12; // FAB (pressed)
127
+ // $elevation-14: 14; // Overlay
128
+ // $elevation-16: 16; // Sidebar, modal bottom sheet
129
+ // $elevation-24: 24; // Dialog, pickers
130
+ // $elevation-26: 26; // Popups on top of dialogs
131
+
132
+ @for $z-value from 0 through 24 {
133
+ .elevation-#{$z-value} {
134
+ @include elevation($z-value);
135
+ }
136
+ }
165
137
 
166
138
  // Device breakpoints
167
139
  //----------------------------------------------------------------------
168
140
 
169
- $device-xsmall: 320px;
170
- $device-small: 400px;
171
- $device-medium: 760px;
172
- $device-large: 1000px;
173
- $device-xlarge: 1200px;
174
-
175
- // DEPRECATED: USE DEVICE VARIABLES
176
- $width-xsmall: $device-xsmall;
177
- $width-small: $device-small;
178
- $width-medium: $device-medium;
179
- $width-large: $device-large;
180
- $width-xlarge: $device-xlarge;
141
+ $device-xsmall: 320px; // Small phone
142
+ $device-small: 400px; // Larger phone
143
+ $device-medium: 760px; // Tablet
144
+ $device-large: 1000px; // Desktop
145
+ $device-xlarge: 1200px; // Large desktop
@@ -19,7 +19,8 @@
19
19
  .blank-state-container {
20
20
  height: 100%;
21
21
  width: 100%;
22
- @include flex-center();
22
+ @include flex-parent();
23
+ @include flex-vertical-align-center();
23
24
  }
24
25
 
25
26
  // Blank state - base
@@ -11,9 +11,9 @@
11
11
  top: 0;
12
12
  width: 100%;
13
13
  will-change: scale, opacity;
14
- z-index: $overlay-depth;
15
- @include flex-center();
16
- // @include no-touch-highlight();
14
+ z-index: $elevation-overlay;
15
+ @include flex-parent();
16
+ @include flex-vertical-align-center();
17
17
  @include transform(scale(1.15));
18
18
  @include transition(all 0.10s cubic-bezier(0, 0, 0.3, 1));
19
19
  @include transparency(0);
@@ -26,7 +26,7 @@
26
26
  }
27
27
  }
28
28
 
29
- // Dialogs - base
29
+ // Dialogs - base card
30
30
  //----------------------------------------------------------------------
31
31
 
32
32
  .dialog {
@@ -34,10 +34,10 @@
34
34
  cursor: default;
35
35
  max-height: 100%;
36
36
  max-width: 90%;
37
- min-width: $dialog-width-xsmall;
37
+ min-width: 280px;
38
38
  overflow: hidden;
39
39
  width: $dialog-width-xsmall;
40
- z-index: $dialog-depth;
40
+ @include elevation(24);
41
41
  @include rounded-corners();
42
42
  }
43
43
 
@@ -53,7 +53,7 @@
53
53
  @include rounded-corners(0);
54
54
  }
55
55
 
56
- @media (min-width: $width-small) {
56
+ @media (min-width: $device-small) {
57
57
  .dialog,
58
58
  .dialog-full-screen,
59
59
  .dialog[data-fullscreen="true"] {
@@ -82,7 +82,7 @@
82
82
  .dialog-appbar {
83
83
  @include flex-parent-row();
84
84
  border-bottom: 1px solid color("divider");
85
- height: $appbar-height;
85
+ height: $dialog-header-height;
86
86
  padding: 0 $spacing-small;
87
87
  position: relative;
88
88
  z-index: $dialog-depth + 1;
@@ -187,18 +187,18 @@
187
187
 
188
188
  .dialog-scrollable,
189
189
  .dialog-scrollable-no-actions {
190
- max-height: calc(100vh - #{$appbar-height}); // For dialog-header
190
+ max-height: calc(100vh - #{$dialog-header-height}); // For dialog-header
191
191
  overflow-x: hidden;
192
192
  overflow-y: auto;
193
193
  }
194
194
 
195
195
  @media (min-width: $width-small) {
196
196
  .dialog-scrollable {
197
- max-height: calc(90vh - #{$appbar-height * 2}); // For dialog-header and dialog-actions
197
+ max-height: calc(90vh - #{$dialog-header-height * 2}); // For dialog-header and dialog-actions
198
198
  }
199
199
 
200
200
  .dialog-scrollable-no-actions {
201
- max-height: calc(90vh - #{$appbar-height}); // For dialog-header and dialog-actions
201
+ max-height: calc(90vh - #{$dialog-header-height}); // For dialog-header and dialog-actions
202
202
  }
203
203
  }
204
204
 
@@ -207,8 +207,8 @@
207
207
 
208
208
  .dialog-actions {
209
209
  border-top: 1px solid color("divider");
210
- height: $appbar-height;
211
- line-height: $appbar-height;
210
+ height: $dialog-header-height;
211
+ line-height: $dialog-header-height;
212
212
  padding: 0 $spacing-normal;
213
213
  }
214
214
 
@@ -1,59 +1,45 @@
1
1
  //======================================================================
2
2
  // EXAMPLE:
3
- // <hr class="divider large" />
4
- // <hr class="spacer large" />
3
+ // <hr class="divider divider-normal" />
4
+ // <hr class="spacer spacer-large" />
5
5
  //======================================================================
6
6
 
7
- hr {
8
- height: 1px;
9
- margin: ($spacing-normal / 2) 0;
10
-
11
- // Has a line
12
- &.divider {
13
- border-color: color("divider");
14
- margin: $spacing-normal 0;
15
- }
16
-
17
- // Does not have a line
18
- &.spacer {
19
- border: none;
20
- margin: $spacing-normal 0;
21
- }
22
-
23
- &.xsmall { margin: ($spacing-xsmall / 2) 0; }
24
- &.small { margin: ($spacing-small / 2) 0; }
25
- &.normal { margin: ($spacing-normal / 2) 0; }
26
- &.large { margin: ($spacing-large / 2) 0; }
27
- &.xlarge { margin: ($spacing-xlarge / 2) 0; }
28
-
29
- // No margins, totally flush against other containers
30
- &.flush { margin: 0; }
7
+ // Shared
8
+ //----------------------------------------------------------------------
9
+
10
+ // To use on other elements besides HR
11
+ .divider,
12
+ .spacer {
13
+ display: block;
31
14
  }
32
15
 
33
- // WHAT ARE THESE USED FOR???
34
- // Label dividers
16
+ // Divider with line
35
17
  //----------------------------------------------------------------------
36
18
 
37
- // .label-divider {
38
- // border-top: 1px solid #ccc;
39
- // height: 0;
40
- // margin: $spacing-large 0;
41
- // position: relative;
42
- // text-align: center;
43
- // }
44
- //
45
- // .label-divider-text {
46
- // $label-divider-text-width: 30px;
47
- //
48
- // background-color: #fff;
49
- // color: #999;
50
- // display: inline-block;
51
- // height: $label-divider-text-width;
52
- // line-height: $label-divider-text-width;
53
- // padding: 0;
54
- // position: relative;
55
- // text-align: center;
56
- // top: -16px;
57
- // width: $label-divider-text-width;
58
- // @include rounded-corners(50%);
59
- // }
19
+ .divider {
20
+ border: none;
21
+ border-bottom: 1px solid color("divider");
22
+ height: 0;
23
+ margin: 0;
24
+ }
25
+
26
+ .divider-xsmall { margin: ($spacing-xsmall / 2) 0; }
27
+ .divider-small { margin: ($spacing-small / 2) 0; }
28
+ .divider-normal { margin: ($spacing-normal / 2) 0; }
29
+ .divider-large { margin: ($spacing-large / 2) 0; }
30
+ .divider-xlarge { margin: ($spacing-xlarge / 2) 0; }
31
+
32
+ // Spacer without line
33
+ //----------------------------------------------------------------------
34
+
35
+ .spacer {
36
+ border: none;
37
+ height: 0;
38
+ margin: 0;
39
+ }
40
+
41
+ .spacer-xsmall { margin: ($spacing-xsmall / 2) 0; }
42
+ .spacer-small { margin: ($spacing-small / 2) 0; }
43
+ .spacer-normal { margin: ($spacing-normal / 2) 0; }
44
+ .spacer-large { margin: ($spacing-large / 2) 0; }
45
+ .spacer-xlarge { margin: ($spacing-xlarge / 2) 0; }
@@ -0,0 +1,12 @@
1
+ // Wrap entire application
2
+ //----------------------------------------------------------------------
3
+
4
+ #application-container {
5
+ bottom: 0;
6
+ position: absolute;
7
+ left: 0;
8
+ min-width: 300px;
9
+ overflow: hidden;
10
+ right: 0;
11
+ top: 0;
12
+ }
@@ -0,0 +1,102 @@
1
+ // Grid
2
+ //----------------------------------------------------------------------
3
+
4
+ $flex-grid-width: 100%;
5
+ $flex-grid-gutter: 16px;
6
+ $flex-grid-columns-count: 12;
7
+
8
+ .grid {
9
+ display: block;
10
+ margin: auto;
11
+ padding: 0;
12
+ width: $flex-grid-width;
13
+ }
14
+
15
+ .grid-small-padded { padding: $flex-grid-gutter / 2; }
16
+
17
+ @media (min-width: $device-medium) {
18
+ .grid-medium-padded { padding: $flex-grid-gutter / 2; }
19
+ }
20
+
21
+ @media (min-width: $device-large) {
22
+ .grid-large-padded { padding: $flex-grid-gutter / 2; }
23
+ }
24
+
25
+ // Container
26
+ //----------------------------------------------------------------------
27
+
28
+ .row-container {
29
+ display: block;
30
+ margin: auto;
31
+ padding: $flex-grid-gutter / 2;
32
+ width: $flex-grid-width;
33
+ }
34
+
35
+ // Rows
36
+ //----------------------------------------------------------------------
37
+
38
+ .row {
39
+ box-sizing: border-box;
40
+ display: flex;
41
+ flex: 0 1 auto;
42
+ flex-direction: row;
43
+ flex-wrap: wrap;
44
+ }
45
+
46
+ // Generate classes
47
+ //----------------------------------------------------------------------
48
+
49
+ [class^="col-"] {
50
+ box-sizing: border-box;
51
+ flex-grow: 0;
52
+ flex-shrink: 0;
53
+ padding: $flex-grid-gutter / 2;
54
+ }
55
+
56
+ // Small devices
57
+ @for $i from 1 through $flex-grid-columns-count {
58
+ $width: (100% / $flex-grid-columns-count * $i);
59
+ .col-small-#{$i} {
60
+ flex-basis: $width;
61
+ max-width: $width;
62
+ }
63
+ }
64
+
65
+ // Medium devices
66
+ @media (min-width: $width-medium) {
67
+ @for $i from 1 through $flex-grid-columns-count {
68
+ $width: (100% / $flex-grid-columns-count * $i);
69
+ .col-med-#{$i},
70
+ .col-medium-#{$i} {
71
+ flex-basis: $width;
72
+ max-width: $width;
73
+ }
74
+ }
75
+ }
76
+
77
+ // Large devices
78
+ @media (min-width: $width-large) {
79
+ @for $i from 1 through $flex-grid-columns-count {
80
+ $width: (100% / $flex-grid-columns-count * $i);
81
+ .col-large-#{$i},
82
+ .col-#{$i} {
83
+ flex-basis: $width;
84
+ max-width: $width;
85
+ }
86
+ }
87
+ }
88
+
89
+ // On small devices, remove extra padding
90
+ //----------------------------------------------------------------------
91
+
92
+ // .grid .row .col-small-12 {
93
+ // padding: 0;
94
+ // }
95
+ //
96
+ // @media (min-width: $device-medium) {
97
+ // .grid-small-padded .row .col-small-12,
98
+ // .grid-medium-padded .row .col-small-12,
99
+ // .grid-large-padded .row .col-small-12 {
100
+ // padding: $flex-grid-gutter / 2;
101
+ // }
102
+ // }