From 2b725f527e922487935c1dfc3299adcb275615a1 Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Sun, 5 Apr 2020 20:28:07 -0700 Subject: [PATCH] Docs: Clean up. --- docs/page.css | 4 +--- docs/page.js | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/page.css b/docs/page.css index af3a265990935f..4b77bfad8523d7 100644 --- a/docs/page.css +++ b/docs/page.css @@ -197,7 +197,7 @@ strong { position: relative; } -/* TODO: Duplicate styles in main.css. Needed here because page is inside the iframe */ +/* Duplicates styles in main.css. Needed here because page is inside the iframe */ .import-wrap select { position: absolute; right: -22px; @@ -239,9 +239,7 @@ strong { @media (prefers-color-scheme: dark) { .import-wrap select { - background-color: #333333; - } } diff --git a/docs/page.js b/docs/page.js index 59fbc037514c9f..658aa9e9fb904d 100644 --- a/docs/page.js +++ b/docs/page.js @@ -149,11 +149,12 @@ function onDocumentLoad( event ) { importSelect.addEventListener( 'change', function () { - var importBlocks = document.querySelectorAll( '.import-wrap [data-import]'); + var importBlocks = document.querySelectorAll( '.import-wrap [data-import]' ); for ( var i = 0; i < importBlocks.length; i ++ ) { var block = importBlocks[ i ]; + block.style.display = block.getAttribute( 'data-import' ) === importSelect.value ? '' : 'none'; }