material_components_web-sass 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +7 -0
  5. data/CHANGELOG.md +8 -0
  6. data/Gemfile +4 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +97 -0
  9. data/Rakefile +6 -0
  10. data/bin/console +14 -0
  11. data/bin/setup +8 -0
  12. data/lib/material_components_web-sass.rb +52 -0
  13. data/lib/material_components_web/sass/engine.rb +18 -0
  14. data/lib/material_components_web/sass/version.rb +5 -0
  15. data/material_components_web-sass.gemspec +32 -0
  16. data/vendor/assets/fonts/material-icons/LICENSE +202 -0
  17. data/vendor/assets/fonts/material-icons/MaterialIcons-Regular.eot +0 -0
  18. data/vendor/assets/fonts/material-icons/MaterialIcons-Regular.ttf +0 -0
  19. data/vendor/assets/fonts/material-icons/MaterialIcons-Regular.woff +0 -0
  20. data/vendor/assets/fonts/material-icons/MaterialIcons-Regular.woff2 +0 -0
  21. data/vendor/assets/fonts/roboto/LICENSE.txt +202 -0
  22. data/vendor/assets/fonts/roboto/Roboto-Bold.ttf +0 -0
  23. data/vendor/assets/fonts/roboto/Roboto-Bold.woff +0 -0
  24. data/vendor/assets/fonts/roboto/Roboto-Bold.woff2 +0 -0
  25. data/vendor/assets/fonts/roboto/Roboto-Light.ttf +0 -0
  26. data/vendor/assets/fonts/roboto/Roboto-Light.woff +0 -0
  27. data/vendor/assets/fonts/roboto/Roboto-Light.woff2 +0 -0
  28. data/vendor/assets/fonts/roboto/Roboto-Medium.ttf +0 -0
  29. data/vendor/assets/fonts/roboto/Roboto-Medium.woff +0 -0
  30. data/vendor/assets/fonts/roboto/Roboto-Medium.woff2 +0 -0
  31. data/vendor/assets/fonts/roboto/Roboto-Regular.ttf +0 -0
  32. data/vendor/assets/fonts/roboto/Roboto-Regular.woff +0 -0
  33. data/vendor/assets/fonts/roboto/Roboto-Regular.woff2 +0 -0
  34. data/vendor/assets/fonts/roboto/Roboto-Thin.ttf +0 -0
  35. data/vendor/assets/fonts/roboto/Roboto-Thin.woff +0 -0
  36. data/vendor/assets/fonts/roboto/Roboto-Thin.woff2 +0 -0
  37. data/vendor/assets/javascripts/material-components-web.js +5492 -0
  38. data/vendor/assets/stylesheets/@material/animation/_functions.scss +25 -0
  39. data/vendor/assets/stylesheets/@material/animation/_mixins.scss +29 -0
  40. data/vendor/assets/stylesheets/@material/animation/_variables.scss +19 -0
  41. data/vendor/assets/stylesheets/@material/animation/mdc-animation.scss +31 -0
  42. data/vendor/assets/stylesheets/@material/button/mdc-button.scss +199 -0
  43. data/vendor/assets/stylesheets/@material/card/mdc-card.scss +179 -0
  44. data/vendor/assets/stylesheets/@material/checkbox/_keyframes.scss +180 -0
  45. data/vendor/assets/stylesheets/@material/checkbox/_variables.scss +31 -0
  46. data/vendor/assets/stylesheets/@material/checkbox/mdc-checkbox.scss +310 -0
  47. data/vendor/assets/stylesheets/@material/drawer/_mixins.scss +145 -0
  48. data/vendor/assets/stylesheets/@material/drawer/mdc-drawer.scss +18 -0
  49. data/vendor/assets/stylesheets/@material/drawer/permanent/mdc-permanent-drawer.scss +54 -0
  50. data/vendor/assets/stylesheets/@material/drawer/temporary/mdc-temporary-drawer.scss +134 -0
  51. data/vendor/assets/stylesheets/@material/elevation/_mixins.scss +68 -0
  52. data/vendor/assets/stylesheets/@material/elevation/_variables.scss +122 -0
  53. data/vendor/assets/stylesheets/@material/elevation/mdc-elevation.scss +27 -0
  54. data/vendor/assets/stylesheets/@material/fab/mdc-fab.scss +122 -0
  55. data/vendor/assets/stylesheets/@material/fonts/material-icons.scss +36 -0
  56. data/vendor/assets/stylesheets/@material/fonts/roboto.scss +45 -0
  57. data/vendor/assets/stylesheets/@material/form-field/mdc-form-field.scss +64 -0
  58. data/vendor/assets/stylesheets/@material/icon-toggle/mdc-icon-toggle.scss +133 -0
  59. data/vendor/assets/stylesheets/@material/list/mdc-list.scss +207 -0
  60. data/vendor/assets/stylesheets/@material/menu/mdc-menu.scss +22 -0
  61. data/vendor/assets/stylesheets/@material/menu/simple/mdc-simple-menu.scss +194 -0
  62. data/vendor/assets/stylesheets/@material/radio/mdc-radio.scss +198 -0
  63. data/vendor/assets/stylesheets/@material/ripple/_keyframes.scss +61 -0
  64. data/vendor/assets/stylesheets/@material/ripple/_mixins.scss +196 -0
  65. data/vendor/assets/stylesheets/@material/ripple/_variables.scss +17 -0
  66. data/vendor/assets/stylesheets/@material/ripple/mdc-ripple.scss +80 -0
  67. data/vendor/assets/stylesheets/@material/rtl/_mixins.scss +251 -0
  68. data/vendor/assets/stylesheets/@material/select/mdc-select.scss +174 -0
  69. data/vendor/assets/stylesheets/@material/snackbar/_variables.scss +22 -0
  70. data/vendor/assets/stylesheets/@material/snackbar/mdc-snackbar.scss +126 -0
  71. data/vendor/assets/stylesheets/@material/textfield/mdc-textfield.scss +512 -0
  72. data/vendor/assets/stylesheets/@material/theme/_constants.scss +285 -0
  73. data/vendor/assets/stylesheets/@material/theme/_functions.scss +64 -0
  74. data/vendor/assets/stylesheets/@material/theme/_mixins.scss +104 -0
  75. data/vendor/assets/stylesheets/@material/theme/_variables.scss +80 -0
  76. data/vendor/assets/stylesheets/@material/theme/mdc-theme.scss +43 -0
  77. data/vendor/assets/stylesheets/@material/typography/_mixins.scss +45 -0
  78. data/vendor/assets/stylesheets/@material/typography/_variables.scss +109 -0
  79. data/vendor/assets/stylesheets/@material/typography/mdc-typography.scss +32 -0
  80. data/vendor/assets/stylesheets/_material-components-web.scss +36 -0
  81. metadata +195 -0
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Copyright 2016 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 "./mixins";
18
+
19
+ @for $z-value from 0 through 24 {
20
+ .mdc-elevation--z#{$z-value} {
21
+ @include mdc-elevation($z-value);
22
+ }
23
+ }
24
+
25
+ .mdc-elevation-transition {
26
+ @include mdc-elevation-transition;
27
+ }
@@ -0,0 +1,122 @@
1
+ /**
2
+ * Copyright 2016 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 "@material/animation/functions";
18
+ @import "@material/animation/variables";
19
+ @import "@material/elevation/mixins";
20
+ @import "@material/theme/mixins";
21
+
22
+ /* postcss-bem-linter: define fab */
23
+ .mdc-fab {
24
+ display: inline-flex;
25
+ position: relative;
26
+ justify-content: center;
27
+ width: 56px;
28
+ height: 56px;
29
+ padding: 0;
30
+ transition: box-shadow 280ms $mdc-animation-fast-out-slow-in-timing-function;
31
+ border: none;
32
+ border-radius: 50%;
33
+ cursor: pointer;
34
+ user-select: none;
35
+ box-sizing: border-box;
36
+ fill: currentColor;
37
+ -moz-appearance: none;
38
+ -webkit-appearance: none;
39
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
40
+
41
+ @include mdc-theme-prop(background-color, accent);
42
+ @include mdc-theme-prop(color, text-primary-on-accent);
43
+ @include mdc-elevation(6);
44
+
45
+ &--mini {
46
+ width: 40px;
47
+ height: 40px;
48
+ }
49
+
50
+ &--plain {
51
+ background-color: white;
52
+
53
+ @include mdc-theme-prop(color, text-primary-on-light);
54
+ }
55
+
56
+ &::before {
57
+ position: absolute;
58
+ top: 0;
59
+ left: 0;
60
+ width: 100%;
61
+ height: 100%;
62
+ transition: mdc-animation-exit(opacity, 120ms);
63
+ border-radius: inherit;
64
+ background: black;
65
+ content: "";
66
+ opacity: 0;
67
+ }
68
+
69
+ &:focus::before {
70
+ transition: mdc-animation-enter(opacity, 120ms);
71
+ opacity: .12;
72
+ }
73
+
74
+ &:active::before {
75
+ transition: mdc-animation-enter(opacity, 120ms);
76
+ opacity: .18;
77
+ }
78
+
79
+ &:active:focus::before {
80
+ transition-timing-function: $mdc-animation-fast-out-slow-in-timing-function;
81
+ }
82
+
83
+ &:active,
84
+ &:focus {
85
+ outline: none;
86
+ }
87
+
88
+ &:active {
89
+ @include mdc-elevation(12);
90
+ }
91
+
92
+ &:hover {
93
+ cursor: pointer;
94
+ }
95
+
96
+ &::-moz-focus-inner {
97
+ padding: 0;
98
+ border: 0;
99
+ }
100
+
101
+ /*
102
+ This allows for using SVGs within them to align properly in all browsers.
103
+ Can remove once: https://bugzilla.mozilla.org/show_bug.cgi?id=1294515 is resolved.
104
+ */
105
+
106
+ /* stylelint-disable selector-no-type */
107
+
108
+ /* postcss-bem-linter: ignore */
109
+ > svg {
110
+ width: 100%;
111
+ }
112
+
113
+ fieldset:disabled &,
114
+ &:disabled {
115
+ background-color: rgba(0, 0, 0, .12);
116
+ color: rgba(0, 0, 0, .26);
117
+ cursor: default;
118
+ pointer-events: none;
119
+ }
120
+ }
121
+
122
+ /* postcss-bem-linter: end */
@@ -0,0 +1,36 @@
1
+ @font-face {
2
+ font-family: 'Material Icons';
3
+ font-style: normal;
4
+ font-weight: 400;
5
+ src: url(font-path('material-icons/MaterialIcons-Regular.eot')); /* For IE6-8 */
6
+ src: local('Material Icons'),
7
+ local('MaterialIcons-Regular'),
8
+ url(font-path('material-icons/MaterialIcons-Regular.woff2')) format('woff2'),
9
+ url(font-path('material-icons/MaterialIcons-Regular.woff')) format('woff'),
10
+ url(font-path('material-icons/MaterialIcons-Regular.ttf')) format('truetype');
11
+ }
12
+
13
+ .material-icons {
14
+ font-family: 'Material Icons';
15
+ font-weight: normal;
16
+ font-style: normal;
17
+ font-size: 24px; /* Preferred icon size */
18
+ display: inline-block;
19
+ line-height: 1;
20
+ text-transform: none;
21
+ letter-spacing: normal;
22
+ word-wrap: normal;
23
+ white-space: nowrap;
24
+ direction: ltr;
25
+
26
+ /* Support for all WebKit browsers. */
27
+ -webkit-font-smoothing: antialiased;
28
+ /* Support for Safari and Chrome. */
29
+ text-rendering: optimizeLegibility;
30
+
31
+ /* Support for Firefox. */
32
+ -moz-osx-font-smoothing: grayscale;
33
+
34
+ /* Support for IE. */
35
+ font-feature-settings: 'liga';
36
+ }
@@ -0,0 +1,45 @@
1
+ @font-face {
2
+ font-family: "Roboto";
3
+ src: local(Roboto Thin),
4
+ url(font-path('roboto/Roboto-Thin.woff2')) format("woff2"),
5
+ url(font-path('roboto/Roboto-Thin.woff')) format("woff"),
6
+ url(font-path('roboto/Roboto-Thin.ttf')) format("truetype");
7
+
8
+ font-weight: 100;
9
+ }
10
+ @font-face {
11
+ font-family: "Roboto";
12
+ src: local(Roboto Light),
13
+ url(font-path('roboto/Roboto-Light.woff2')) format("woff2"),
14
+ url(font-path('roboto/Roboto-Light.woff')) format("woff"),
15
+ url(font-path('roboto/Roboto-Light.ttf')) format("truetype");
16
+ font-weight: 300;
17
+ }
18
+
19
+ @font-face {
20
+ font-family: "Roboto";
21
+ src: local(Roboto),
22
+ local(Roboto Regular),
23
+ url(font-path('roboto/Roboto-Regular.woff2')) format("woff2"),
24
+ url(font-path('roboto/Roboto-Regular.woff')) format("woff"),
25
+ url(font-path('roboto/Roboto-Regular.ttf')) format("truetype");
26
+ font-weight: 400;
27
+ }
28
+
29
+ @font-face {
30
+ font-family: "Roboto";
31
+ src: local(Roboto Medium),
32
+ url(font-path('roboto/Roboto-Medium.woff2')) format("woff2"),
33
+ url(font-path('roboto/Roboto-Medium.woff')) format("woff"),
34
+ url(font-path('roboto/Roboto-Medium.ttf')) format("truetype");
35
+ font-weight: 500;
36
+ }
37
+
38
+ @font-face {
39
+ font-family: "Roboto";
40
+ src: local(Roboto Bold),
41
+ url(font-path('roboto/Roboto-Bold.woff2')) format("woff2"),
42
+ url(font-path('roboto/Roboto-Bold.woff')) format("woff"),
43
+ url(font-path('roboto/Roboto-Bold.ttf')) format("truetype");
44
+ font-weight: 700;
45
+ }
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Copyright 2016 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 "@material/rtl/mixins";
18
+ @import "@material/theme/mixins";
19
+ @import "@material/typography/mixins";
20
+
21
+ $mdc-form-field-item-spacing: 4px;
22
+
23
+ /* stylelint-disable selector-no-type */
24
+ .mdc-form-field {
25
+ @include mdc-typography(body1);
26
+ @include mdc-theme-prop(color, text-primary-on-light);
27
+
28
+ display: inline-flex;
29
+ align-items: center;
30
+ vertical-align: middle;
31
+
32
+ @include mdc-theme-dark {
33
+ @include mdc-theme-prop(color, text-primary-on-dark);
34
+ }
35
+
36
+ > label {
37
+ order: 0;
38
+ margin-right: auto;
39
+ margin-left: $mdc-form-field-item-spacing;
40
+ }
41
+
42
+ @include mdc-rtl {
43
+ > label {
44
+ margin-right: $mdc-form-field-item-spacing;
45
+ margin-left: auto;
46
+ }
47
+ }
48
+ }
49
+
50
+ .mdc-form-field--align-end {
51
+ > label {
52
+ order: -1;
53
+ margin-right: $mdc-form-field-item-spacing;
54
+ margin-left: auto;
55
+ }
56
+
57
+ @include mdc-rtl {
58
+ > label {
59
+ margin-right: auto;
60
+ margin-left: $mdc-form-field-item-spacing;
61
+ }
62
+ }
63
+ }
64
+ /* stylelint-enable selector-no-type */
@@ -0,0 +1,133 @@
1
+ /**
2
+ * Copyright 2016 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
+ /** postcss-bem-linter: define icon-toggle */
18
+
19
+ @import "@material/animation/functions";
20
+ @import "@material/ripple/mixins";
21
+ @import "@material/theme/mixins";
22
+
23
+ .mdc-icon-toggle {
24
+ @include mdc-theme-prop(color, text-secondary-on-light);
25
+
26
+ display: flex;
27
+ position: relative;
28
+ box-sizing: border-box;
29
+ align-items: center;
30
+ justify-content: center;
31
+ width: 48px;
32
+ height: 48px;
33
+ padding: 12px;
34
+ outline: none;
35
+ font-size: 1.5rem;
36
+ cursor: pointer;
37
+ user-select: none;
38
+
39
+ &::after {
40
+ position: absolute;
41
+ top: 0;
42
+ right: 0;
43
+ bottom: 0;
44
+ left: 0;
45
+ transform: scale(0, 0);
46
+ transition: mdc-animation-exit(opacity, 80ms), mdc-animation-exit(transform, 80ms);
47
+ border-radius: 50%;
48
+ background-color: currentColor;
49
+ content: "";
50
+ opacity: 0;
51
+ pointer-events: none;
52
+ }
53
+
54
+ &:focus::after {
55
+ transform: scale(1.3, 1.3);
56
+ transition: mdc-animation-enter(opacity, 80ms), mdc-animation-enter(transform, 80ms);
57
+ opacity: .12;
58
+ }
59
+
60
+ @include mdc-theme-dark {
61
+ @include mdc-theme-prop(color, text-primary-on-dark);
62
+
63
+ &:focus::after {
64
+ opacity: .3;
65
+ }
66
+ }
67
+ }
68
+
69
+ .mdc-icon-toggle--primary {
70
+ @include mdc-theme-prop(color, primary);
71
+ }
72
+
73
+ .mdc-icon-toggle--accent {
74
+ @include mdc-theme-prop(color, accent);
75
+ }
76
+
77
+ .mdc-icon-toggle--primary,
78
+ .mdc-icon-toggle--accent {
79
+ &:focus::after {
80
+ opacity: .26;
81
+ }
82
+ }
83
+
84
+ .mdc-icon-toggle--disabled {
85
+ @include mdc-theme-prop(color, text-disabled-on-light);
86
+
87
+ pointer-events: none;
88
+
89
+ @include mdc-theme-dark(".mdc-icon-toggle", true) {
90
+ @include mdc-theme-prop(color, text-disabled-on-dark);
91
+ }
92
+ }
93
+
94
+ /** postcss-bem-linter: end */
95
+
96
+ .mdc-icon-toggle.mdc-ripple-upgraded {
97
+ @include mdc-ripple-base;
98
+ // NOTE: The spec denotes specific opacity values to use for different styles of icon buttons,
99
+ // either "light", "dark", or "color". Because ripples are made up of two distinct elements,
100
+ // we need to use an opacity value such that when two elements of the same color and opacity are
101
+ // layered on top of one another, they create the opacity specified in the spec.
102
+ // This is done by using the painter's compositing algorithm:
103
+ //
104
+ // alpha[desired] = alpha[a] + alpha[b](1 - alpha[a]).
105
+ //
106
+ // Because both alpha values are the same this reduces to:
107
+ //
108
+ // alpha[desired] = alpha[a] + alpha[a](1 - alpha[a]).
109
+ //
110
+ // We simply solve this quadratic equation for the nonnegative root between [0, 1].
111
+ // E.g. for black 12% opacity:
112
+ // https://www.wolframalpha.com/input/?i=x+%2B+x(1+-+x)+%3D+.12,+x+%3C%3D+1,+x+%3E%3D+0
113
+ @include mdc-ripple-bg((pseudo: "::before", opacity: .062));
114
+ @include mdc-ripple-fg((pseudo: "::after", opacity: .062));
115
+
116
+ @include mdc-theme-dark(".mdc-icon-toggle", true) {
117
+ @include mdc-ripple-bg((pseudo: "::before", base-color: white, opacity: .16));
118
+ @include mdc-ripple-fg((pseudo: "::after", base-color: white, opacity: .16));
119
+ }
120
+
121
+ // For some reason, GPU layer promotion makes ripples look terrible on Chrome
122
+ will-change: initial;
123
+ }
124
+
125
+ .mdc-icon-toggle--primary.mdc-ripple-upgraded {
126
+ @include mdc-ripple-bg((pseudo: "::before", theme-style: primary, opacity: .14));
127
+ @include mdc-ripple-fg((pseudo: "::after", theme-style: primary, opacity: .14));
128
+ }
129
+
130
+ .mdc-icon-toggle--accent.mdc-ripple-upgraded {
131
+ @include mdc-ripple-bg((pseudo: "::before", theme-style: accent, opacity: .14));
132
+ @include mdc-ripple-fg((pseudo: "::after", theme-style: accent, opacity: .14));
133
+ }
@@ -0,0 +1,207 @@
1
+ /**
2
+ * Copyright 2016 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 "@material/rtl/mixins";
18
+ @import "@material/theme/mixins";
19
+ @import "@material/typography/mixins";
20
+ @import "@material/typography/variables";
21
+
22
+ /**
23
+ * Sets the width and height of a detail element to the specified dimension.
24
+ */
25
+ @mixin mdc-list-detail-size_($size) {
26
+ width: $size;
27
+ height: $size;
28
+ }
29
+
30
+ /**
31
+ * Sets the width and height of the start detail element, as well as calculates the margins for
32
+ * the start detail element such that the text is always offset by 72px, which is defined within
33
+ * the spec.
34
+ */
35
+ @mixin mdc-list-start-detail-size_($size) {
36
+ /* stylelint-disable scss/dollar-variable-pattern */
37
+
38
+ $text-offset: 72px;
39
+ $side-padding: 16px;
40
+ $margin-value: $text-offset - $side-padding - $size;
41
+
42
+ @include mdc-list-detail-size_($size);
43
+ @include mdc-rtl-reflexive-box(margin, right, $margin-value, ".mdc-list-item");
44
+
45
+ /* stylelint-enable scss/dollar-variable-pattern */
46
+ }
47
+
48
+ /* postcss-bem-linter: define list */
49
+
50
+ .mdc-list {
51
+ @include mdc-typography(subheading2);
52
+ @include mdc-theme-prop(color, text-primary-on-background);
53
+
54
+ @include mdc-theme-dark {
55
+ @include mdc-theme-prop(color, text-primary-on-dark);
56
+ }
57
+
58
+ margin: 0;
59
+ padding: 8px 16px 0;
60
+
61
+ /* According to the mocks and stickersheet, the line-height is adjusted to 24px for text content,
62
+ * same as for subheading1. */
63
+ line-height: map-get(map-get($mdc-typography-styles, subheading1), line-height);
64
+ list-style-type: none;
65
+ }
66
+
67
+ .mdc-list--dense {
68
+ padding-top: 4px;
69
+ font-size: .812rem;
70
+ }
71
+
72
+ /* postcss-bem-linter: end */
73
+
74
+ /* postcss-bem-linter: define list-item */
75
+
76
+ .mdc-list-item {
77
+ display: flex;
78
+ align-items: center;
79
+ justify-content: flex-start;
80
+ height: 48px;
81
+
82
+ &__start-detail {
83
+ @include mdc-list-start-detail-size_(24px);
84
+ }
85
+
86
+ &__end-detail {
87
+ @include mdc-list-detail-size_(24px);
88
+ @include mdc-rtl-reflexive-property(margin, auto, 16px, ".mdc-list-item");
89
+ }
90
+
91
+ &__text {
92
+ display: inline-flex;
93
+ flex-direction: column;
94
+
95
+ &__secondary {
96
+ @include mdc-typography(body1);
97
+ @include mdc-theme-prop(color, text-secondary-on-background);
98
+
99
+ @include mdc-theme-dark {
100
+ @include mdc-theme-prop(color, text-secondary-on-dark);
101
+ }
102
+
103
+ /* Match the font size to the primary text when dense */
104
+ /* stylelint-disable plugin/selector-bem-pattern */
105
+ .mdc-list--dense & {
106
+ font-size: inherit;
107
+ }
108
+ /* stylelint-enable plugin/selector-bem-pattern */
109
+ }
110
+ }
111
+
112
+ /* stylelint-disable plugin/selector-bem-pattern */
113
+ .mdc-list--dense & {
114
+ height: 40px;
115
+
116
+ &__start-detail {
117
+ @include mdc-list-start-detail-size_(20px);
118
+ }
119
+
120
+ &__end-detail {
121
+ @include mdc-list-detail-size_(20px);
122
+ }
123
+ }
124
+
125
+ .mdc-list--avatar-list & {
126
+ height: 56px;
127
+
128
+ &__start-detail {
129
+ @include mdc-list-start-detail-size_(40px);
130
+
131
+ border-radius: 50%;
132
+ }
133
+ }
134
+
135
+ .mdc-list--avatar-list.mdc-list--dense .mdc-list__item {
136
+ height: 48px;
137
+
138
+ &__start-detail {
139
+ @include mdc-list-start-detail-size_(36px);
140
+ }
141
+ }
142
+
143
+ .mdc-list--two-line & {
144
+ height: 72px;
145
+ }
146
+
147
+ .mdc-list--two-line.mdc-list--dense & {
148
+ height: 60px;
149
+ }
150
+ /* stylelint-enable plugin/selector-bem-pattern */
151
+ }
152
+
153
+ /* postcss-bem-linter: end */
154
+
155
+ /* postcss-bem-linter: define list-divider */
156
+
157
+ .mdc-list-divider {
158
+ height: 0;
159
+ margin: 0;
160
+ border: none;
161
+ border-bottom: 1px solid rgba(0, 0, 0, .12);
162
+
163
+ @include mdc-theme-dark(".mdc-list") {
164
+ border-bottom-color: rgba(255, 255, 255, .2);
165
+ }
166
+ }
167
+
168
+ .mdc-list-divider--inset {
169
+ $mdc-list-divider-inset-amt: /* text offset */ 72px - /* padding offset */ 16px;
170
+
171
+ @include mdc-rtl-reflexive-box(margin, left, $mdc-list-divider-inset-amt, ".mdc-list-group");
172
+
173
+ width: calc(100% - #{$mdc-list-divider-inset-amt});
174
+ }
175
+
176
+ /* postcss-bem-linter: end */
177
+
178
+ /* postcss-bem-linter: define list-group */
179
+
180
+ .mdc-list-group {
181
+ padding: 0 16px;
182
+
183
+ &__subheader {
184
+ $mdc-list-subheader-virtual-height: 3rem;
185
+ $mdc-list-subheader-leading: map-get(map-get($mdc-typography-styles, body2), line-height);
186
+ $mdc-list-subheader-margin:
187
+ ($mdc-list-subheader-virtual-height - $mdc-list-subheader-leading) / 2;
188
+
189
+ @include mdc-typography(body2);
190
+ @include mdc-theme-prop(color, text-primary-on-background);
191
+
192
+ @include mdc-theme-dark {
193
+ @include mdc-theme-prop(color, text-primary-on-dark);
194
+ }
195
+
196
+ margin: $mdc-list-subheader-margin 0;
197
+ }
198
+
199
+ /* Reset padding on mdc-list since it's already accounted for by the list group. */
200
+ /* stylelint-disable plugin/selector-bem-pattern */
201
+ .mdc-list {
202
+ padding: 0;
203
+ }
204
+ /* stylelint-enable plugin/selector-bem-pattern */
205
+ }
206
+
207
+ /* postcss-bem-linter: end */