Skip to content

Commit

Permalink
MDL-76457 tool_usertours: Fix tour popovers in RTL
Browse files Browse the repository at this point in the history
  • Loading branch information
roland04 committed Nov 14, 2023
1 parent 991926e commit e0f753b
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
20 changes: 20 additions & 0 deletions theme/boost/scss/moodle/tool_usertours.scss
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,26 @@ span[data-flexitour="container"] {
}
}
}

// RTL specific styles.
.dir-rtl & {
&[x-placement^="right"] {
margin-left: $popover-arrow-width;
div[data-role="arrow"] {
transform: rotate(180deg);
left: -$popover-arrow-width;
right: auto;
}
}
&[x-placement^="left"] {
margin-right: $popover-arrow-width;
div[data-role="arrow"] {
transform: rotate(180deg);
left: auto;
right: -$popover-arrow-width;
}
}
}
}

// Hack the bone! Hack the bone!
Expand Down
16 changes: 16 additions & 0 deletions theme/boost/style/moodle.css
Original file line number Diff line number Diff line change
Expand Up @@ -35984,6 +35984,22 @@ span[data-flexitour=container][x-placement=right] div[data-role=arrow]:after, sp
border-left-width: 0;
border-right-color: #fff;
}
.dir-rtl span[data-flexitour=container][x-placement^=right] {
margin-left: 1rem;
}
.dir-rtl span[data-flexitour=container][x-placement^=right] div[data-role=arrow] {
transform: rotate(180deg);
left: -1rem;
right: auto;
}
.dir-rtl span[data-flexitour=container][x-placement^=left] {
margin-right: 1rem;
}
.dir-rtl span[data-flexitour=container][x-placement^=left] div[data-role=arrow] {
transform: rotate(180deg);
left: auto;
right: -1rem;
}

[data-region=drawer] [data-flexitour=container] {
/*rtl:ignore*/
Expand Down
16 changes: 16 additions & 0 deletions theme/classic/style/moodle.css
Original file line number Diff line number Diff line change
Expand Up @@ -35918,6 +35918,22 @@ span[data-flexitour=container][x-placement=right] div[data-role=arrow]:after, sp
border-left-width: 0;
border-right-color: #fff;
}
.dir-rtl span[data-flexitour=container][x-placement^=right] {
margin-left: 1rem;
}
.dir-rtl span[data-flexitour=container][x-placement^=right] div[data-role=arrow] {
transform: rotate(180deg);
left: -1rem;
right: auto;
}
.dir-rtl span[data-flexitour=container][x-placement^=left] {
margin-right: 1rem;
}
.dir-rtl span[data-flexitour=container][x-placement^=left] div[data-role=arrow] {
transform: rotate(180deg);
left: auto;
right: -1rem;
}

[data-region=drawer] [data-flexitour=container] {
/*rtl:ignore*/
Expand Down

0 comments on commit e0f753b

Please sign in to comment.