Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/permission-element/unbounded-width-with-border-reftest.tentative.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset=utf-8>
<link rel="match" href="unbounded-width-with-border-reftest-ref.html">
<body>
<div>
The permission element width is allowed to be unbounded if there is a border which makes the
bounds of the permission element sufficiently clear.
The border should have enough width, enough contrast with the background-color and no transparency.
</div>
<style>
/* This element passes all checks and therefore its width is not limited */
#unlimited-width {
font-size: 10px;
background-color: white;
border: solid 1px black;
width: 500px;
}
/* This element's border width is too small */
#no-border-width {
font-size: 10px;
background-color: white;
border: 0px;
width: 500px;
}
/* This element's border color is not sufficiently different from the background-color */
#no-contrast {
font-size: 10px;
background-color: white;
border: solid 1px yellow;
width: 500px;
}
/* This element's border color has some transparency (alpha < 1) */
#transparent {
font-size: 10px;
background-color: white;
border: solid 1px #000000ee;
width: 500px;
}
/* This element's border is good except the top part which has insuficient contrast */
#top-no-contrast {
font-size: 10px;
background-color: white;
border: solid 1px black;
border-top-color: white;
width: 500px;
}
</style>
<div><permission id="unlimited-width" type="geolocation"></div>
<div><permission id="no-border-width" type="camera"></div>
<div><permission id="no-contrast" type="microphone"></div>
<div><permission id="transparent" type="microphone camera"></div>
<div><permission id="top-no-contrast" type="geolocation"></div>
</body>