Skip to content

Commit

Permalink
Address review
Browse files Browse the repository at this point in the history
  • Loading branch information
jgerigmeyer committed May 2, 2024
1 parent 6f99086 commit 63e0fa5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
4 changes: 4 additions & 0 deletions css/demo.css
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ body {
}
}

a[target='_blank']::after {
content: ' ↗';
}

.button-group {
display: grid;
gap: var(--gap);
Expand Down
18 changes: 17 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,17 @@
<script type="module">
import { apply, isSupported } from './dist/popover-fn.js';

const note = document.getElementById('browser-support');

if (isSupported()) {
console.log('native `popover` support detected, no polyfill used');
note.innerText =
'This browser supports the Popover API natively, so the polyfill has not been applied.';
} else {
apply();
console.log('polyfill applied');
note.innerText =
'This browser does not support the Popover API natively, so the polyfill has been applied.';
}
</script>
<script src="https://unpkg.com/[email protected]/components/prism-core.min.js"></script>
Expand All @@ -55,7 +61,7 @@

<body>
<header class="site-header">
<a href="/" rel="home" id="banner-logo">
<a href="https://www.oddbird.net/" rel="home" id="banner-logo">
<svg
data-logo="oddbird"
xmlns="http://www.w3.org/2000/svg"
Expand Down Expand Up @@ -137,6 +143,16 @@ <h1 id="title">
</p>
</div>
</header>
<div>
<span id="browser-support"></span>
See which browsers have
<a
href="https://caniuse.com/?search=popover"
target="_blank"
rel="noopener noreferrer"
>native Popover API support</a
>.
</div>
<div id="popovers">
<div id="defaultPopover" data-popover popover>Default Popover</div>
<div id="manualPopover" data-popover="manual" popover="manual">
Expand Down

0 comments on commit 63e0fa5

Please sign in to comment.