-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path_person.scss
120 lines (93 loc) · 2.05 KB
/
_person.scss
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
// 名片 (media object)
// 容器
@mixin person-container {
// 为了让每一行的名片高度统一, Flexbox 搞起
// oldIE 是什么, 可以吃吗?
@include media($non-mobile) {
.browser-modern & {
@include display(flex);
@include flex-wrap(wrap);
}
}
}
// 名片
.person {
@include clearfix;
// 名片外观
@include media($non-mobile) {
background-color: $person-card-bg;
border: 1px solid $person-card-border-color;
box-shadow: 0 0.5em 1em $person-card-shadow-color;
margin-bottom: 2em;
padding: 1em;
}
@include media($mobile) {
border-bottom: 1px solid $person-card-border-color;
padding: 1em;
&:hover {
background-color: $person-card-bg;
}
&:last-child {
border-bottom: none;
}
}
// 布局
@include media($wide) {
.browser-modern & {
@include flex(0 0 flex-grid(6));
&:nth-child(2n) {
margin-left: flex-gutter();
}
}
.browser-ie & {
@include span-columns(6);
@include omega(2n);
}
}
@include media($narrow) {
.browser-modern & {
@include flex(0 0 flex-grid(3, 6));
&:nth-child(2n) {
margin-left: flex-gutter(6);
}
}
.browser-ie & {
@include span-columns(6);
@include omega(2n);
}
}
@include media($mobile) {
@include span-columns(4);
}
}
.person__name {
font-size: 125%;
font-weight: 600;
margin-bottom: 0.5em;
}
// 头像
// 说是 link, 实际上还承担着固定尺寸容器的作用
// TODO: 重构
$avatar-size: 80px;
.person__avatar-link {
float: left;
margin-right: 1em;
width: $avatar-size;
height: $avatar-size;
// 头像图片宽度撑不满容器的话, 也要居中显示
text-align: center;
}
.person__avatar {
display: inline-block;
max-width: $avatar-size;
max-height: $avatar-size;
border-radius: 0.5em;
}
// 介绍文字
// .person__intro {
// color: $text-secondary-color;
// .person:hover > .person__desc > & {
// color: inherit;
// }
// }
// vim:set ai et ts=2 sw=2 sts=2 fenc=utf-8: