Skip to content

Commit c631566

Browse files
authored
[css-tv] Add obsoletion notice
1 parent 12a9f4b commit c631566

File tree

1 file changed

+61
-4
lines changed

1 file changed

+61
-4
lines changed

css-tv/Overview.html

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434
.del { text-decoration: line-through; }
3535
img.head { width:72px; height:48px }
3636
</style>
37-
<link href="https://www.w3.org/StyleSheets/TR/W3C-WG-NOTE.css"
38-
rel="stylesheet" type="text/css" /></head>
37+
<link href="https://www.w3.org/StyleSheets/TR/W3C-RNOTE" rel="stylesheet"></head>
3938

4039
<body>
4140
<div class="head"> <!--begin-logo-->
@@ -104,6 +103,7 @@ <h2 class="no-num no-toc">Abstract</h2>
104103
<p>This specification defines a subset of Cascading Style Sheets Level 2
105104
and CSS3 module: Color specifications tailored to the needs and
106105
constraints of TV devices.</p>
106+
<p class="mtb"><strong>This profile is obsolete. Please see the latest <a href="https://www.w3.org/TR/CSS/">CSS Snapshot</a> for the specifications that make up CSS.</strong></p>
107107
<!-- **************************** -->
108108
<!-- STATUS of DOCUMENT -->
109109
<!-- **************************** -->
@@ -2047,8 +2047,65 @@ <h2 class="no-num" id="section-references">Appendix A. Normative References</h2>
20472047
<!---->
20482048
</dl>
20492049
<!--end-normative-->
2050-
</body>
2051-
</html>
2050+
<script src="https://www.w3.org/scripts/TR/fixup.js"></script>
2051+
<script>
2052+
var ESCAPEKEY = 27;
2053+
/* Deprecation warning */
2054+
document.body.classList.add("outdated-spec");
2055+
var node = document.createElement("p");
2056+
node.classList.add("outdated-warning");
2057+
node.tabIndex = -1;
2058+
node.setAttribute("role", "dialog");
2059+
node.setAttribute("aria-modal", "true");
2060+
node.setAttribute("aria-labelledby", "outdatedWarning");
2061+
2062+
var frag = document.createDocumentFragment();
2063+
var heading = document.createElement("strong");
2064+
heading.id = "outdatedWarning";
2065+
heading.innerHTML = "Retired NOTE";
2066+
frag.appendChild(heading);
2067+
2068+
var warning = document.createElement("span");
2069+
warning.innerText = "The CSS Working Group has discontinued work on this document.";
2070+
frag.appendChild(warning);
2071+
2072+
var button = document.createElement("button");
2073+
var handler = makeClickHandler(node);
2074+
button.addEventListener("click", handler);
2075+
button.innerHTML = "&#9662; collapse";
2076+
frag.appendChild(button);
2077+
node.appendChild(frag);
2078+
2079+
function makeClickHandler(node) {
2080+
var isOpen = true;
2081+
return function collapseWarning(event) {
2082+
var button = event.target;
2083+
isOpen = !isOpen;
2084+
node.classList.toggle("outdated-collapsed");
2085+
document.body.classList.toggle("outdated-spec");
2086+
button.innerText = (isOpen) ? '\u25BE collapse' : '\u25B4 expand';
2087+
}
2088+
}
2089+
2090+
document.body.appendChild(node);
2091+
2092+
button.focus();
2093+
window.onkeydown = function (event) {
2094+
var isCollapsed = node.classList.contains("outdated-collapsed");
2095+
if (event.keyCode === ESCAPEKEY && !isCollapsed) {
2096+
button.click();
2097+
}
2098+
}
2099+
2100+
document.addEventListener("focus", function(event) {
2101+
var isCollapsed = node.classList.contains("outdated-collapsed");
2102+
var containsTarget = node.contains(event.target);
2103+
if (!isCollapsed && !containsTarget) {
2104+
event.stopPropagation();
2105+
node.focus();
2106+
}
2107+
}, true); // use capture to enable event delegation as focus doesn't bubble up
2108+
</script></body></html>
20522109
<!-- Keep this comment at the end of the file
20532110
Local variables:
20542111
mode: sgml

0 commit comments

Comments
 (0)