mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'wip-MDL-33825-m23' of git://github.com/samhemelryk/moodle
This commit is contained in:
commit
c949723817
2 changed files with 15 additions and 1 deletions
|
@ -3845,7 +3845,11 @@ class css_style_background extends css_style {
|
||||||
} else if ($attachment === self::NULL_VALUE && in_array($bit, $attachments)) {
|
} else if ($attachment === self::NULL_VALUE && in_array($bit, $attachments)) {
|
||||||
$attachment = $bit;
|
$attachment = $bit;
|
||||||
} else if ($bit !== '') {
|
} else if ($bit !== '') {
|
||||||
$return[] = css_style_background_advanced::init($bit);
|
$advanced = css_style_background_advanced::init($bit);
|
||||||
|
if ($important) {
|
||||||
|
$advanced->set_important();
|
||||||
|
}
|
||||||
|
$return[] = $advanced;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -213,6 +213,16 @@ class css_optimiser_testcase extends advanced_testcase {
|
||||||
|
|
||||||
$css = '#filesskin .yui3-widget-hd{background:#CCC;background:-webkit-gradient(linear, left top, left bottom, from(#FFFFFF), to(#CCCCCC));background:-moz-linear-gradient(top, #FFFFFF, #CCCCCC);}';
|
$css = '#filesskin .yui3-widget-hd{background:#CCC;background:-webkit-gradient(linear, left top, left bottom, from(#FFFFFF), to(#CCCCCC));background:-moz-linear-gradient(top, #FFFFFF, #CCCCCC);}';
|
||||||
$this->assertEquals($css, $optimiser->process($css));
|
$this->assertEquals($css, $optimiser->process($css));
|
||||||
|
|
||||||
|
$css = '.userenrolment{background:-moz-linear-gradient(top, #FFFFFF, #CCCCCC) !important;}';
|
||||||
|
$this->assertEquals($css, $optimiser->process($css));
|
||||||
|
|
||||||
|
$css = '.userenrolment{background:#CCC !important;background:-webkit-gradient(linear, left top, left bottom, from(#FFFFFF), to(#CCCCCC)) !important;background:-moz-linear-gradient(top, #FFFFFF, #CCCCCC) !important;}';
|
||||||
|
$this->assertEquals($css, $optimiser->process($css));
|
||||||
|
|
||||||
|
$cssin = '.userenrolment{background:-moz-linear-gradient(top, #FFFFFF, #CCCCCC) !important;}.userenrolment {background: #CCCCCC!important;background: -webkit-gradient(linear, left top, left bottom, from(#FFFFFF), to(#CCCCCC))!important;}';
|
||||||
|
$cssout = '.userenrolment{background:#CCC !important;background:-moz-linear-gradient(top, #FFFFFF, #CCCCCC) !important;background:-webkit-gradient(linear, left top, left bottom, from(#FFFFFF), to(#CCCCCC)) !important;}';
|
||||||
|
$this->assertEquals($cssout, $optimiser->process($cssin));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue