outline-008

computed values ouf outline-width

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

This browser

Assertion
outline-width values compute to absolute lengths

Source

 1 <!DOCTYPE html>
 2 <html lang="en"><head><meta charset="utf-8">
 3   <title>CSS-UI test: computed values ouf outline-width</title>
 4   <link href="http://florian.rivoal.net" rel="author" title="Florian Rivoal">
 5   <meta content="" name="flags">
 6   <meta content="outline-width values compute to absolute lengths" name="assert">
 7   <link href="reference/ref-filled-green-100px-square.htm" rel="match">
 8   <link href="https://drafts.csswg.org/css-ui-3/#outline-props" rel="help">
 9 <style>
10 body > div {
11   width: 100px;
12   height: 100px;
13   background: red;
14 
15   font-size: 10px;
16 
17   /* stacking  of outlines is undefined, so we cannot reliably to have an outline hide another outline.
18    We are using a border instead,
19    but still need to create an (invisible) outline to make sure that outline-width does not compute to 0. */
20   outline: solid 1em transparent;
21   border: solid 1em red;
22   margin-left: -10px;
23   margin-top: -10px;
24 
25 }
26 div > div {
27   width: 100px;
28   height: 100px;
29   background: green;
30 
31   font-size: 5px;
32   outline-width: inherit;
33   outline-style: solid;
34   outline-color: white;
35 }
36 </style>
37 
38   </head><body><p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
39   <div><div></div></div>
40 
41 </body></html>