Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dlaliberte committed Nov 8, 2023
1 parent d8fbaa7 commit 2dc84b4
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 18 deletions.
17 changes: 14 additions & 3 deletions bikeshed/refs/refhints.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
:root {
--ref-hint-bg: #ddd;
--ref-hint-text: var(--text);
}
@media (prefers-color-scheme: dark) {
:root {
--ref-hint-bg: #222;
--ref-hint-text: var(--text);
}
}

.ref-hint {
display: none;
position: absolute;
Expand All @@ -7,10 +18,10 @@
height: auto;
max-height: 500px;
overflow: auto;
padding: 0.5em 0.75em;
padding: 0.5em 0.5em;
font: small Helvetica Neue, sans-serif, Droid Sans Fallback;
background: var(--dfnpanel-bg);
color: var(--dfnpanel-text);
background: var(--ref-hint-bg);
color: var(--ref-hint-text);
border: outset 0.2em;
white-space: normal; /* in case it's moved into a pre */
}
Expand Down
20 changes: 10 additions & 10 deletions bikeshed/refs/refhints.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,6 @@
refHint.classList.remove("on");
}

document.addEventListener("DOMContentLoaded", ()=>{
genAllRefHints();

document.body.addEventListener("click", (e) => {
// If not handled already, just hide all link panels.
hideAllRefHints();
});
})

function showRefHint(refHint) {
hideAllRefHints(); // Only display one at this time.

Expand Down Expand Up @@ -138,8 +129,17 @@
});
}

document.addEventListener("DOMContentLoaded", () => {
genAllRefHints();

document.body.addEventListener("click", (e) => {
// If not handled already, just hide all link panels.
hideAllRefHints();
});
});

window.addEventListener("resize", () => {
// Hide any open ref hint.
hideAllRefHints();
})
});
}
21 changes: 16 additions & 5 deletions tests/github/w3c/csswg-drafts/css-align-3/Overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<title>CSS Box Alignment Module Level 3</title>
<meta content="ED" name="w3c-status">
<link href="https://www.w3.org/StyleSheets/TR/2021/W3C-ED" rel="stylesheet">
<meta content="Bikeshed version f418d956e, updated Thu Oct 26 14:46:14 2023 -0700" name="generator">
<meta content="Bikeshed version d8fbaa7a2, updated Wed Nov 8 01:07:24 2023 +0000" name="generator">
<link href="https://www.w3.org/TR/css-align-3/" rel="canonical">
<link href="https://drafts.csswg.org/csslogo.ico" rel="icon">
<meta content="f418d956e3daf70cc405e8e1870948ee0e42be4b" name="document-revision">
<meta content="d8fbaa7a29d92a76ba41a299827449defdad0a71" name="document-revision">
<style>
.issue th:first-child { text-align: left !important; }
[rowspan] > img { float: right; }
Expand Down Expand Up @@ -728,6 +728,17 @@
}
</style>
<style>/* Boilerplate: style-ref-hints */
:root {
--ref-hint-bg: #ddd;
--ref-hint-text: var(--text);
}
@media (prefers-color-scheme: dark) {
:root {
--ref-hint-bg: #222;
--ref-hint-text: var(--text);
}
}

.ref-hint {
display: none;
position: absolute;
Expand All @@ -737,10 +748,10 @@
height: auto;
max-height: 500px;
overflow: auto;
padding: 0.5em 0.75em;
padding: 0.5em 0.5em;
font: small Helvetica Neue, sans-serif, Droid Sans Fallback;
background: var(--dfnpanel-bg);
color: var(--dfnpanel-text);
background: var(--ref-hint-bg);
color: var(--ref-hint-text);
border: outset 0.2em;
white-space: normal; /* in case it's moved into a pre */
}
Expand Down

0 comments on commit 2dc84b4

Please sign in to comment.