1
Fork 0
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:
Sam Atkins 2021-07-22 17:51:07 +01:00 committed by Andreas Kling
parent 8b2e76b838
commit 7439fbd896
9 changed files with 82 additions and 38 deletions

View file

@ -0,0 +1 @@
p.first { background-color: lime; }

View file

@ -0,0 +1 @@
p.second { background-color: lime; }

View file

@ -0,0 +1 @@
p.third { background-color: lime; }

View 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>

View file

@ -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>