1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:37:34 +00:00

LibWeb: Implement the CSS outline-offset property

This allows you to push the outline a certain distance away from the
border (or inside it, if the offset is negative).
This commit is contained in:
Sam Atkins 2023-08-02 20:09:10 +01:00 committed by Andreas Kling
parent fe7e797483
commit 73fa58da34
8 changed files with 70 additions and 7 deletions

View file

@ -42,9 +42,14 @@
}
.outline3 {
outline: 2px solid green;
outline-offset: 5px;
border-radius: 10px;
border: 2px solid black;
}
.outline4 {
outline: 1px solid red;
outline-offset: -20px;
}
</style>
</head>
<body>
@ -57,7 +62,7 @@
</div>
<div style="background-color:red;width:3px">This text should only have a strip of red on the left</div>
<div class="box">
<span class="outline">This text has an outline</span> and <span class="outline2">this text has an outline with a border radius,</span> and <span class="outline3">this also has a border.</span>
<span class="outline">This text has an outline</span> and <span class="outline2">this text has an outline with a border radius,</span> and <span class="outline3">this also has a border.</span> <span class="outline4">This outline is a strikethrough.</span>
</div>
</body>
</html>