Status: FAIL | Duration: 11ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-text/text-indent/text-indent-percentage-004.html
<!DOCTYPE html> <html lang=en> <meta charset="utf-8"> <title>CSS Text Test: text-indent percentage resolution basis, in a calc expressiong</title> <link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/"> <link rel="help" href="https://drafts.csswg.org/css-text-3/#text-indent-property"> <link rel="match" href="reference/text-indent-percentage-002-ref.html"> <meta name="assert" content="Percentages in text-indent refer to width of the element's content box, when used in a calc expression"> <style> body { background: white; } section { position: absolute; } section, div { border-right: 10px solid white; margin-right: 10px; padding-right: 10px; } div { box-sizing: border-box; width: 120px; } span { display: inline-block; width: 10px; height: 10px; background: green; } .ref span { background: red; /* the next two lines are to avoid antialiasing artifacts causing a tiny about of red to be visible */ box-sizing: border-box; border: 1px solid white; } .test div { text-indent: calc(25px + 25%); } .ref div { text-indent: 50px; } </style> <p>Test passes if there is a green square below and no red. <section class=ref><div><span></span></div></section> <section class=test><div><span></span></div></section>
/css/css-text/text-indent/reference/text-indent-percentage-002-ref.html
<!DOCTYPE html> <html lang=en> <meta charset="utf-8"> <title>CSS Text Test reference</title> <link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/"> <style> body { background: white; } div { padding-left: 50px; } span { display: inline-block; width: 10px; height: 10px; background: green; } </style> <p>Test passes if there is a green square below and no red. <div><span></span></div>