Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/htmlburger/carbon-fi…
Browse files Browse the repository at this point in the history
…elds into development

* 'development' of https://github.com/htmlburger/carbon-fields:
  Fix truncated text in association options
  • Loading branch information
jorostoyanov committed Mar 29, 2019
2 parents 85f387d + def15dd commit db2bf97
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
4 changes: 3 additions & 1 deletion packages/core/fields/association/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,9 @@ class AssociationField extends Component {

<div className="cf-association__option-content">
<span className="cf-association__option-title">
{ option.title }
<span className="cf-association__option-title-inner">
{ option.title }
</span>
</span>

<span className="cf-association__option-type">
Expand Down
22 changes: 16 additions & 6 deletions packages/core/fields/association/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,29 @@
}

.cf-association__option-title {
overflow: hidden;
font-size: $wp-font-size;
line-height: $wp-line-height;
color: $wp-color-base-gray;
white-space: nowrap;
text-overflow: ellipsis;
flex: 1;
position: relative;
margin-right: $size-base;

.cf-association__option--selected & {
color: $wp-color-dark-silver-gray;
}
}

.cf-association__option-title-inner {
position: absolute;
top: 0;
left: 0;
width: 100%;
font-size: $wp-font-size;
line-height: $wp-line-height;
color: $wp-color-base-gray;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
transform: translateY(-50%);
}

.cf-association__option-type {
font-size: 9px;
line-height: 1;
Expand Down

0 comments on commit db2bf97

Please sign in to comment.