Files
doodle-mini/miniprogram/components3.0/worksheet-card/worksheet-card.less
T
2026-05-06 17:28:51 +08:00

145 lines
2.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@import '../../style/theme.less';
@import '../../style/tags.less';
.worksheet-card {
background: #fff;
border-radius: 24rpx;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.08);
overflow: hidden;
transition: transform 0.15s ease;
}
.worksheet-card--active {
transform: scale(0.96);
}
.worksheet-card__preview {
position: relative;
height: 160rpx;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.worksheet-card__img {
width: 100%;
height: 100%;
}
.worksheet-card__preview-text {
font-size: 48rpx;
line-height: 1.2;
text-align: center;
padding: 0 24rpx;
color: rgba(0, 0, 0, 0.65);
}
.worksheet-card__title {
padding: 20rpx 24rpx 12rpx;
font-size: 24rpx;
font-weight: 600;
color: rgba(0, 0, 0, 0.88);
line-height: 1.4;
}
.worksheet-card__tags {
display: flex;
flex-wrap: wrap;
gap: 12rpx;
padding: 0 24rpx 24rpx;
}
.worksheet-card__tag {
font-size: 20rpx;
line-height: 1.4;
padding: 6rpx 16rpx;
border-radius: 8rpx;
}
.worksheet-card__tag--age {
background: #e3f2fd;
color: #1976d2;
}
.worksheet-card__tag--diff {
background: #fff8e1;
color: #f57f17;
}
/* ── variant: track(对齐首页 home-track-card ── */
.worksheet-card--track {
box-shadow: 0 6rpx 20rpx rgba(50, 46, 37, 0.06);
}
.worksheet-card--track.worksheet-card--active {
transform: scale(0.98);
}
.worksheet-card__top {
height: 270rpx;
flex-shrink: 0;
position: relative;
overflow: hidden;
display: flex;
align-items: flex-start;
justify-content: center;
border-bottom: 1rpx solid rgba(50, 46, 37, 0.08);
background: #f5edd8;
}
.worksheet-card__cover {
width: 100%;
display: block;
}
.worksheet-card__icon {
font-size: 72rpx;
line-height: 1;
}
.worksheet-card__tags-track {
position: absolute;
right: 12rpx;
bottom: 12rpx;
display: flex;
gap: 10rpx;
}
.worksheet-card__body {
box-sizing: border-box;
width: 100%;
padding: 20rpx @page-padding-inner-x 22rpx;
background: #ffffff;
white-space: normal;
}
.worksheet-card__title-track {
box-sizing: border-box;
width: 100%;
font-size: 28rpx;
font-weight: 600;
color: @text-title;
line-height: 1.35;
display: -webkit-box;
-webkit-box-orient: vertical;
line-clamp: 2;
-webkit-line-clamp: 2;
overflow: hidden;
word-break: break-word;
}
.worksheet-card__sub {
box-sizing: border-box;
width: 100%;
margin-top: 8rpx;
font-size: 20rpx;
color: @text-gray;
line-height: 1.45;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
line-clamp: 2;
overflow: hidden;
word-break: break-word;
}