pico
pico copied to clipboard
Fix landmark selectors not working properly for Svelte
This PR adds additional selectors to the landmarks so they work properly on Svelte, as the framework forces a wrapping div around all body content, meaning landmarks can not be direct children of the body element.
You could just add id to that div
<body data-sveltekit-preload-data="hover">
<div id="app" style="display: contents">%sveltekit.body%</div>
</body>
And then configure semantic root element in your scss file
@use "@picocss/pico/scss/pico" with (
$semantic-root-element: "#app",
);