material-sass 4.0.0.alpha6 → 4.0.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +36 -8
- data/Rakefile +16 -3
- data/app/assets/javascripts/material-sprockets.js +6 -1
- data/app/assets/javascripts/material.js +654 -417
- data/app/assets/javascripts/material.min.js +1 -0
- data/app/assets/javascripts/material/addons/picker.date.js +234 -0
- data/app/assets/javascripts/material/addons/picker.js +172 -0
- data/app/assets/javascripts/material/addons/textarea-autosize.js +20 -2
- data/app/assets/javascripts/material/addons/waves.js +127 -0
- data/app/assets/javascripts/material/components/floating-label.js +92 -0
- data/app/assets/javascripts/material/components/navdrawer.js +353 -0
- data/app/assets/javascripts/material/components/selection-control-focus.js +47 -0
- data/app/assets/javascripts/material/components/tab-switch.js +148 -0
- data/app/assets/javascripts/material/components/util.js +133 -0
- data/app/assets/javascripts/material/initializers/picker.js +171 -0
- data/app/assets/javascripts/material/initializers/textarea-autosize.js +10 -0
- data/app/assets/javascripts/material/initializers/waves.js +13 -0
- data/app/assets/stylesheets/material/_colours.scss +324 -0
- data/app/assets/stylesheets/material/_functions.scss +65 -0
- data/app/assets/stylesheets/material/_mixins.scss +23 -23
- data/app/assets/stylesheets/material/_print.scss +102 -0
- data/app/assets/stylesheets/material/_utilities.scss +21 -17
- data/app/assets/stylesheets/material/_variables.scss +13 -42
- data/app/assets/stylesheets/material/base/_base.scss +420 -5
- data/app/assets/stylesheets/material/base/_grid.scss +34 -33
- data/app/assets/stylesheets/material/base/_typography.scss +165 -174
- data/app/assets/stylesheets/material/bootstrap/_alert.scss +32 -39
- data/app/assets/stylesheets/material/bootstrap/_badge.scss +34 -0
- data/app/assets/stylesheets/material/bootstrap/_breadcrumb.scss +18 -18
- data/app/assets/stylesheets/material/bootstrap/_carousel.scss +127 -142
- data/app/assets/stylesheets/material/bootstrap/_close.scss +18 -19
- data/app/assets/stylesheets/material/bootstrap/_code.scss +10 -7
- data/app/assets/stylesheets/material/bootstrap/_custom-form.scss +50 -56
- data/app/assets/stylesheets/material/bootstrap/_form.scss +159 -129
- data/app/assets/stylesheets/material/bootstrap/_image.scss +19 -16
- data/app/assets/stylesheets/material/bootstrap/_jumbotron.scss +10 -7
- data/app/assets/stylesheets/material/bootstrap/_nav.scss +71 -69
- data/app/assets/stylesheets/material/bootstrap/_pagination.scss +34 -26
- data/app/assets/stylesheets/material/bootstrap/_popover.scss +26 -59
- data/app/assets/stylesheets/material/bootstrap/_responsive-embed.scss +4 -4
- data/app/assets/stylesheets/material/bootstrap/_transition.scss +10 -8
- data/app/assets/stylesheets/material/material.scss +75 -62
- data/app/assets/stylesheets/material/material/_button-flat.scss +26 -39
- data/app/assets/stylesheets/material/material/_button-float.scss +10 -14
- data/app/assets/stylesheets/material/material/_button-group.scss +268 -0
- data/app/assets/stylesheets/material/material/_button.scss +133 -189
- data/app/assets/stylesheets/material/material/_card.scss +300 -248
- data/app/assets/stylesheets/material/material/_chip.scss +65 -64
- data/app/assets/stylesheets/material/material/_data-table.scss +135 -45
- data/app/assets/stylesheets/material/material/_dialog.scss +141 -110
- data/app/assets/stylesheets/material/material/_expansion-panel.scss +86 -119
- data/app/assets/stylesheets/material/material/_menu.scss +308 -228
- data/app/assets/stylesheets/material/material/_navdrawer.scss +239 -234
- data/app/assets/stylesheets/material/material/_picker.scss +157 -155
- data/app/assets/stylesheets/material/material/_progress-circular.scss +80 -80
- data/app/assets/stylesheets/material/material/_progress.scss +180 -115
- data/app/assets/stylesheets/material/material/_selection-control.scss +132 -139
- data/app/assets/stylesheets/material/material/_stepper.scss +94 -93
- data/app/assets/stylesheets/material/material/_tab.scss +74 -93
- data/app/assets/stylesheets/material/material/_text-field-floating-label.scss +29 -20
- data/app/assets/stylesheets/material/material/_text-field-input-group.scss +94 -24
- data/app/assets/stylesheets/material/material/_text-field-textarea.scss +13 -26
- data/app/assets/stylesheets/material/material/_text-field.scss +127 -118
- data/app/assets/stylesheets/material/material/_toolbar.scss +308 -313
- data/app/assets/stylesheets/material/material/_tooltip.scss +23 -62
- data/app/assets/stylesheets/material/mixins/_background-variant.scss +6 -6
- data/app/assets/stylesheets/material/mixins/_border-radius.scss +17 -17
- data/app/assets/stylesheets/material/mixins/_breakpoint.scss +32 -2
- data/app/assets/stylesheets/material/mixins/_clearfix.scss +1 -1
- data/app/assets/stylesheets/material/mixins/_form.scss +62 -25
- data/app/assets/stylesheets/material/mixins/_grid-framework.scss +8 -16
- data/app/assets/stylesheets/material/mixins/_grid.scss +40 -64
- data/app/assets/stylesheets/material/mixins/_material-icons.scss +36 -0
- data/app/assets/stylesheets/material/mixins/_nav-divider.scss +1 -1
- data/app/assets/stylesheets/material/mixins/_reset-text.scss +2 -21
- data/app/assets/stylesheets/material/mixins/_screenreader.scss +14 -12
- data/app/assets/stylesheets/material/mixins/_text-alignment.scss +23 -0
- data/app/assets/stylesheets/material/mixins/_text-emphasis.scss +6 -6
- data/app/assets/stylesheets/material/mixins/_transition.scss +42 -10
- data/app/assets/stylesheets/material/utilities/_background.scss +18 -18
- data/app/assets/stylesheets/material/utilities/_border.scss +88 -41
- data/app/assets/stylesheets/material/utilities/_display.scss +63 -30
- data/app/assets/stylesheets/material/utilities/_flex.scss +139 -134
- data/app/assets/stylesheets/material/utilities/_material-icons.scss +3 -5
- data/app/assets/stylesheets/material/utilities/_position.scss +19 -22
- data/app/assets/stylesheets/material/utilities/_sizing.scss +11 -12
- data/app/assets/stylesheets/material/utilities/_spacing.scss +51 -56
- data/app/assets/stylesheets/material/utilities/_text.scss +80 -75
- data/app/assets/stylesheets/material/utilities/_visibility.scss +5 -46
- data/app/assets/stylesheets/material/utilities/_waves.scss +11 -18
- data/app/assets/stylesheets/material/variables/_elevation-shadow.scss +89 -82
- data/app/assets/stylesheets/material/variables/_grid.scss +29 -26
- data/app/assets/stylesheets/material/variables/_palette.scss +45 -0
- data/app/assets/stylesheets/material/variables/_spacer.scss +34 -88
- data/app/assets/stylesheets/material/variables/_transition.scss +29 -0
- data/app/assets/stylesheets/material/variables/_typography.scss +88 -74
- data/app/assets/stylesheets/material/variables/_variable-bootstrap.scss +196 -133
- data/app/assets/stylesheets/material/variables/_variable-material.scss +481 -429
- data/lib/material-sass/version.rb +1 -1
- data/material-sass.gemspec +3 -3
- metadata +26 -21
- data/app/assets/javascripts/material/addons-materialise/pickadate.js +0 -139
- data/app/assets/javascripts/material/addons-materialise/textarea-autosize.js +0 -11
- data/app/assets/javascripts/material/addons-materialise/wave.js +0 -15
- data/app/assets/javascripts/material/addons/pickadate.js +0 -7
- data/app/assets/javascripts/material/addons/wave.js +0 -5
- data/app/assets/javascripts/material/src/floating-label.js +0 -91
- data/app/assets/javascripts/material/src/navdrawer.js +0 -352
- data/app/assets/javascripts/material/src/tab-switch.js +0 -133
- data/app/assets/javascripts/material/src/util.js +0 -138
- data/app/assets/stylesheets/material/base/_normalize.scss +0 -253
- data/app/assets/stylesheets/material/base/_reboot.scss +0 -239
- data/app/assets/stylesheets/material/bootstrap/_button-group.scss +0 -134
- data/app/assets/stylesheets/material/mixins/_tab-focus.scss +0 -5
- data/app/assets/stylesheets/material/mixins/_transform.scss +0 -9
- data/app/assets/stylesheets/material/variables/_animation.scss +0 -22
- data/app/assets/stylesheets/material/variables/_colour.scss +0 -389
@@ -3,23 +3,26 @@
|
|
3
3
|
}
|
4
4
|
|
5
5
|
.img-thumbnail {
|
6
|
-
box-shadow: $thumbnail-box-shadow;
|
7
6
|
@include img-fluid;
|
7
|
+
|
8
|
+
box-shadow: $thumbnail-box-shadow;
|
8
9
|
}
|
9
10
|
|
10
|
-
|
11
|
+
|
12
|
+
|
11
13
|
// figure
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
14
|
+
|
15
|
+
.figure {
|
16
|
+
display: inline-block;
|
17
|
+
}
|
18
|
+
|
19
|
+
.figure-caption {
|
20
|
+
@include typography-caption;
|
21
|
+
|
22
|
+
color: $figure-caption-color;
|
23
|
+
}
|
24
|
+
|
25
|
+
.figure-img {
|
26
|
+
line-height: 1;
|
27
|
+
margin-bottom: $figure-img-margin-y;
|
28
|
+
}
|
@@ -1,12 +1,15 @@
|
|
1
1
|
.jumbotron {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
@include border-radius($jumbotron-border-radius);
|
3
|
+
|
4
|
+
background-color: $jumbotron-bg;
|
5
|
+
box-shadow: map-get($jumbotron-elevation-shadow, shadow);
|
6
|
+
color: $jumbotron-color;
|
7
|
+
padding: $jumbotron-padding-y $jumbotron-padding-x;
|
7
8
|
}
|
8
9
|
|
9
10
|
.jumbotron-fluid {
|
10
|
-
|
11
|
-
|
11
|
+
@include border-radius(0);
|
12
|
+
|
13
|
+
padding-right: 0;
|
14
|
+
padding-left: 0;
|
12
15
|
}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
.nav {
|
2
2
|
display: flex;
|
3
|
+
flex-wrap: wrap;
|
3
4
|
list-style: none;
|
4
5
|
margin-bottom: 0;
|
5
6
|
padding-left: 0;
|
@@ -7,90 +8,91 @@
|
|
7
8
|
|
8
9
|
.nav-link {
|
9
10
|
display: block;
|
10
|
-
padding: $nav-link-padding;
|
11
|
+
padding: $nav-link-padding-y $nav-link-padding-x;
|
12
|
+
|
13
|
+
@include active-focus-hover {
|
14
|
+
text-decoration: none;
|
15
|
+
}
|
16
|
+
|
17
|
+
&.disabled {
|
18
|
+
color: $nav-link-color-disabled;
|
19
|
+
cursor: default;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
// Justified
|
26
|
+
|
27
|
+
.nav-fill {
|
28
|
+
.nav-item {
|
29
|
+
flex: 1 1 auto;
|
30
|
+
text-align: center;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
.nav-justified {
|
35
|
+
.nav-item {
|
36
|
+
flex-basis: 0;
|
37
|
+
flex-grow: 1;
|
38
|
+
text-align: center;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
// Pills
|
45
|
+
|
46
|
+
.nav-pills {
|
47
|
+
.nav-link {
|
48
|
+
@include border-radius($nav-pills-border-radius);
|
49
|
+
@include transition-standard(background-color, color, opacity);
|
50
|
+
|
51
|
+
color: $nav-pills-color;
|
52
|
+
opacity: $nav-pills-link-opacity;
|
11
53
|
|
12
|
-
// active, focus, hover
|
13
54
|
@include active-focus-hover {
|
14
|
-
|
55
|
+
background-color: $nav-pills-bg-hover;
|
15
56
|
}
|
16
57
|
|
17
|
-
|
18
|
-
|
19
|
-
color: $nav-link-color-disabled;
|
20
|
-
cursor: $cursor-disabled;
|
58
|
+
&:active {
|
59
|
+
opacity: 1;
|
21
60
|
}
|
22
|
-
}
|
23
61
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
.nav-fill {
|
28
|
-
.nav-item {
|
29
|
-
flex: 1 1 auto;
|
30
|
-
text-align: center;
|
62
|
+
&.active {
|
63
|
+
color: $nav-pills-color-active;
|
64
|
+
opacity: 1;
|
31
65
|
}
|
32
|
-
}
|
33
66
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
67
|
+
&.disabled {
|
68
|
+
background-color: transparent;
|
69
|
+
color: $nav-link-color-disabled;
|
70
|
+
opacity: 1;
|
38
71
|
}
|
39
72
|
}
|
40
73
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
.nav-pills {
|
45
|
-
.nav-link {
|
46
|
-
color: $nav-link-color;
|
47
|
-
@include border-radius($border-radius);
|
48
|
-
@include transition-standard(background-color, color);
|
49
|
-
|
50
|
-
// active, focus, hover
|
51
|
-
@include active-focus-hover {
|
52
|
-
color: $nav-link-color-active;
|
53
|
-
}
|
54
|
-
|
55
|
-
&.active {
|
56
|
-
background-color: $nav-link-bg-active;
|
57
|
-
color: $nav-link-color-active;
|
58
|
-
cursor: default;
|
59
|
-
}
|
60
|
-
|
61
|
-
// disabled
|
62
|
-
&.disabled {
|
63
|
-
color: $nav-link-color-disabled;
|
64
|
-
}
|
65
|
-
}
|
66
|
-
|
67
|
-
// open
|
68
|
-
.nav-item.show .nav-link {
|
69
|
-
background-color: $nav-link-bg-active;
|
70
|
-
color: $nav-link-color-active;
|
71
|
-
cursor: default;
|
72
|
-
}
|
74
|
+
.show > .nav-link {
|
75
|
+
background-color: $nav-pills-bg-hover;
|
76
|
+
opacity: 1;
|
73
77
|
}
|
78
|
+
}
|
79
|
+
|
80
|
+
|
74
81
|
|
75
|
-
//
|
76
|
-
// tabs are defined in material design guidelines
|
82
|
+
// N.B. Tabs are defined in Material design
|
77
83
|
// (https://material.google.com/components/tabs.html)
|
78
84
|
// therefore, tabs are styled in /assets/sass/material/_tab.scss
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
// show when activated
|
87
|
-
> .active {
|
88
|
-
display: block;
|
89
|
-
}
|
85
|
+
|
86
|
+
// Tabs (helper classes to work with tabs JavaScript)
|
87
|
+
|
88
|
+
.tab-content {
|
89
|
+
// Hide to start
|
90
|
+
> .tab-pane {
|
91
|
+
display: none;
|
90
92
|
}
|
91
93
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
}
|
94
|
+
// Show when activated
|
95
|
+
> .active {
|
96
|
+
display: block;
|
96
97
|
}
|
98
|
+
}
|
@@ -6,30 +6,38 @@
|
|
6
6
|
}
|
7
7
|
|
8
8
|
.page-link {
|
9
|
-
|
10
|
-
|
9
|
+
@include border-radius($pagination-border-radius);
|
10
|
+
@include transition-standard(color);
|
11
|
+
|
12
|
+
color: $pagination-color;
|
11
13
|
display: block;
|
12
14
|
font-size: $btn-font-size;
|
13
15
|
font-weight: $btn-font-weight;
|
14
|
-
line-height:
|
15
|
-
margin-left:
|
16
|
+
line-height: $btn-line-height;
|
17
|
+
margin-left: $pagination-inner-spacer-x;
|
16
18
|
padding: $btn-padding-y $btn-padding-x;
|
17
19
|
position: relative;
|
18
20
|
text-align: center;
|
19
21
|
white-space: nowrap;
|
20
|
-
@include border-radius($border-radius);
|
21
|
-
@include transition-standard(background-color, color);
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
23
|
+
@include active-focus-hover {
|
24
|
+
color: $pagination-color;
|
25
|
+
text-decoration: none;
|
26
|
+
}
|
27
|
+
|
28
|
+
@include focus-hover {
|
29
|
+
background-image: linear-gradient(to bottom, $btn-overlay, $btn-overlay);
|
30
|
+
}
|
31
|
+
|
32
|
+
&:active,
|
33
|
+
&.active {
|
34
|
+
background-color: $btn-bg-active;
|
35
|
+
background-image: none;
|
36
|
+
}
|
29
37
|
|
30
|
-
|
31
|
-
|
32
|
-
|
38
|
+
&:focus {
|
39
|
+
outline: 0;
|
40
|
+
}
|
33
41
|
|
34
42
|
.page-item:first-child & {
|
35
43
|
margin-left: 0;
|
@@ -41,18 +49,18 @@
|
|
41
49
|
|
42
50
|
.page-item.disabled & {
|
43
51
|
background-color: transparent;
|
44
|
-
color: $
|
45
|
-
|
52
|
+
color: $pagination-color-disabled;
|
53
|
+
pointer-events: none;
|
46
54
|
}
|
47
55
|
}
|
48
56
|
|
49
|
-
//
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
57
|
+
// Size
|
58
|
+
.pagination-lg .page-link {
|
59
|
+
font-size: $btn-font-size-lg;
|
60
|
+
padding: $btn-padding-y-lg $btn-padding-x-lg;
|
61
|
+
}
|
54
62
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
63
|
+
.pagination-sm .page-link {
|
64
|
+
font-size: $btn-font-size-sm;
|
65
|
+
padding: $btn-padding-y-sm $btn-padding-x-sm;
|
66
|
+
}
|
@@ -1,86 +1,53 @@
|
|
1
|
-
//
|
2
|
-
// material design guidelines specifically discouragae the usage of tooltips with rich information
|
1
|
+
// N.B. Material design specifically discouragaes the usage of tooltips with rich information
|
3
2
|
// (https://material.google.com/components/tooltips.html#tooltips-usage)
|
4
|
-
//
|
3
|
+
// Therefore, popovers are styled as Material design's dialogs
|
5
4
|
|
6
5
|
.popover {
|
6
|
+
@include reset-text;
|
7
|
+
@include border-radius($border-radius);
|
8
|
+
|
7
9
|
background-clip: padding-box;
|
8
10
|
background-color: $dialog-content-bg;
|
9
|
-
border: 1px solid transparent;
|
10
11
|
box-shadow: map-get($dialog-elevation-shadow, shadow);
|
11
12
|
display: block;
|
12
13
|
font-size: $font-size-base;
|
14
|
+
margin: $tooltip-margin;
|
13
15
|
max-width: $dialog-width-sm;
|
14
16
|
position: absolute;
|
15
|
-
|
16
|
-
|
17
|
+
top: 0;
|
18
|
+
left: 0;
|
17
19
|
z-index: map-get($dialog-elevation-shadow, elevation);
|
18
|
-
|
19
|
-
@include reset-text;
|
20
|
-
|
21
|
-
&,
|
22
|
-
&.fade,
|
23
|
-
&.fade.show {
|
24
|
-
transition-property: opacity;
|
25
|
-
}
|
26
|
-
|
27
|
-
&.bs-tether-element-attached-bottom,
|
28
|
-
&.popover-top {
|
29
|
-
margin-top: ($tooltip-margin * -1);
|
30
|
-
}
|
31
|
-
|
32
|
-
&.bs-tether-element-attached-left,
|
33
|
-
&.popover-right {
|
34
|
-
margin-left: $tooltip-margin;
|
35
|
-
}
|
20
|
+
}
|
36
21
|
|
37
|
-
|
38
|
-
|
39
|
-
margin-left: ($tooltip-margin * -1);
|
40
|
-
}
|
22
|
+
.popover-body {
|
23
|
+
padding: $dialog-padding-y $dialog-padding-x;
|
41
24
|
|
42
|
-
|
43
|
-
|
44
|
-
margin-top: $tooltip-margin;
|
25
|
+
> :last-child {
|
26
|
+
margin-bottom: 0;
|
45
27
|
}
|
46
28
|
}
|
47
29
|
|
48
|
-
.popover-
|
49
|
-
padding: $dialog-inner-padding;
|
50
|
-
}
|
51
|
-
|
52
|
-
.popover-title {
|
53
|
-
margin: 0;
|
54
|
-
padding: $dialog-inner-padding;
|
55
|
-
padding-bottom: 0;
|
30
|
+
.popover-header {
|
56
31
|
@include typography-title;
|
57
32
|
|
33
|
+
margin-bottom: 0;
|
34
|
+
padding: $dialog-padding-y $dialog-padding-x 0;
|
35
|
+
|
58
36
|
&:empty {
|
59
37
|
display: none;
|
60
38
|
}
|
39
|
+
|
40
|
+
&:last-child {
|
41
|
+
padding-bottom: $dialog-padding-y;
|
42
|
+
}
|
61
43
|
}
|
62
44
|
|
63
|
-
// desktop
|
64
|
-
@include media-breakpoint-up(md) {
|
65
|
-
.popover {
|
66
|
-
&.bs-tether-element-attached-bottom,
|
67
|
-
&.popover-top {
|
68
|
-
margin-top: ($tooltip-margin-md-up * -1);
|
69
|
-
}
|
70
45
|
|
71
|
-
&.bs-tether-element-attached-left,
|
72
|
-
&.popover-right {
|
73
|
-
margin-left: $tooltip-margin-md-up;
|
74
|
-
}
|
75
46
|
|
76
|
-
|
77
|
-
&.popover-left {
|
78
|
-
margin-left: ($tooltip-margin-md-up * -1);
|
79
|
-
}
|
47
|
+
// Desktop
|
80
48
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
}
|
85
|
-
}
|
49
|
+
@include media-breakpoint-up(md) {
|
50
|
+
.popover {
|
51
|
+
margin: $tooltip-margin-desktop;
|
86
52
|
}
|
53
|
+
}
|
@@ -6,7 +6,7 @@
|
|
6
6
|
width: 100%;
|
7
7
|
|
8
8
|
&::before {
|
9
|
-
content:
|
9
|
+
content: '';
|
10
10
|
display: block;
|
11
11
|
}
|
12
12
|
|
@@ -18,9 +18,9 @@
|
|
18
18
|
border: 0;
|
19
19
|
height: 100%;
|
20
20
|
position: absolute;
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
top: 0;
|
22
|
+
bottom: 0;
|
23
|
+
left: 0;
|
24
24
|
width: 100%;
|
25
25
|
}
|
26
26
|
}
|