Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit fb7b9b3

Browse files
jelbournThomasBurleson
authored andcommitted
fix(css): stop using @extend for rules in a different module.
Closes #3400.
1 parent 45005f2 commit fb7b9b3

File tree

6 files changed

+52
-26
lines changed

6 files changed

+52
-26
lines changed

src/components/button/button.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ $icon-button-margin: rem(0.600) !default;
9797

9898
&.md-raised {
9999
&:not([disabled]) {
100-
@extend .md-shadow-bottom-z-1;
100+
@include md-shadow-bottom-z-1();
101101
}
102102
}
103103

@@ -136,7 +136,7 @@ $icon-button-margin: rem(0.600) !default;
136136
flex-grow: 0;
137137
flex-shrink: 0;
138138

139-
@extend .md-shadow-bottom-z-1;
139+
@include md-shadow-bottom-z-1();
140140
border-radius: 50%;
141141
background-clip: padding-box;
142142
overflow: hidden;
@@ -163,10 +163,10 @@ $icon-button-margin: rem(0.600) !default;
163163
&.md-raised,
164164
&.md-fab {
165165
&.md-focused {
166-
@extend .md-shadow-bottom-z-1;
166+
@include md-shadow-bottom-z-1();
167167
}
168168
&:active {
169-
@extend .md-shadow-bottom-z-2;
169+
@include md-shadow-bottom-z-2();
170170
}
171171
}
172172
}

src/components/list/list.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ md-list {
3030
padding: $list-padding-top $list-padding-right $list-padding-bottom $list-padding-left;
3131

3232
.md-subheader {
33-
@extend .md-body-2;
33+
@include md-body-2();
3434
line-height: $list-header-line-height;
3535
}
3636
}
@@ -177,18 +177,18 @@ md-list-item.md-3-line > .md-no-style {
177177
}
178178

179179
h3 {
180-
@extend .md-subhead;
180+
@include md-subhead();
181181
margin: $list-h3-margin;
182182
line-height: $list-header-line-height;
183183
}
184184
h4 {
185-
@extend .md-body-2;
185+
@include md-body-2();
186186
font-weight: $list-h4-font-weight;
187187
margin: $list-h4-margin;
188188
line-height: $list-header-line-height;
189189
}
190190
p {
191-
@extend .md-body-2;
191+
@include md-body-2();
192192
margin: $list-p-margin;
193193
line-height: $list-p-line-height;
194194
}

src/components/toolbar/toolbar.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ md-toolbar {
6464
}
6565

6666
.md-toolbar-tools {
67-
@extend .md-title;
67+
@include md-title();
6868
font-weight: 400;
6969
display: flex;
7070
align-items: center;

src/core/style/mixins.scss

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,43 @@
3131
}
3232
}
3333

34+
@mixin md-shadow-bottom-z-1() {
35+
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
36+
}
37+
38+
@mixin md-shadow-bottom-z-2() {
39+
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.4);
40+
}
41+
42+
// Typography mixins
43+
44+
@mixin md-title() {
45+
font-size: $title-font-size-base;
46+
font-weight: 500;
47+
letter-spacing: 0.005em;
48+
}
49+
50+
@mixin md-body-1() {
51+
font-size: $body-font-size-base;
52+
font-weight: 400;
53+
letter-spacing: 0.010em;
54+
line-height: rem(2);
55+
}
56+
57+
@mixin md-body-2() {
58+
font-size: $body-font-size-base;
59+
font-weight: 500;
60+
letter-spacing: 0.010em;
61+
line-height: rem(2.4);
62+
}
63+
64+
@mixin md-subhead() {
65+
font-size: $subhead-font-size-base;
66+
font-weight: 400;
67+
letter-spacing: 0.010em;
68+
line-height: rem(2.4);
69+
}
70+
3471
@function map-to-string($map) {
3572
$map-str: '{';
3673
$keys: map-keys($map);

src/core/style/structure.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ input {
8787
}
8888

8989
.md-shadow-bottom-z-1 {
90-
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
90+
@include md-shadow-bottom-z-1();
9191
}
9292
.md-shadow-bottom-z-2 {
93-
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.4);
93+
@include md-shadow-bottom-z-2();
9494
}
9595

9696
.md-shadow-animated.md-shadow {

src/core/style/typography.scss

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,30 +41,19 @@ ul, ol, p, h1, h2, h3, h4, h5, h6 {
4141
line-height: rem(3.2);
4242
}
4343
.md-title {
44-
font-size: $title-font-size-base;
45-
font-weight: 500;
46-
letter-spacing: 0.005em;
44+
@include md-title();
4745
}
4846
.md-subhead {
49-
font-size: $subhead-font-size-base;
50-
font-weight: 400;
51-
letter-spacing: 0.010em;
52-
line-height: rem(2.4);
47+
@include md-subhead();
5348
}
5449
/************
5550
* Body Copy
5651
************/
5752
.md-body-1 {
58-
font-size: $body-font-size-base;
59-
font-weight: 400;
60-
letter-spacing: 0.010em;
61-
line-height: rem(2);
53+
@include md-body-1();
6254
}
6355
.md-body-2 {
64-
font-size: $body-font-size-base;
65-
font-weight: 500;
66-
letter-spacing: 0.010em;
67-
line-height: rem(2.4);
56+
@include md-body-2();
6857
}
6958
.md-caption {
7059
font-size: $caption-font-size-base;

0 commit comments

Comments
 (0)