<!DOCTYPE html><title>CSS Test: mask-image: url(#local-mask)</title><linkrel="author"title="Xidorn Quan"href="https://www.upsuper.org"><linkrel="author"title="Mozilla"href="https://www.mozilla.org"><linkrel="help"href="https://drafts.fxtf.org/css-masking-1/#mask-layer-image"><linkrel="match"href="reference/mask-image-ref.html"><metaname="assert"content="mask-image can use local reference to a <mask> element"><style>#back{position:absolute;box-sizing:border-box;width:200px;height:200px;border:60pxsolidgreen;background:red;}#front{position:absolute;box-sizing:border-box;width:200px;height:200px;border:40pxsolidred;background:green;mask-image:url(#localmask);}</style><p>The test passes if there is a green square and no red below.</p><divid="back"></div><divid="front"></div><svgviewBox="0 0 200 200"style="width: 0; height: 0"><maskid="localmask"><rectx="50"y="50"width="100"height="100"fill="white"></mask></svg>