ant-design-vue/components/card/style/index.less

271 lines
5.3 KiB
Plaintext
Raw Normal View History

2019-01-02 13:01:56 +00:00
@import '../../style/themes/default';
@import '../../style/mixins/index';
2018-01-16 03:13:22 +00:00
2019-01-02 13:01:56 +00:00
@card-prefix-cls: ~'@{ant-prefix}-card';
2018-01-16 03:13:22 +00:00
@card-head-height: 48px;
2019-03-05 05:16:32 +00:00
@card-hover-border: fade(@black, 9%);
@gradient-min: fade(@card-background, 20%);
@gradient-max: fade(@card-background, 40%);
2018-01-16 03:13:22 +00:00
.@{card-prefix-cls} {
.reset-component;
2019-03-05 05:16:32 +00:00
position: relative;
2018-01-16 03:13:22 +00:00
background: @component-background;
2018-09-16 13:36:22 +00:00
border-radius: @card-radius;
2019-01-02 13:01:56 +00:00
transition: all 0.3s;
2018-01-16 03:13:22 +00:00
&-hoverable {
cursor: pointer;
&:hover {
2018-04-06 12:56:19 +00:00
border-color: @card-hover-border;
2019-03-05 05:16:32 +00:00
box-shadow: @card-shadow;
2018-01-16 03:13:22 +00:00
}
}
&-bordered {
border: @border-width-base @border-style-base @border-color-split;
}
&-head {
2019-03-05 05:16:32 +00:00
min-height: @card-head-height;
margin-bottom: -1px; // Fix card grid overflow bug: https://gw.alipayobjects.com/zos/rmsportal/XonYxBikwpgbqIQBeuhk.png
padding: 0 @card-padding-base;
color: @card-head-color;
font-weight: 500;
font-size: @font-size-lg;
2018-01-16 03:13:22 +00:00
background: @card-head-background;
border-bottom: @border-width-base @border-style-base @border-color-split;
2018-09-16 13:36:22 +00:00
border-radius: @card-radius @card-radius 0 0;
2018-01-16 03:13:22 +00:00
.clearfix;
&-wrapper {
display: flex;
2018-11-14 13:33:56 +00:00
align-items: center;
2018-01-16 03:13:22 +00:00
}
&-title {
2019-03-05 05:16:32 +00:00
display: inline-block;
flex: 1;
2018-01-16 03:13:22 +00:00
padding: @card-head-padding 0;
overflow: hidden;
white-space: nowrap;
2019-03-05 05:16:32 +00:00
text-overflow: ellipsis;
2018-01-16 03:13:22 +00:00
}
.@{ant-prefix}-tabs {
clear: both;
2019-03-05 05:16:32 +00:00
margin-bottom: -17px;
2018-11-14 13:33:56 +00:00
color: @text-color;
font-weight: normal;
2019-03-05 05:16:32 +00:00
font-size: @font-size-base;
2018-01-16 03:13:22 +00:00
&-bar {
border-bottom: @border-width-base @border-style-base @border-color-split;
}
}
}
&-extra {
float: right;
2019-03-05 05:16:32 +00:00
// https://stackoverflow.com/a/22429853/3040605
margin-left: auto;
2019-01-02 13:01:56 +00:00
padding: @card-head-padding 0;
2018-11-14 13:33:56 +00:00
color: @text-color;
font-weight: normal;
2019-03-05 05:16:32 +00:00
font-size: @font-size-base;
2018-01-16 03:13:22 +00:00
}
&-body {
padding: @card-padding-base;
.clearfix;
}
2018-11-14 13:33:56 +00:00
&-contain-grid:not(&-loading) &-body {
2018-01-16 03:13:22 +00:00
margin: -1px 0 0 -1px;
padding: 0;
}
&-grid {
2019-03-05 05:16:32 +00:00
float: left;
width: 33.33%;
padding: @card-padding-base;
2018-01-16 03:13:22 +00:00
border: 0;
2019-03-05 05:16:32 +00:00
border-radius: 0;
2019-01-02 13:01:56 +00:00
box-shadow: 1px 0 0 0 @border-color-split, 0 1px 0 0 @border-color-split,
1px 1px 0 0 @border-color-split, 1px 0 0 0 @border-color-split inset,
0 1px 0 0 @border-color-split inset;
transition: all 0.3s;
2018-01-16 03:13:22 +00:00
&:hover {
position: relative;
z-index: 1;
box-shadow: @box-shadow-base;
}
}
2018-11-14 13:33:56 +00:00
&-contain-tabs > &-head &-head-title {
2018-01-16 03:13:22 +00:00
min-height: @card-head-height - @card-head-padding;
2019-03-05 05:16:32 +00:00
padding-bottom: 0;
2018-01-16 03:13:22 +00:00
}
&-contain-tabs &-extra {
padding-bottom: 0;
}
2018-09-16 13:36:22 +00:00
&-cover {
> * {
display: block;
2019-03-05 05:16:32 +00:00
width: 100%;
2018-09-16 13:36:22 +00:00
}
img {
border-radius: @card-radius @card-radius 0 0;
}
2018-01-16 03:13:22 +00:00
}
&-actions {
margin: 0;
padding: 0;
2019-03-05 05:16:32 +00:00
list-style: none;
background: @card-actions-background;
border-top: @border-width-base @border-style-base @border-color-split;
.clearfix;
2018-01-16 03:13:22 +00:00
& > li {
float: left;
margin: 12px 0;
color: @text-color-secondary;
2019-03-05 05:16:32 +00:00
text-align: center;
2018-01-16 03:13:22 +00:00
& > span {
2019-03-05 05:16:32 +00:00
position: relative;
2018-01-16 03:13:22 +00:00
display: inline-block;
2019-03-05 05:16:32 +00:00
min-width: 32px;
2018-01-16 03:13:22 +00:00
font-size: 14px;
line-height: 22px;
2019-03-05 05:16:32 +00:00
cursor: pointer;
2018-01-16 03:13:22 +00:00
&:hover {
color: @primary-color;
2019-01-02 13:01:56 +00:00
transition: color 0.3s;
2018-01-16 03:13:22 +00:00
}
& > .anticon {
font-size: 16px;
2018-04-06 12:56:19 +00:00
line-height: 22px;
2018-01-16 03:13:22 +00:00
}
a {
2018-04-06 12:56:19 +00:00
display: inline-block;
width: 100%;
2019-03-05 05:16:32 +00:00
color: @text-color-secondary;
line-height: 22px;
2018-01-16 03:13:22 +00:00
&:hover {
color: @primary-color;
}
}
}
&:not(:last-child) {
border-right: @border-width-base @border-style-base @border-color-split;
}
}
}
&-wider-padding &-head {
padding: 0 @card-padding-wider;
}
&-wider-padding &-body {
padding: @card-padding-base @card-padding-wider;
}
&-padding-transition &-head,
&-padding-transition &-body {
2019-01-02 13:01:56 +00:00
transition: padding 0.3s;
2018-01-16 03:13:22 +00:00
}
&-type-inner &-head {
padding: 0 @card-padding-base;
background: @background-color-light;
&-title {
padding: @card-inner-head-padding 0;
font-size: @font-size-base;
}
}
&-type-inner &-body {
padding: 16px @card-padding-base;
}
&-type-inner &-extra {
padding: @card-inner-head-padding + 1.5px 0;
}
&-meta {
margin: -4px 0;
.clearfix;
&-avatar {
float: left;
2019-03-05 05:16:32 +00:00
padding-right: 16px;
2018-01-16 03:13:22 +00:00
}
&-detail {
overflow: hidden;
> div:not(:last-child) {
margin-bottom: 8px;
}
}
&-title {
overflow: hidden;
color: @card-head-color;
font-weight: 500;
2019-03-05 05:16:32 +00:00
font-size: @font-size-lg;
white-space: nowrap;
text-overflow: ellipsis;
2018-01-16 03:13:22 +00:00
}
&-description {
color: @text-color-secondary;
}
}
2019-01-02 13:01:56 +00:00
&-loading {
overflow: hidden;
}
2018-01-16 03:13:22 +00:00
&-loading &-body {
user-select: none;
}
&-loading-content {
p {
margin: 0;
}
}
&-loading-block {
height: 14px;
update to antd3.8.3 (#159) * refactor: align * feat: update align to 2.4.3 * feat: update trigger 2.5.4 * feat: update tooltip 3.7.2 * fix: align * feat: update vc-calendar to 9.6.2 * feat: update vc-checkbox to 2.1.5 * feat: update vc-dialog to 7.1.8 * feat: update vc-from to 2.2.1 * feat: update vc-notification to 3.1.1 * test: update snapshots * feat: update vc-tree to 1.12.6 * feat: update vc-table to 6.2.8 * feat: update vc-upload to 2.5.1 * feat: update vc-input-number to 4.0.12 * feat: update vc-tabs to 9.2.6 * refactor: vc-menu * refactor: update vc-menu to 7.0.5 * style: remove unused * feat: update pagination to 1.16.5 * feat: add vc-progress 2.2.5 tag * feat: add vc-rate 2.4.0 tag * feat: update vc-slider to 8.6.1 * fix: tooltip error * style: delete conosle * feat: update vc-steps to 3.1.1 * add vc-switch tag 1.6.0 * feat: update upload to 2.5.1 * fix: update vc-menu * fix: update store * fix: add ref dir * fix: trigger mock shouldComponentUpdate * fix: update vc-select * revert: trigger lazyrenderbox * fix: update vc-select * fix: update vc-select * fix: update vc-select * fix: update vc-menu * fix: update vc-slick ref * update style to 3.8.2 * test: update snapshots * update vc-select * update util & affix * feat: add drawer * fix: support title add slot mode * test: update affix test * update alert * update anchor * update snapshots * fix: doc and vc-drawer * update select & auto-complete * update back-top & grid * feractor: avatar * test: add drawer test * update badge * update button * update card * update divider * feat: update vc-tabs to 9.3.6 and tabs * add afterEnter callback * update form * fix: update drawer * test: update snapshots * update modal & notification * test: update snapshots * update message * update locale-provider * update dropdown * update layout popconfirm popover * update time-picker * update menu * update date-picker * docs: update input docs * update input * update snapshots * update table * update test snapshots * feat: update progress * update checkbox * feat: update spin * update radio * docs: slider steps timeline * update list * update transfer * update collapse * update cascader * update upload
2018-09-05 13:28:54 +00:00
margin: 4px 0;
2019-03-05 05:16:32 +00:00
background: linear-gradient(90deg, @gradient-min, @gradient-max, @gradient-min);
background-size: 600% 600%;
2018-09-16 13:36:22 +00:00
border-radius: @card-radius;
2018-01-16 03:13:22 +00:00
animation: card-loading 1.4s ease infinite;
}
}
@keyframes card-loading {
0%,
100% {
2019-01-02 13:01:56 +00:00
background-position: 0 50%;
}
50% {
background-position: 100% 50%;
}
2018-01-16 03:13:22 +00:00
}
2019-03-05 05:16:32 +00:00
@import './size';