Skip to content

Commit

Permalink
Merge pull request #3718 from alfonso-salces/MOBILE-4372
Browse files Browse the repository at this point in the history
MOBILE-4372 course-format: Change course index fab position if lang is rtl
  • Loading branch information
crazyserver authored Aug 24, 2023
2 parents 47af5a2 + 33bece4 commit c9bf366
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import { CoreCourseCourseIndexTourComponent } from '../course-index-tour/course-
import { CoreDom } from '@singletons/dom';
import { CoreUserTourDirectiveOptions } from '@directives/user-tour';
import { CoreAnalytics, CoreAnalyticsEventType } from '@services/analytics';
import { CorePlatform } from '@services/platform';

/**
* Component to display course contents using a certain format. If the format isn't found, use default one.
Expand Down Expand Up @@ -93,7 +94,7 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy {
id: 'course-index',
component: CoreCourseCourseIndexTourComponent,
side: CoreUserToursSide.Top,
alignment: CoreUserToursAlignment.End,
alignment: CorePlatform.isRTL ? CoreUserToursAlignment.Start : CoreUserToursAlignment.End,
getFocusedElement: nativeButton => {
const innerButton = Array.from(nativeButton.shadowRoot?.children ?? []).find(child => child.tagName === 'BUTTON');

Expand Down
10 changes: 8 additions & 2 deletions src/theme/theme.base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -699,8 +699,6 @@ body.core-iframe-fullscreen ion-router-outlet {
--ion-safe-area-right: 0px;

.modal-wrapper {
@include margin-horizontal(var(--modal-lateral-margin), null);

position: absolute;
@include position(0 !important, 0 !important, 0 !important, unset !important);
display: block;
Expand All @@ -719,6 +717,14 @@ body.core-iframe-fullscreen ion-router-outlet {
}
}

html:not([dir="rtl"]) {
.core-modal-lateral {
.modal-wrapper {
@include margin-horizontal(var(--modal-lateral-margin), null);
}
}
}

.core-modal-transparent-no-filter {
@extend .core-modal-transparent;
ion-backdrop {
Expand Down

0 comments on commit c9bf366

Please sign in to comment.