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

Imported CSS from other layouts still loaded #255

Open
sea-grass opened this issue Oct 14, 2022 · 1 comment
Open

Imported CSS from other layouts still loaded #255

sea-grass opened this issue Oct 14, 2022 · 1 comment
Labels
wontfix This will not be worked on

Comments

@sea-grass
Copy link

I'm seeing an issue where CSS is incorrectly loaded from other layouts.

I reproduced the issue in a repo.

Reproduction steps:

  1. Create two routes simple and other and configure them to use layouts Layout.svelte and Other.svelte, respectively.
  2. Create two CSS files, simple.css and other.css. Inside the script tag of each layout, import their respective CSS file.
  3. Bug: Start the dev server and navigate to one of your routes. You'll see that on both routes, both simple.css and other.css are loaded.
    - Expected behaviour: On the simple route, only simple.css is loaded. On the other route, only other.css is loaded.
@eight04
Copy link
Contributor

eight04 commented Oct 17, 2022

Elderjs bundles all styles from all components into a single file. Therefore it is better to use the component style in case you want to avoid the conflict.

@eight04 eight04 added the wontfix This will not be worked on label Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants