From 89f0061e23934d73beb563cd4abbc77915e4e75b Mon Sep 17 00:00:00 2001 From: Bas Brands Date: Tue, 17 Apr 2018 15:13:31 +0200 Subject: [PATCH] MDL-56511 theme_boost: Work around CSS Parser restrictions The CSS Parser used in Moodle does not handle the use of complex calculations at this stage. The temporary workaround here uses a fixed position to ensure that the popover arrows affected are in the correct location. --- theme/boost/scss/moodle/undo.scss | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/theme/boost/scss/moodle/undo.scss b/theme/boost/scss/moodle/undo.scss index c9e80494c06..426f7d07105 100644 --- a/theme/boost/scss/moodle/undo.scss +++ b/theme/boost/scss/moodle/undo.scss @@ -147,3 +147,16 @@ ol { } } } +/* 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; + }