Skip to content

Commit

Permalink
Fix dismiss button overlapping with text in dismissable banners (mast…
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored Sep 15, 2023
1 parent e4f5114 commit 2a4fcc5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/javascript/mastodon/components/dismissable_banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ export const DismissableBanner: React.FC<PropsWithChildren<Props>> = ({

return (
<div className='dismissable-banner'>
<div className='dismissable-banner__message'>{children}</div>

<div className='dismissable-banner__action'>
<IconButton
icon='times'
title={intl.formatMessage(messages.dismiss)}
onClick={handleDismiss}
/>
</div>

<div className='dismissable-banner__message'>{children}</div>
</div>
);
};
4 changes: 1 addition & 3 deletions app/javascript/styles/mastodon/components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8941,9 +8941,7 @@ noscript {
}

&__action {
position: absolute;
inset-inline-end: 0;
top: 0;
float: right;
padding: 15px 10px;

.icon-button {
Expand Down
7 changes: 7 additions & 0 deletions app/javascript/styles/mastodon/rtl.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,11 @@ body.rtl {
.fa-chevron-right::before {
content: '\F053';
}

.dismissable-banner,
.warning-banner {
&__action {
float: left;
}
}
}

0 comments on commit 2a4fcc5

Please sign in to comment.