Skip to content

Commit

Permalink
Merge branch 'MDL-72626-master' of https://github.com/sarjona/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Jan 26, 2022
2 parents 19dbb28 + 320f6fb commit 3916f80
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
26 changes: 14 additions & 12 deletions lib/rtlcss/RTLCSS.php
Expand Up @@ -270,17 +270,19 @@ protected function processRule($rule) {
$groups = [$value];
}
foreach ($groups as $group) {
$values = $group->getListComponents();
switch (count($values)) {
case 2:
$group->setListComponents(array_reverse($values));
break;
case 3:
$group->setListComponents([$values[1], $values[0], $values[1], $values[2]]);
break;
case 4:
$group->setListComponents([$values[1], $values[0], $values[3], $values[2]]);
break;
if ($group instanceof RuleValueList) {
$values = $group->getListComponents();
switch (count($values)) {
case 2:
$group->setListComponents(array_reverse($values));
break;
case 3:
$group->setListComponents([$values[1], $values[0], $values[1], $values[2]]);
break;
case 4:
$group->setListComponents([$values[1], $values[0], $values[3], $values[2]]);
break;
}
}
}
}
Expand Down Expand Up @@ -354,7 +356,7 @@ protected function processTransformOrigin(Rule $rule) {

$value = $parts[0];
// The first value may be referencing top or bottom (y instead of x).
if (!is_object($value) && preg_match('/top|bottom/i', $value)) {
if (!is_object($value) && preg_match('/top|bottom/i', $value) && count($parts)>1) {
$value = $parts[1];
}

Expand Down
2 changes: 0 additions & 2 deletions lib/rtlcss/moodle_readme.txt
@@ -1,8 +1,6 @@
RTLCSS
------

Import git ref: v1.0.0

Downloaded from: https://github.com/moodlehq/rtlcss-php

Import procedure:
Expand Down
2 changes: 1 addition & 1 deletion lib/thirdpartylibs.xml
Expand Up @@ -216,7 +216,7 @@
<location>rtlcss</location>
<name>RTLCSS for PHP</name>
<license>MIT</license>
<version>1.0.0</version>
<version>1.0.1</version>
</library>
<library>
<location>scssphp</location>
Expand Down

0 comments on commit 3916f80

Please sign in to comment.