_cards.scss
3.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/* $cards
------------------------------------------*/
$mat-card-header-size: 40px !default;
body {
.mat-card {
padding: 0;
margin: ($gutter/3);
border-radius: $border-radius-base;
@include mat-elevation(1);
color: rgba(mat-color($foreground, base), 0.87);
.mat-card-header {
height: auto;
}
> :first-child {
border-radius: $border-radius-base $border-radius-base 0 0;
}
> :last-child {
border-radius: 0 0 $border-radius-base $border-radius-base;
}
[matCardAvatar] {
height: $mat-card-header-size;
width: $mat-card-header-size;
border-radius: 50%;
}
[matCardAvatar] {
font-size: 40px;
line-height: 40px;
margin: $gutter 0 0 $gutter;
}
.mat-card-image {
width: 100%;
margin: 0;
}
.mat-card-image:first-child {
margin-top: 0;
border-radius: $border-radius-base $border-radius-base 0 0;
}
.mat-card-title {
padding-top: $gutter;
padding-left: $gutter;
padding-right: $gutter;
line-height: 1;
font-size: 16px;
font-weight: 400;
}
.mat-card-subtitle {
padding-left: $gutter;
padding-right: $gutter;
line-height: 1;
font-size: 13px;
}
.mat-card-subtitle:first-child {
padding-top: $gutter;
}
.mat-card-title:nth-child(2) {
margin-top: -24px;
}
.mat-card-content {
padding: $gutter;
margin-bottom: 0;
position: relative;
}
[mat-fab-card-float] {
top: -36px;
position: absolute;
right: 8px;
}
.mat-card-actions,
.mat-card-actions:last-child {
padding: $gutter / 2;
margin: 0;
}
&.mat-card {
padding: 0;
}
[mat-card-float-icon] {
position: absolute;
right: 15px;
top: 50%;
margin-top: -20px;
width: 40px;
height: 40px;
.material-icons {
font-size: 40px;
opacity: .2;
transform: rotate(-5deg);
}
}
[mat-card-widget] {
height: auto;
display: flex;
flex-direction: row;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-grid-row-align: center;
align-items: center;
-webkit-align-content: center;
align-content: center;
max-width: 100%;
padding: $gutter;
[mat-card-widget-title], p {
margin: 0;
padding: 0;
line-height: $headings-line-height!important;
}
}
.card-image-header {
position: relative;
background-size: cover;
background-position: center bottom;
background-repeat: no-repat;
width: 100%;
img {
border-radius: $border-radius-base $border-radius-base 0 0;
display: block;
max-width: 100%;
}
}
&.card-widget {
.card-widget-content {
display: flex;
flex-direction: row;
height: 40px;
margin: -($gutter/2) 0 $gutter 0;
}
}
}
}
body [dir="rtl"] {
.mat-card {
[matCardAvatar] {
margin: $gutter $gutter 0 0;
}
[mat-fab-card-float] {
right: auto;
left: 8px;
}
[mat-card-float-icon] {
right: auto;
left: 15px;
}
}
}