Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Fix styles for RTL languages and the light theme (mastodon#15356)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron authored Dec 18, 2020
1 parent 8a95867 commit 941ff04
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 2 deletions.
42 changes: 41 additions & 1 deletion app/javascript/styles/mastodon-light/diff.scss
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,45 @@ html {
.error-modal,
.onboarding-modal,
.report-modal__comment .setting-text__wrapper,
.report-modal__comment .setting-text {
.report-modal__comment .setting-text,
.announcements,
.picture-in-picture__header,
.picture-in-picture__footer,
.reactions-bar__item {
background: $white;
border: 1px solid lighten($ui-base-color, 8%);
}

.reactions-bar__item {
&:hover,
&:focus,
&:active {
background-color: $ui-base-color;
}
}

.reactions-bar__item.active {
background-color: mix($white, $ui-highlight-color, 80%);
border-color: mix(lighten($ui-base-color, 8%), $ui-highlight-color, 80%);
}

.media-modal__overlay .picture-in-picture__footer {
border: 0;
}

.picture-in-picture__header {
border-bottom: 0;
}

.announcements,
.picture-in-picture__footer {
border-top: 0;
}

.icon-with-badge__badge {
border-color: $white;
}

.report-modal__comment {
border-right-color: lighten($ui-base-color, 8%);
}
Expand Down Expand Up @@ -512,6 +546,12 @@ html {
}
}

.picture-in-picture-placeholder {
background: $white;
border-color: lighten($ui-base-color, 8%);
color: lighten($ui-base-color, 8%);
}

.brand__tagline {
color: $ui-secondary-color;
}
Expand Down
46 changes: 45 additions & 1 deletion app/javascript/styles/mastodon/rtl.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,38 @@ body.rtl {
margin-right: 15px;
}

.display-name {
.display-name,
.announcements__item {
text-align: right;
}

.announcements__item__range {
padding-right: 0;
padding-left: 18px;
}

.reactions-bar {
margin-left: auto;
margin-right: -2px;
direction: rtl;
}

.reactions-bar__item__count {
margin-left: 0;
margin-right: 6px;
}

.announcements__pagination {
right: auto;
left: 0;
}

.notification__message {
margin-left: 0;
margin-right: 68px;
}

.announcements__mastodon,
.drawer__inner__mastodon > img {
transform: scaleX(-1);
}
Expand Down Expand Up @@ -195,6 +218,7 @@ body.rtl {
margin-right: 0;
}

.picture-in-picture__header__account .display-name,
.detailed-status__display-name .display-name {
text-align: right;
}
Expand All @@ -205,6 +229,21 @@ body.rtl {
float: right;
}

.picture-in-picture__header__account .account__avatar {
margin-right: 0;
margin-left: 10px;
}

.icon-button__counter {
margin-left: 0;
margin-right: 4px;
}

.notifications-permission-banner__close {
right: auto;
left: 10px;
}

.detailed-status__favorites,
.detailed-status__reblogs {
margin-left: 0;
Expand Down Expand Up @@ -416,4 +455,9 @@ body.rtl {
left: auto;
right: 0;
}

.picture-in-picture {
right: auto;
left: 20px;
}
}

0 comments on commit 941ff04

Please sign in to comment.