mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 02:28:12 +00:00
LibWeb: Get CSS @import rules working in new parser
Also added css-import.html, which tests the 3 syntax variations on `@import` statements. Note that the optional media-query parameter to `@import` is not handled yet.
This commit is contained in:
parent
8b2e76b838
commit
7439fbd896
9 changed files with 82 additions and 38 deletions
1
Base/res/html/misc/css-import-1.css
Normal file
1
Base/res/html/misc/css-import-1.css
Normal file
|
@ -0,0 +1 @@
|
|||
p.first { background-color: lime; }
|
1
Base/res/html/misc/css-import-2.css
Normal file
1
Base/res/html/misc/css-import-2.css
Normal file
|
@ -0,0 +1 @@
|
|||
p.second { background-color: lime; }
|
1
Base/res/html/misc/css-import-3.css
Normal file
1
Base/res/html/misc/css-import-3.css
Normal file
|
@ -0,0 +1 @@
|
|||
p.third { background-color: lime; }
|
17
Base/res/html/misc/css-import.html
Normal file
17
Base/res/html/misc/css-import.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>@import test</title>
|
||||
<style>
|
||||
@import "css-import-1.css";
|
||||
@import url("css-import-2.css");
|
||||
@import url(css-import-3.css);
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<p class="first">If this is green, <code>@import "string";</code> works!</p>
|
||||
<p class="second">If this is green, <code>@import url("string");</code> works!</p>
|
||||
<p class="third">If this is green, <code>@import url(unquoted-string);</code> works!</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -62,6 +62,7 @@
|
|||
<li><a href="cookie.html">document.cookie</a></li>
|
||||
<li><a href="last-of-type.html">CSS :last-of-type selector</a></li>
|
||||
<li><a href="first-of-type.html">CSS :first-of-type selector</a></li>
|
||||
<li><a href="css-import.html">CSS @import</a></li>
|
||||
<li><a href="background-repeat-test.html">background image with repetition rules</a></li>
|
||||
<li><a href="link-over-zindex-block.html">link elements with background box placed with z-index</a></li>
|
||||
<li><a href="contenteditable.html">contenteditable</a></li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue