Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Code examples that accompany various MDN DOM and Web API documentation pages.

- The "document-picture-in-picture" directory contains an example showing usage of the [Document Picture-in-Picture API](http://developer.mozilla.org/docs/Web/API/Document_Picture-in-Picture_API/). [See the example live](https://mdn.github.io/dom-examples/document-picture-in-picture/).

- The "dynamic-range-limit" directory contains an example demonstrating use of the [`dynamic-range-limit`](https://developer.mozilla.org/en-US/docs/Web/CSS/dynamic-range-limit) CSS property. See the [example live](https://mdn.github.io/dom-examples/dynamic-range-limit).

- The "edit-context" directory contains examples demonstrating the [EditContext API](https://developer.mozilla.org/docs/Web/API/EditContext_API). See the [list of examples](https://github.com/mdn/dom-examples/tree/main/edit-context/).

- The "file-system-api" directory contains multiple examples demonstrating usage of the [File System API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API):
Expand Down
Binary file added dynamic-range-limit/gioia-pixel-ultrahdr.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions dynamic-range-limit/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>dynamic-range-limit property demo</title>

<link href="style.css" rel="stylesheet" />
</head>
<body>
<h1>dynamic-range-limit property demo</h1>
<img
src="gioia-pixel-ultrahdr.jpg"
alt="A subway station, with while strip lights lighting the platform and ad posters in the background"
tabindex="0"
/>
</body>
</html>
16 changes: 16 additions & 0 deletions dynamic-range-limit/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
body {
font: 1em / 1.4 sans-serif;
}

img {
width: 50%;
border: 1px solid black;
dynamic-range-limit: standard;
transition: dynamic-range-limit 0.6s;
}

img:hover,
img:focus {
dynamic-range-limit: no-limit;
/* dynamic-range-limit: dynamic-range-limit-mix(standard 70%, no-limit 30%); */
}