mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
LibHTML: Start adding support for <link rel="stylesheet">
This patch adds basic support for external stylesheets. It currently only works with file:// URLs. We do a synchronous full relayout after loading a stylesheet, which is definitely on the aggressive side, but it gives us something to work on improving. :^)
This commit is contained in:
parent
c136fd3fe2
commit
71e8ddcd1c
8 changed files with 89 additions and 1 deletions
8
Base/home/anon/www/link.css
Normal file
8
Base/home/anon/www/link.css
Normal file
|
@ -0,0 +1,8 @@
|
|||
#foo {
|
||||
background-color: teal;
|
||||
color: white;
|
||||
padding-left: 20;
|
||||
padding-top: 20;
|
||||
padding-right: 20;
|
||||
padding-bottom: 20;
|
||||
}
|
9
Base/home/anon/www/link.html
Normal file
9
Base/home/anon/www/link.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Link element test</title>
|
||||
<link rel="stylesheet" href="link.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="foo">I should be styled!</div>
|
||||
</body>
|
||||
</html>
|
|
@ -22,6 +22,7 @@ h1 {
|
|||
<li><a href="phint.html">presentational hints</a></li>
|
||||
<li><a href="images.html">images</a></li>
|
||||
<li><a href="selectors.html">selectors</a></li>
|
||||
<li><a href="link.html">link element</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue