From 217095b680d8c136a8cfb97f73a7d9306d831b2c Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Tue, 22 Oct 2024 17:44:43 +0200 Subject: [PATCH] fix: mark selectors as global to workaround Svelte CSS bug related to #482 --- apps/svelte.dev/src/routes/docs/[...path]/OnThisPage.svelte | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/svelte.dev/src/routes/docs/[...path]/OnThisPage.svelte b/apps/svelte.dev/src/routes/docs/[...path]/OnThisPage.svelte index 7900fecb34..8368fc1698 100644 --- a/apps/svelte.dev/src/routes/docs/[...path]/OnThisPage.svelte +++ b/apps/svelte.dev/src/routes/docs/[...path]/OnThisPage.svelte @@ -81,7 +81,8 @@ @media (max-width: 1199px) { margin: 4rem 0; - &:not(:has(li:nth-child(2))) { + /* TODO remove :global once https://github.com/sveltejs/svelte/issues/13779 is fixed */ + :global(&:not(:has(li:nth-child(2)))) { /* hide widget if there are no subheadings */ display: none; } @@ -155,7 +156,8 @@ rotate: 90deg; } - & + nav { + /* TODO remove :global once https://github.com/sveltejs/svelte/issues/13779 is fixed */ + :global(& + nav) { display: block; } }