diff --git a/csstest.js b/csstest.js index b356202a..1e2a0f11 100644 --- a/csstest.js +++ b/csstest.js @@ -126,6 +126,17 @@ var Test = function (spec) { }), ); } + + contents.push( + $.create({ + tag: 'a', + properties: { + href: '#' + spec.id, + textContent: '#', + className: 'section-link', + }, + }), + ); } var h1 = $.create({ diff --git a/style.css b/style.css index 6b0d2e4a..d58b9496 100644 --- a/style.css +++ b/style.css @@ -107,6 +107,11 @@ h2 { display: flex; align-items: center; font-size: 180%; + position: relative; +} + +#content > section section section h1:hover > .section-link { + display: block; } #content > section section section section h1 { @@ -180,6 +185,14 @@ details summary > .spec-link::before { vertical-align: -4px; } +.section-link { + display: none; + position: absolute; + left: calc(-1 * 1.2em); + width: 1.2em; + text-align: center; +} + body > h1 { position: fixed; left: 0;