summaryrefslogtreecommitdiff
path: root/Base/res/html/misc
diff options
context:
space:
mode:
authorSimon Wanner <skyrising@pvpctutorials.de>2022-03-14 20:56:05 +0100
committerAndreas Kling <kling@serenityos.org>2022-03-14 22:22:53 +0100
commit1f9d76c7b8ffe4d1a672a3d9210042f93eae9f3d (patch)
treef7bf72352dfdb3cbca9a3169fab95151fb701b06 /Base/res/html/misc
parent1ed5e79478e00b301cca0fdde5de1bab05378aab (diff)
downloadserenity-1f9d76c7b8ffe4d1a672a3d9210042f93eae9f3d.zip
LibWeb: Invalidate styles after CSSImportRule loads
This replicates the behavior of StyleSheetList::add_sheet, making sure the rules added by the imported style sheet are applied.
Diffstat (limited to 'Base/res/html/misc')
-rw-r--r--Base/res/html/misc/css-import-relative/css-import-4a.css1
-rw-r--r--Base/res/html/misc/css-import-relative/css-import-4b.css1
-rw-r--r--Base/res/html/misc/css-import.html2
3 files changed, 4 insertions, 0 deletions
diff --git a/Base/res/html/misc/css-import-relative/css-import-4a.css b/Base/res/html/misc/css-import-relative/css-import-4a.css
new file mode 100644
index 0000000000..196e1fd39e
--- /dev/null
+++ b/Base/res/html/misc/css-import-relative/css-import-4a.css
@@ -0,0 +1 @@
+@import "css-import-4b.css";
diff --git a/Base/res/html/misc/css-import-relative/css-import-4b.css b/Base/res/html/misc/css-import-relative/css-import-4b.css
new file mode 100644
index 0000000000..f5421c02d4
--- /dev/null
+++ b/Base/res/html/misc/css-import-relative/css-import-4b.css
@@ -0,0 +1 @@
+p.fourth { background-color: lime; }
diff --git a/Base/res/html/misc/css-import.html b/Base/res/html/misc/css-import.html
index 96f506671f..ce3dfa18ca 100644
--- a/Base/res/html/misc/css-import.html
+++ b/Base/res/html/misc/css-import.html
@@ -5,6 +5,7 @@
@import "css-import-1.css";
@import url("css-import-2.css");
@import url(css-import-3.css);
+@import "css-import-relative/css-import-4a.css";
</style>
</head>
<body>
@@ -12,6 +13,7 @@
<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>
+ <p class="fourth">If this is green, relative <code>@import</code> resolves correctly!</p>
</div>
</body>
</html>