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
@@ -0,0 +1,16 @@
1
+ //======================================================================
2
+ // By default covers entire screen. Assumes top/left dimensions will be
3
+ // set per-application in their own stylesheets.
4
+ //======================================================================
5
+
6
+ .main {
7
+ background-color: #ececec;
8
+ bottom: 0;
9
+ left: 0;
10
+ overflow-x: hidden;
11
+ overflow-y: scroll;
12
+ padding: 0;
13
+ position: absolute;
14
+ right: 0;
15
+ top: 0;
16
+ }
@@ -0,0 +1,31 @@
1
+ //======================================================================
2
+ // Only used on sidebars since dialogs have their own container.
3
+ //======================================================================
4
+
5
+ #overlay {
6
+ background-color: rgba(0, 0, 0, 0.6);
7
+ cursor: pointer;
8
+ height: 100%;
9
+ left: 0;
10
+ position: fixed;
11
+ pointer-events: none;
12
+ top: 0;
13
+ width: 100%;
14
+ will-change: opacity;
15
+ @include elevation(14);
16
+ @include flex-parent();
17
+ @include no-touch-highlight;
18
+ @include transparency(0);
19
+ @include transition(opacity 0.3s cubic-bezier(0, 0, 0.3, 1));
20
+
21
+ &.is-active {
22
+ pointer-events: auto;
23
+ @include transparency(1);
24
+ }
25
+
26
+ // DEPRECATE
27
+ &[data-state="active"] {
28
+ pointer-events: auto;
29
+ @include transparency(1);
30
+ }
31
+ }
@@ -0,0 +1,17 @@
1
+ // Sidebar - base
2
+ //----------------------------------------------------------------------
3
+
4
+ .sidebar {
5
+ background-color: color("white");
6
+ bottom: 0;
7
+ left: 0;
8
+ max-width: 98%;
9
+ overflow-y: auto;
10
+ pointer-events: none;
11
+ position: absolute;
12
+ top: 0;
13
+ width: $sidebar-width;
14
+ will-change: transform;
15
+ @include elevation(16);
16
+ @include transition(transform 0.2s cubic-bezier(0, 0, 0.3, 1));
17
+ }
@@ -0,0 +1,129 @@
1
+ // Toolbars - base
2
+ //----------------------------------------------------------------------
3
+
4
+ .toolbar {
5
+ border-bottom: 1px solid color("divider");
6
+ height: $toolbar-height-device-small;
7
+ left: 0;
8
+ padding: 0 $spacing-small;
9
+ position: absolute;
10
+ right: 0;
11
+ top: 0;
12
+ width: 100%;
13
+ @include elevation(4);
14
+ @include transition(box-shadow 0.2s ease);
15
+ @include flex-parent();
16
+ }
17
+
18
+ // Toolbar - section
19
+ // Allow CSS classes to override default center
20
+ //----------------------------------------------------------------------
21
+
22
+ .toolbar-section {
23
+ @include flex-parent();
24
+ }
25
+
26
+ // Toolbar - title
27
+ //----------------------------------------------------------------------
28
+
29
+ .toolbar-title {
30
+ flex: 1; // Fill up empty space
31
+ font-size: $font-size-normal;
32
+ @include flex-align-left();
33
+ @include font-smoothing();
34
+ @include truncate-text();
35
+ }
36
+
37
+ .toolbar-title-supertext,
38
+ .toolbar-title-subtext {
39
+ font-size: $font-size-small;
40
+ @include truncate-text();
41
+ }
42
+
43
+ .toolbar-title-supertext {
44
+ padding-bottom: $spacing-xsmall;
45
+ }
46
+
47
+ .toolbar-title-subtext {
48
+ padding-top: $spacing-xsmall;
49
+ }
50
+
51
+ // Toolbar - button icon
52
+ //----------------------------------------------------------------------
53
+
54
+ .toolbar-button-icon {
55
+ background-color: transparent;
56
+ border: none;
57
+ color: color("helper");
58
+ cursor: pointer;
59
+ height: 48px;
60
+ outline: none;
61
+ text-align: center;
62
+ width: 48px;
63
+ @include material-icons();
64
+ @include no-touch-highlight-color();
65
+ @include rounded-corners(50%);
66
+ @include transition(background-color 0.2s ease-in-out);
67
+ @include flex-parent();
68
+
69
+ &:active {
70
+ background-color: rgba(0, 0, 0, 0.20);
71
+ }
72
+ }
73
+
74
+ @media (hover: hover) {
75
+ .toolbar-button-icon:hover {
76
+ background-color: rgba(0, 0, 0, 0.12);
77
+ }
78
+ }
79
+
80
+ // Toolbar - medium device
81
+ //----------------------------------------------------------------------
82
+
83
+ @media (min-width: $device-medium) {
84
+ .toolbar {
85
+ height: $toolbar-height-device-medium;
86
+ }
87
+
88
+ .toolbar-title {
89
+ font-size: $font-size-normal + 2px;
90
+ }
91
+ }
92
+
93
+ // Toolbar - large device
94
+ //----------------------------------------------------------------------
95
+
96
+ @media (min-width: $device-large) {
97
+ .toolbar {
98
+ height: $toolbar-height-device-large;
99
+ }
100
+
101
+ .toolbar-title {
102
+ font-size: $font-size-large;
103
+ }
104
+ }
105
+
106
+ // Toolbar - xlarge device
107
+ //----------------------------------------------------------------------
108
+
109
+ @media (min-width: $device-xlarge) {
110
+ .toolbar {
111
+ height: $toolbar-height-device-large;
112
+ }
113
+ }
114
+
115
+ // Toolbar - spacer/divider
116
+ //----------------------------------------------------------------------
117
+
118
+ .toolbar-spacer,
119
+ .toolbar-divider {
120
+ border: 0;
121
+ display: inline-block;
122
+ height: 80%;
123
+ margin: 0 $spacing-xsmall;
124
+ width: 0;
125
+ }
126
+
127
+ .toolbar-divider {
128
+ border-left: 1px solid color("divider");
129
+ }
@@ -0,0 +1,146 @@
1
+ //======================================================================
2
+ // EXAMPLE:
3
+ // <div class="search" data-state="inactive">
4
+ // <div class="search-header">
5
+ // <button role="button" class="appbar-button-icon" data-behavior="close-search">arrow_back</button>
6
+ // <input type="search" value="..." class="search-header-field" />
7
+ // <button role="button" class="appbar-button-icon" data-behavior="clear-search">close</button>
8
+ // </div>
9
+ // <div class="search-results">...</div>
10
+ // </div>
11
+ //======================================================================
12
+
13
+ // Search - small devices
14
+ //----------------------------------------------------------------------
15
+
16
+ .search {
17
+ background-color: rgba(0, 0, 0, 0.6);
18
+ height: 100%;
19
+ left: 0;
20
+ position: fixed;
21
+ pointer-events: none;
22
+ right: 0;
23
+ top: 0;
24
+ width: 100%;
25
+ will-change: opacity;
26
+ @include elevation(24);
27
+ @include transparency(0);
28
+ }
29
+
30
+ .search-header,
31
+ .search-results {
32
+ @include transition(all 0.30s cubic-bezier(0, 0, 0.3, 1));
33
+ }
34
+
35
+ .search-header {
36
+ background-color: color("white");
37
+ border-bottom: 1px solid color("divider");
38
+ height: $toolbar-height-device-small;
39
+ padding-left: $spacing-small;
40
+ padding-right: $spacing-small;
41
+ position: relative;
42
+ width: 100%;
43
+ @include flex-parent-row();
44
+ }
45
+
46
+ .search-search-icon {
47
+ color: color("helper");
48
+ display: none;
49
+ }
50
+
51
+ .search-header-field {
52
+ background-color: transparent;
53
+ border: 0 !important;
54
+ color: rgba(0, 0, 0, 0.54) !important;
55
+ flex: 1;
56
+ width: 100%;
57
+ @include box-shadow(none !important);
58
+ @include rounded-corners(0 !important);
59
+ }
60
+
61
+ .search-results {
62
+ background-color: color("white");
63
+ border: 0;
64
+ color: color("text");
65
+ max-height: 80vh;
66
+ overflow: scroll;
67
+ z-index: $elevation-24;
68
+ @include transparency(0);
69
+ }
70
+
71
+ // Search - small devices - active
72
+ //----------------------------------------------------------------------
73
+
74
+ .search[data-state="active"] {
75
+ &,
76
+ .search-results {
77
+ pointer-events: auto;
78
+ @include transparency(1);
79
+ }
80
+
81
+ .search-results {
82
+ .list-item[data-state="selected"] { background-color: color("hover"); }
83
+ }
84
+ }
85
+
86
+ // Search - medium devices
87
+ //----------------------------------------------------------------------
88
+
89
+ @media (min-width: $device-medium) {
90
+ .search {
91
+ background-color: transparent;
92
+ max-width: 300px;
93
+ pointer-events: auto;
94
+ position: relative;
95
+ @include flex-parent-row();
96
+ @include transparency(1);
97
+ }
98
+
99
+ .search-header {
100
+ background-color: rgba(0, 0, 0, 0.08);
101
+ border: 1px solid transparent;
102
+ height: $appbar-button-height;
103
+ @include rounded-corners(4px);
104
+ }
105
+
106
+ .search-close-button,
107
+ .search-clear-button {
108
+ display: none;
109
+ }
110
+
111
+ .search-search-icon {
112
+ display: block;
113
+ }
114
+
115
+ .search-results {
116
+ border: 1px solid color("divider");
117
+ border-top: none;
118
+ border-bottom: none;
119
+ pointer-events: none;
120
+ position: absolute;
121
+ top: $appbar-height-device-medium - 8px;
122
+ width: 100%;
123
+ z-index: $elevation-24;
124
+ @include box-shadow(0 12px 15px 0 rgba(0,0,0,0.24));
125
+ @include rounded-bottom-corners(4px);
126
+ }
127
+
128
+ .search[data-state="active"] .search-header {
129
+ background-color: color("white");
130
+ border-color: color("divider");
131
+ @include rounded-top-corners(4px);
132
+ }
133
+
134
+ .search[data-state="active"] {
135
+ max-width: 600px;
136
+ }
137
+ }
138
+
139
+ // Search - large devices
140
+ //----------------------------------------------------------------------
141
+
142
+ @media (min-width: $device-large) {
143
+ // .search {
144
+ // max-width: 300px;
145
+ // }
146
+ }
@@ -1,64 +1,106 @@
1
- // //======================================================================
2
- // // Note: Uses DIVs styled as table instead of TABLE element because
3
- // // you cannot make a LINK a TABLE ROW, and it is easier to re-style
4
- // // DIVs if you want to make responsive tables.
5
- // // EXAMPLE:
6
- // //======================================================================
7
- //
8
- // .table {
9
- // background-color: color("white");
10
- // border: 1px solid color("divider");
11
- // display: table;
12
- // width: 100%;
13
- //
14
- // a {
15
- // color: color("text");
16
- // }
17
- // }
18
- //
19
- // .thead {
20
- // border-bottom: 2px solid color("hover");
21
- // display: table-row;
22
- // height: 56px;
23
- // }
24
- //
25
- // .th {
26
- // border-bottom: 2px solid color("hover");
27
- // color: lighten(color("text"), 10%);
28
- // display: table-cell;
29
- // font-size: $font-size-normal;
30
- // font-weight: bold;
31
- // padding: 0 $spacing-normal;
32
- // text-transform: uppercase;
33
- // vertical-align: middle;
34
- // }
35
- //
36
- // .tr {
37
- // border-bottom: 1px solid color("hover");
38
- // display: table-row;
39
- // height: 48px;
40
- // }
41
- //
42
- // .td {
43
- // border-bottom: 1px solid color("hover");
44
- // display: table-cell;
45
- // padding: 0 $spacing-normal;
46
- // vertical-align: middle;
47
- // }
48
- //
49
- // .table-hoverable .tr {
50
- // @include transition(background-color 0.2s);
51
- //
52
- // &:hover {
53
- // background-color: color("hover");
54
- // }
55
- // }
56
- //
57
- // // Striped rows
58
- // //----------------------------------------------------------------------
59
- //
60
- // .table-striped-rows {
61
- // tr:nth-child(even) {
62
- // background-color: lighten(color("hover"), 3%);
63
- // }
64
- // }
1
+ //======================================================================
2
+ // Emulate HTML tables with flexbox DIVs. Useful for responsive design.
3
+ //======================================================================
4
+
5
+ .table {
6
+ border: none;
7
+ color: color("text");
8
+ display: table;
9
+ table-layout: fixed;
10
+ width: 100%;
11
+ }
12
+
13
+ .thead {
14
+ display: table-header-group;
15
+ }
16
+
17
+ .tbody {
18
+ display: table-row-group;
19
+ }
20
+
21
+ .tr {
22
+ background-color: color("white");
23
+ border-bottom: none;
24
+ width: 100%;
25
+ display: table-row;
26
+ @include no-touch-highlight-color();
27
+ @include transition(background-color 0.30s ease);
28
+ }
29
+
30
+ .th {
31
+ border-bottom: 1px solid color("divider");
32
+ color: rgba(0, 0, 0, 0.54);
33
+ display: table-cell;
34
+ font-size: $font-size-normal;
35
+ font-weight: bold;
36
+ padding: $spacing-normal;
37
+ vertical-align: middle;
38
+ }
39
+
40
+ .td {
41
+ border-bottom: none;
42
+ color: color("text");
43
+ display: table-cell;
44
+ min-width: 0px;
45
+ padding: $spacing-normal;
46
+ vertical-align: middle;
47
+ word-break: break-word;
48
+ width: auto;
49
+ }
50
+
51
+ .td-icon {
52
+ color: color("icon");
53
+ max-width: 48px;
54
+ text-align: center;
55
+ width: 48px;
56
+ vertical-align: top;
57
+ }
58
+
59
+ .td-secondary {
60
+ color: color("helper");
61
+ }
62
+
63
+ .td-secondary-actions {
64
+ padding: $spacing-small;
65
+ text-align: right;
66
+ width: 64px;
67
+ }
68
+
69
+ .td-supertext,
70
+ .td-subtext {
71
+ color: color("helper");
72
+ font-size: $font-size-small;
73
+ }
74
+
75
+ .td-supertext {
76
+ padding-bottom: $spacing-xsmall;
77
+ }
78
+
79
+ .td-subtext {
80
+ padding-top: $spacing-xsmall;
81
+ }
82
+
83
+ // Flex table - modifications
84
+ //----------------------------------------------------------------------
85
+
86
+ .table-align-top .td { vertical-align: top; }
87
+
88
+ .table-bordered {
89
+ @include box-shadow(0 0 1px #aaa);
90
+ }
91
+
92
+ .table-divided {
93
+ .tr .td { border-bottom: 1px solid color("divider"); }
94
+ }
95
+
96
+ .table-bordered.table-divided .tbody .tr:last-child .td {
97
+ border-bottom: none;
98
+ }
99
+
100
+ .table-hoverable .tbody .tr:active { background-color: darken(color("grey-200"), 3%); }
101
+ .table-hoverable .tbody .tr .button-icon:active { background-color: darken(color("grey-200"), 12%); }
102
+
103
+ @media (hover: hover) {
104
+ .table-hoverable .tbody .tr:hover { background-color: color("grey-200"); }
105
+ .table-hoverable .tbody .tr .button-icon:hover { background-color: darken(color("grey-200"), 7%); }
106
+ }