Skip to content

Commit

Permalink
Merge branch 'MDL-76457-402' of https://github.com/roland04/moodle in…
Browse files Browse the repository at this point in the history
…to MOODLE_402_STABLE
  • Loading branch information
HuongNV13 committed Nov 16, 2023
2 parents acd56e5 + e0f753b commit 5652247
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 77 deletions.
21 changes: 21 additions & 0 deletions theme/boost/scss/moodle/bootstrap-rtl.scss
Expand Up @@ -40,4 +40,25 @@
right: auto;
}
}

.popover {
&.bs-popover-right,
&.bs-popover-auto[x-placement^="right"] {
margin-right: 0;
margin-left: $popover-arrow-height;
.arrow {
transform: rotate(180deg);
left: subtract(-$popover-arrow-height, $popover-border-width);
}
}
&.bs-popover-left,
&.bs-popover-auto[x-placement^="left"] {
margin-right: $popover-arrow-height;
margin-left: 0;
.arrow {
transform: rotate(180deg);
right: subtract(-$popover-arrow-height, $popover-border-width);
}
}
}
}
20 changes: 20 additions & 0 deletions theme/boost/scss/moodle/tool_usertours.scss
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
23 changes: 0 additions & 23 deletions theme/boost/scss/moodle/undo.scss
Expand Up @@ -139,29 +139,6 @@ body:not(.jsenabled) .langmenu:hover > .dropdown-menu,
}
}
}
/* Force positioning of popover arrows.
*
* The Css prefixer used in Moodle does not support complex calc statements used
* in Bootstrap 4 CSS. For example:
* calc((0.5rem + 1px) * -1); is stripped out by lib/php-css-parser/Parser.php.
* See MDL-61879. For now the arrow positions of popovers are fixed until this is resolved.
*/
.bs-popover-right .arrow,
.bs-popover-auto[x-placement^="right"] .arrow {
left: -9px;
}
.bs-popover-left .arrow,
.bs-popover-auto[x-placement^="left"] .arrow {
right: -9px;
}
.bs-popover-top .arrow,
.bs-popover-auto[x-placement^="top"] .arrow {
bottom: -9px;
}
.bs-popover-bottom .arrow,
.bs-popover-auto[x-placement^="bottom"] .arrow {
top: -9px;
}

// Fixes an issue on Safari when the .custom-select is inside a .card class.
.custom-select {
Expand Down
59 changes: 32 additions & 27 deletions theme/boost/style/moodle.css
Expand Up @@ -22875,6 +22875,22 @@ a.text-dark:hover, a.text-dark:focus {
left: 0;
right: auto;
}
.dir-rtl .popover.bs-popover-right, .dir-rtl .popover.bs-popover-auto[x-placement^=right] {
margin-right: 0;
margin-left: 0.5rem;
}
.dir-rtl .popover.bs-popover-right .arrow, .dir-rtl .popover.bs-popover-auto[x-placement^=right] .arrow {
transform: rotate(180deg);
left: calc(-0.5rem - 1px);
}
.dir-rtl .popover.bs-popover-left, .dir-rtl .popover.bs-popover-auto[x-placement^=left] {
margin-right: 0.5rem;
margin-left: 0;
}
.dir-rtl .popover.bs-popover-left .arrow, .dir-rtl .popover.bs-popover-auto[x-placement^=left] .arrow {
transform: rotate(180deg);
right: calc(-0.5rem - 1px);
}

/**
* Moodle variables
Expand Down Expand Up @@ -35247,33 +35263,6 @@ body:not(.jsenabled) .langmenu:hover > .dropdown-menu,
z-index: inherit;
}

/* Force positioning of popover arrows.
*
* The Css prefixer used in Moodle does not support complex calc statements used
* in Bootstrap 4 CSS. For example:
* calc((0.5rem + 1px) * -1); is stripped out by lib/php-css-parser/Parser.php.
* See MDL-61879. For now the arrow positions of popovers are fixed until this is resolved.
*/
.bs-popover-right .arrow,
.bs-popover-auto[x-placement^=right] .arrow {
left: -9px;
}

.bs-popover-left .arrow,
.bs-popover-auto[x-placement^=left] .arrow {
right: -9px;
}

.bs-popover-top .arrow,
.bs-popover-auto[x-placement^=top] .arrow {
bottom: -9px;
}

.bs-popover-bottom .arrow,
.bs-popover-auto[x-placement^=bottom] .arrow {
top: -9px;
}

.custom-select {
word-wrap: normal;
}
Expand Down Expand Up @@ -36000,6 +35989,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
59 changes: 32 additions & 27 deletions theme/classic/style/moodle.css
Expand Up @@ -22875,6 +22875,22 @@ a.text-dark:hover, a.text-dark:focus {
left: 0;
right: auto;
}
.dir-rtl .popover.bs-popover-right, .dir-rtl .popover.bs-popover-auto[x-placement^=right] {
margin-right: 0;
margin-left: 0.5rem;
}
.dir-rtl .popover.bs-popover-right .arrow, .dir-rtl .popover.bs-popover-auto[x-placement^=right] .arrow {
transform: rotate(180deg);
left: calc(-0.5rem - 1px);
}
.dir-rtl .popover.bs-popover-left, .dir-rtl .popover.bs-popover-auto[x-placement^=left] {
margin-right: 0.5rem;
margin-left: 0;
}
.dir-rtl .popover.bs-popover-left .arrow, .dir-rtl .popover.bs-popover-auto[x-placement^=left] .arrow {
transform: rotate(180deg);
right: calc(-0.5rem - 1px);
}

/**
* Moodle variables
Expand Down Expand Up @@ -35247,33 +35263,6 @@ body:not(.jsenabled) .langmenu:hover > .dropdown-menu,
z-index: inherit;
}

/* Force positioning of popover arrows.
*
* The Css prefixer used in Moodle does not support complex calc statements used
* in Bootstrap 4 CSS. For example:
* calc((0.5rem + 1px) * -1); is stripped out by lib/php-css-parser/Parser.php.
* See MDL-61879. For now the arrow positions of popovers are fixed until this is resolved.
*/
.bs-popover-right .arrow,
.bs-popover-auto[x-placement^=right] .arrow {
left: -9px;
}

.bs-popover-left .arrow,
.bs-popover-auto[x-placement^=left] .arrow {
right: -9px;
}

.bs-popover-top .arrow,
.bs-popover-auto[x-placement^=top] .arrow {
bottom: -9px;
}

.bs-popover-bottom .arrow,
.bs-popover-auto[x-placement^=bottom] .arrow {
top: -9px;
}

.custom-select {
word-wrap: normal;
}
Expand Down Expand Up @@ -35934,6 +35923,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 5652247

Please sign in to comment.