Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix landmark selectors not working properly for Svelte #668

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

hfcRed
Copy link

@hfcRed hfcRed commented Mar 27, 2025

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.

Relevant Discussion

@hfcRed hfcRed changed the base branch from main to dev March 27, 2025 17:06
@modagavr
Copy link

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",
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants