Skip to content

Commit

Permalink
Fix Card Meta title text overflow, close ant-design#8597
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Dec 16, 2017
1 parent 404677a commit 3af6464
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
6 changes: 2 additions & 4 deletions components/card/Meta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ export default (props: CardMetaProps) => {
</div> : null;
return (
<div {...others} className={classString}>
<div className={`${prefixCls}-meta-content`}>
{avatarDom}
{MetaDetail}
</div>
{avatarDom}
{MetaDetail}
</div>
);
};
15 changes: 4 additions & 11 deletions components/card/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -188,30 +188,23 @@

&-meta {
margin: -4px 0;

&-content {
display: table-row;
}
.clearfix;

&-avatar {
padding-right: 16px;
display: table-cell;
float: left;
}

&-detail {
display: table-cell;
vertical-align: top;
position: relative;

& > div:not(:last-child) {
overflow: hidden;
> div:not(:last-child) {
margin-bottom: 8px;
}
}

&-title {
font-size: @font-size-lg;
text-overflow: ellipsis;
width: 100%;
overflow: hidden;
white-space: nowrap;
color: @card-head-color;
Expand Down

0 comments on commit 3af6464

Please sign in to comment.