From 33904302994a985a0f80414c43a87d42585f7f47 Mon Sep 17 00:00:00 2001 From: Sebastian Benz Date: Tue, 7 Nov 2023 22:28:17 +0100 Subject: [PATCH] Make focus mode extension more generic Use a generic selector that will hide all the content outside an
. --- .../tutorial.focus-mode/focus-mode.css | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/functional-samples/tutorial.focus-mode/focus-mode.css b/functional-samples/tutorial.focus-mode/focus-mode.css index 2f22d77261..dab934645a 100644 --- a/functional-samples/tutorial.focus-mode/focus-mode.css +++ b/functional-samples/tutorial.focus-mode/focus-mode.css @@ -14,14 +14,23 @@ See the License for the specific language governing permissions and limitations under the License. */ -body > .scaffold > :is(top-nav, navigation-rail, side-nav, footer), -main > :not(:last-child), -main > :last-child > navigation-tree, -main .toc-container { - display: none; +* { + display: none!important } -main > :last-child { - margin-top: min(10vmax, 10rem); - margin-bottom: min(10vmax, 10rem); +html, +body, +*:has(article), +article, +article * { + display: revert!important; +} + +[role=navigation] { + display: none!important +} + +article { + margin: auto; + max-width: 700px; }