Skip to content

Commit

Permalink
Improvements to image icon appearance on SHOW MORE
Browse files Browse the repository at this point in the history
  • Loading branch information
marrus-sh committed Jun 29, 2017
1 parent 99889ea commit cc4cba8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/javascript/mastodon/components/status_content.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export default class StatusContent extends React.PureComponent {
</Permalink>
)).reduce((aggregate, item) => [...aggregate, item, ' '], []);

const toggleText = hidden ? <FormattedMessage id='status.show_more' defaultMessage='Show more' /> : <FormattedMessage id='status.show_less' defaultMessage='Show less' />;
const toggleText = hidden ? [<FormattedMessage id='status.show_more' defaultMessage='Show more' key='0' />, mediaIcon ? <i className={`fa fa-fw fa-${mediaIcon} status__content__spoiler-icon`} aria-hidden='true' key='1' /> : null] : [<FormattedMessage id='status.show_less' defaultMessage='Show less' key='0' />];

if (hidden) {
mentionsPlaceholder = <div>{mentionLinks}</div>;
Expand All @@ -153,7 +153,7 @@ export default class StatusContent extends React.PureComponent {
<span dangerouslySetInnerHTML={spoilerContent} />
{' '}
<button tabIndex='0' className='status__content__spoiler-link' onClick={this.handleSpoilerClick}>
{toggleText} {mediaIcon ? <i className={`fa fa-fw fa-${mediaIcon}`} aria-hidden='true' /> : null}
{toggleText}
</button>
</p>

Expand Down
17 changes: 13 additions & 4 deletions app/javascript/styles/components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -495,10 +495,19 @@
cursor: pointer;
vertical-align: bottom;

&:hover {
background: lighten($ui-base-color, 33%);
text-decoration: none;
}
&:hover {
background: lighten($ui-base-color, 33%);
text-decoration: none;
}

.status__content__spoiler-icon {
display: inline-block;
margin: 0 0 0 5px;
border-left: 1px solid currentColor;
padding: 0 0 0 4px;
font-size: 16px;
vertical-align: -2px;
}
}

.status__prepend-icon-wrapper {
Expand Down

0 comments on commit cc4cba8

Please sign in to comment.