blob: d050f7e810da40fd10c7243c38b0e64f02a2d581 [file] [log] [blame]
<!DOCTYPE html>
<meta charset=UTF-8>
<title>CSS Filter: Establishing containing block for absolutely-positioned elements, on an inline element</title>
<link rel="author" title="L. David Baron" href="https://dbaron.org/">
<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/">
<link rel="match" href="filter-cb-abspos-inline-003-ref.html">
<link rel="help" href="https://drafts.fxtf.org/filter-effects-1/#FilterProperty">
<link rel="help" href="https://drafts.fxtf.org/filter-effects-1/#supported-filter-functions">
<meta name="flags" content="dom">
<meta name="assert" content="A value other than none for the filter property results in the creation of a containing block for absolute and fixed positioned descendants unless the element it applies to is a document root element in the current browsing context.">
<meta name="assert" content="A value of 100% leaves the input unchanged.">
<style>
#cb {
perspective: 100px;
}
#abspos {
position: absolute;
top: 0;
right: 0;
width: 10px;
height: 10px;
background: blue;
}
</style>
<script>
window.addEventListener("load", function window_load(event) {
document.body.offsetTop; // flush layout
document.getElementById("cb").style.filter = "";
});
</script>
<div>
<span id="cb" style="filter: brightness(100%)">Blue box should be in top-right corner of screen.<span id="abspos"></span></span>
</div>