Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

error page global style accessible in all other pages too #1771

Open
babakfp opened this issue May 9, 2021 · 0 comments
Open

error page global style accessible in all other pages too #1771

babakfp opened this issue May 9, 2021 · 0 comments

Comments

@babakfp
Copy link

babakfp commented May 9, 2021

Describe the bug
Check out this repo. There is 2 pages routes/index.svelte and routes/_error.svelte. Run the project and you will see the "HOME PAGE" title in red color. It's because I used a global style on the _error page that is affecting the home page elements too.

To Reproduce
I did create a repo, visit https://github.com/babakfp/sapper-layouts-and-error-page-issue
There are just 2 files (routes/index.svelte and routes/_error.svelte) to worry about.

Expected behavior
I expect that the _error.svelte page acts like a real page. It isn't a real page. It's just a component.

Information about your Sapper Installation:
I copied from this repo sveltejs/sapper-template

  • Your browser: Chrome, updated to the latest version a few days ago.

Severity
In my project, I have a dynamic class and some styles for that classes. Svelte detect and removed them as unused CSS🤨😂. Also as I said, an error page must act like a page, not a component. Right now I don't know how to solve this problem and I can't ask the community because one of the admins removed me from the Discord server (for no reason 😊). It is a real project and I have a real problem please help😂.

some related issues
sveltejs/svelte#697
sveltejs/svelte#1594

Additional context
This is the component file that I have an issue with
CubeHover.zip
I'm trying to recreate this in Svelte:
https://codepen.io/babakfp/pen/PrZLdY

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

No branches or pull requests

1 participant