yapi/client/components/ProjectCard/ProjectCard.scss

135 lines
2.8 KiB
SCSS
Raw Normal View History

2017-08-10 15:36:35 +08:00
@import '../../styles/mixin.scss';
2017-08-19 15:18:55 +08:00
.card-container {
position: relative;
2017-08-22 17:26:53 +08:00
user-select: none;
2017-08-22 16:03:39 +08:00
transition: all .2s;
.m-card, .card-btns {
transform: translateY(0);
transition: all .2s;
}
2017-08-19 15:18:55 +08:00
&:hover {
2017-08-22 16:03:39 +08:00
.m-card, .card-btns {
transform: translateY(-4px);
2017-08-19 15:18:55 +08:00
}
2017-08-24 14:13:22 +08:00
.m-card .ant-card-body {
2017-09-15 17:20:30 +08:00
background-color: $color-bg-gray;
2017-08-24 14:13:22 +08:00
box-shadow: 0 4px 8px rgba(50, 50, 93, 0.11), 0 4px 6px rgba(0, 0, 0, 0.08);
}
2017-09-15 17:20:30 +08:00
.card-btns .icon {
color: rgba(39, 56, 72, 0.85);
}
.card-btns .icon.active {
color: #fac200;
}
2017-08-22 16:03:39 +08:00
}
&:active {
.m-card, .card-btns {
transform: translateY(4px);
2017-08-19 15:18:55 +08:00
}
}
2017-08-24 14:13:22 +08:00
// 覆盖 card 组件 hover 状态的默认阴影样式
.ant-card:not(.ant-card-no-hovering):hover {
box-shadow: none;
}
2017-08-22 17:26:53 +08:00
// 卡片右上角按钮
2017-08-19 15:18:55 +08:00
.card-btns {
position: absolute;
top: 0;
right: 0;
2017-08-22 16:03:39 +08:00
width: .48rem;
height: .48rem;
2017-09-15 15:57:34 +08:00
// background: linear-gradient(225deg, #ccc, #ccc 50%, transparent 0);
2017-08-22 17:26:53 +08:00
border-top-right-radius: 4px;
2017-08-19 15:18:55 +08:00
.icon {
cursor: pointer;
2017-08-22 16:03:39 +08:00
font-size: .16rem;
padding: .06rem;
2017-08-19 15:18:55 +08:00
position: absolute;
right: 0;
top: 0;
2017-09-15 17:20:30 +08:00
color: #fff;
2017-08-19 15:18:55 +08:00
}
2017-09-15 15:57:34 +08:00
.icon.active {
2017-09-15 17:20:30 +08:00
color: #fff;
2017-09-15 15:57:34 +08:00
}
2017-08-19 15:18:55 +08:00
}
}
2017-08-11 19:30:12 +08:00
.m-card {
cursor: pointer;
text-align: center;
2017-09-15 17:20:30 +08:00
margin-bottom: .16rem;
2017-08-11 19:30:12 +08:00
transition: all .4s;
2017-08-19 15:18:55 +08:00
position: relative;
2017-08-22 16:03:39 +08:00
.ant-card-body {
2017-09-15 17:20:30 +08:00
background-color: #fff;
2017-08-22 16:03:39 +08:00
border-radius: 4px;
2017-08-23 17:23:54 +08:00
padding-top: .24rem + .16rem + 1rem;
2017-09-15 17:20:30 +08:00
box-shadow: 0 4px 6px rgba(255,255,255,.11), 0 1px 3px rgba(255,255,255,.08);
// box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
2017-08-24 14:13:22 +08:00
transition: all .2s;
2017-08-22 16:03:39 +08:00
}
.ui-logo {
width: 1rem;
height: 1rem;
border-radius: 50%;
position: absolute;
left: 50%;
top: 0;
2017-08-23 17:23:54 +08:00
transform: translate(-50%, .24rem);
font-size: .5rem;
2017-08-22 16:03:39 +08:00
color: #fff;
background-color: #2395f1;
line-height: 1rem;
box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
}
.ui-title {
font-size: .19rem;
font-weight: normal;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
.m-card-body {
2017-08-11 19:30:12 +08:00
.icon {
font-size: .8rem;
2017-08-10 15:36:35 +08:00
}
2017-08-11 19:30:12 +08:00
.name {
font-size: .18rem;
margin-top: .16rem;
}
}
2017-08-22 16:03:39 +08:00
2017-08-11 19:30:12 +08:00
}
2017-08-22 17:26:53 +08:00
2017-08-23 17:23:54 +08:00
@media (max-width: 768px) {
2017-08-22 17:26:53 +08:00
.m-card {
.ui-logo {
width: .6rem;
height: .6rem;
line-height: .6rem;
2017-08-23 17:23:54 +08:00
font-size: .3rem;
2017-08-24 18:06:38 +08:00
transform: translate(-50%, 0.08rem);
}
.ant-card-body {
padding-top: .08rem + .08rem + .6rem;
padding-bottom: .08rem;
2017-08-23 17:23:54 +08:00
}
}
}
@media (min-width: 768px) and (max-width: 992px) {
.m-card {
.ui-logo {
width: .8rem;
height: .8rem;
line-height: .8rem;
font-size: .4rem;
2017-08-24 18:06:38 +08:00
transform: translate(-50%, 0.16rem);
}
.ant-card-body {
padding-top: .16rem + .16rem + .8rem;
padding-bottom: .16rem;
2017-08-22 17:26:53 +08:00
}
}
}