Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 2151bd4

Browse files
authoredJan 26, 2017
fix(card): Add bottom margin for 3x media in horizontal blocks (#207)
1 parent 65b05bf commit 2151bd4

File tree

1 file changed

+30
-29
lines changed

1 file changed

+30
-29
lines changed
 

‎packages/mdc-card/mdc-card.scss

+30-29
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
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-
*/
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+
//
1616

1717
@import "@material/elevation/mixins";
1818
@import "@material/theme/mixins";
1919
@import "@material/typography/mixins";
2020

21-
/* postcss-bem-linter: define card */
21+
// postcss-bem-linter: define card
2222
.mdc-card {
2323
@include mdc-elevation(2);
2424

@@ -31,12 +31,12 @@
3131
&__primary {
3232
padding: 16px;
3333

34-
/* Add extra space before large title. */
34+
// Add extra space before large title.
3535
.mdc-card__title--large {
3636
padding-top: 8px;
3737
}
3838

39-
/* Add extra padding if this is the last block. */
39+
// Add extra padding if this is the last block.
4040
&:last-child {
4141
padding-bottom: 24px;
4242
}
@@ -53,13 +53,13 @@
5353
@include mdc-theme-prop(color, text-primary-on-dark);
5454
}
5555

56-
/* Remove top padding if immediately preceded by a primary block. */
56+
// Remove top padding if immediately preceded by a primary block.
5757
.mdc-card__primary + & {
5858
margin-top: -8px;
5959
padding-top: 0;
6060
}
6161

62-
/* Add extra padding if this is the last block. */
62+
// Add extra padding if this is the last block.
6363
&:last-child {
6464
padding-bottom: 24px;
6565
}
@@ -70,12 +70,12 @@
7070
padding: 8px;
7171
box-sizing: border-box;
7272

73-
/* Adjust text color for dark theme. */
73+
// Adjust text color for dark theme.
7474
@include mdc-theme-dark(".mdc-card") {
7575
@include mdc-theme-prop(color, text-primary-on-dark);
7676
}
7777

78-
/* Tweak button paddings and margins when they're used as actions */
78+
// Tweak button paddings and margins when they're used as actions
7979
.mdc-card__action {
8080
margin: 0 8px 0 0;
8181
}
@@ -84,7 +84,7 @@
8484
margin-right: 0;
8585
}
8686

87-
/* Vertical actions (one per line) */
87+
// Vertical actions (one per line)
8888
&--vertical {
8989
flex-flow: column;
9090
align-items: flex-start;
@@ -127,12 +127,12 @@
127127
@include mdc-typography(body2);
128128
@include mdc-theme-prop(color, text-primary-on-background);
129129

130-
/* Adjust text color for dark theme. */
130+
// Adjust text color for dark theme.
131131
@include mdc-theme-dark(".mdc-card") {
132132
@include mdc-theme-prop(color, text-primary-on-dark);
133133
}
134134

135-
margin: -.063rem 0; /* -1sp 0 */
135+
margin: -.063rem 0; // -1sp 0
136136
}
137137

138138
&__title--large {
@@ -145,12 +145,12 @@
145145
@include mdc-typography(body1);
146146
@include mdc-theme-prop(color, text-primary-on-background);
147147

148-
/* Adjust text color for dark theme. */
148+
// Adjust text color for dark theme.
149149
@include mdc-theme-dark(".mdc-card") {
150150
@include mdc-theme-prop(color, text-primary-on-dark);
151151
}
152152

153-
margin: -.063rem 0; /* -1sp 0 */
153+
margin: -.063rem 0; // -1sp 0
154154
}
155155

156156
&__horizontal-block {
@@ -170,10 +170,11 @@
170170
margin-left: 16px;
171171
}
172172

173-
&:last-child .mdc-card__media-item {
173+
// postcss-bem-linter: ignore
174+
.mdc-card__media-item--3x {
174175
margin-bottom: 16px;
175176
}
176177
}
177178
}
178179

179-
/* postcss-bem-linter: end */
180+
// postcss-bem-linter: end

0 commit comments

Comments
 (0)
This repository has been archived.