mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:37:34 +00:00
LibWeb: Implement the CSS outline
property :^)
...along with `outline-color`, `outline-style`, and `outline-width`. This re-uses the existing border-painting code, which seems to work well enough! This replaces the previous code for drawing focus-outlines, with generic outline painting for any elements that want it. Focus outlines are now instead supported by this code in Default.css: ```css :focus-visible { outline: auto; } ```
This commit is contained in:
parent
5640779838
commit
fe7e797483
15 changed files with 174 additions and 40 deletions
|
@ -32,6 +32,19 @@
|
|||
border-radius: 6px;
|
||||
box-shadow: 4px 4px 4px darkgreen;
|
||||
}
|
||||
|
||||
.outline {
|
||||
outline: 3px dotted magenta;
|
||||
}
|
||||
.outline2 {
|
||||
outline: 1px solid red;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.outline3 {
|
||||
outline: 2px solid green;
|
||||
border-radius: 10px;
|
||||
border: 2px solid black;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -43,5 +56,8 @@
|
|||
Hello world <span class="highlight">this is some text</span> in a box. <span class="bg-highlight">This text has a background</span> and <span class="br-highlight">this text has a shadow!</span>
|
||||
</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>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue