That was what I originally tried to do when I put it in my Svelte app, but as Svelte is structured differently and changes names I couldnโt target those parts to ignore.
So after struggling with that for a while I found you can target things you only want to print.
And it fixed my conundrum
Yeah, it worked fine as a simple HTML and SCSS page, but I couldn't target higher up the tree in svelte I think because they are components and they just weren't being picked up.
So I went the other way and just targeted what I needed to... ended up being less code than the other way too.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
That was what I originally tried to do when I put it in my Svelte app, but as Svelte is structured differently and changes names I couldnโt target those parts to ignore.
So after struggling with that for a while I found you can target things you only want to print.
And it fixed my conundrum
You should be able to โdisplay:noneโ items in a print media query.
You just need to have a class on those items. I have not see this with svelte.
Honestly though, I typically write a print style sheet outside of svelte and just attach it globally.
Yeah, it worked fine as a simple HTML and SCSS page, but I couldn't target higher up the tree in svelte I think because they are components and they just weren't being picked up.
So I went the other way and just targeted what I needed to... ended up being less code than the other way too.