mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
style: Fix @import serialization.
This commit is contained in:
parent
b9901fbd89
commit
8356c3386a
3 changed files with 23 additions and 1 deletions
|
@ -392,7 +392,7 @@ impl ToCss for ImportRule {
|
|||
try!(dest.write_str(" "));
|
||||
try!(media.to_css(dest));
|
||||
}
|
||||
Ok(())
|
||||
dest.write_str(";")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6638,6 +6638,12 @@
|
|||
"url": "/_mozilla/css/float_relative_to_position.html"
|
||||
}
|
||||
],
|
||||
"css/import_serialization.html": [
|
||||
{
|
||||
"path": "css/import_serialization.html",
|
||||
"url": "/_mozilla/css/import_serialization.html"
|
||||
}
|
||||
],
|
||||
"css/matchMedia.html": [
|
||||
{
|
||||
"path": "css/matchMedia.html",
|
||||
|
|
16
tests/wpt/mozilla/tests/css/import_serialization.html
Normal file
16
tests/wpt/mozilla/tests/css/import_serialization.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Test: @import rules are correctly serialized</title>
|
||||
<style id="test">
|
||||
@import url("foo.css");
|
||||
@import url("foo.css") print;
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
test(function() {
|
||||
var rules = document.styleSheets[0].cssRules;
|
||||
assert_equals(rules[0].cssText, "@import url(\"foo.css\");");
|
||||
assert_equals(rules[1].cssText, "@import url(\"foo.css\") print;");
|
||||
})
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue