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

[Bug]: Wrapper element causing problems #224

Open
JeffWScott opened this issue Sep 13, 2024 · 6 comments
Open

[Bug]: Wrapper element causing problems #224

JeffWScott opened this issue Sep 13, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@JeffWScott
Copy link

Type of Svelte app

Svelte Vite template

Describe the bug

Element gets wrapped in a "data-action" div.
Div constrains the elements size.

Reproduction

<h1 use:reveal class="sr__hide">Hello world</h1>
turns into:
<div data-action="reveal" class="sr__7153687886990808__properties"><h1 class="s-YAiGFDDAzbUx">Hello world</h1></div>

System Info

N/A

Severity

Blocking

Additional Information

If the package is going to wrap my elements and not allow me to effect those elements this this is a non-started for me.

@JeffWScott JeffWScott added the bug Something isn't working label Sep 13, 2024
@DaveKeehl
Copy link
Owner

DaveKeehl commented Sep 17, 2024

Thank you for filing this bug report. What version of svelte-reveal are you running? Could you please provide a more thorough reproduction environment (either a more complete code snippet or a code sandbox) showcasing the problem?

The package does wrap your element but isn't supposed to prevent you from sizing it the way you want to.

@JojokCreator
Copy link

JojokCreator commented Nov 28, 2024

Same issue here. I'm trying to use this in a masonary effect but the wrapper div breaks the styles of my elements in the grid. Version "svelte-reveal": "^1.1.0",

Ability to add a class to the wrapper would fix this.

@DaveKeehl
Copy link
Owner

@JojokCreator sorry about that! do you have a repro for me to look at?

@DaveKeehl DaveKeehl changed the title [Bug]: Can't use this unfortunatly [Bug]: Wrapper element causing problems Nov 28, 2024
@JojokCreator
Copy link

have

No worries. It's a very cool project.

https://stackblitz.com/edit/withastro-astro-oj3zxl?file=src%2Fpages%2Findex.astro

The masonary on the right uses the reveal.

I can hack it by manually adding height: 100%; width: 100% via javascript to the divs added by svelte-reveal.

@JojokCreator
Copy link

also the threshold doesn't seem to be being applied. See the Reveal.svelte component. Unless I'm doing something wrong (likely :-) ).

@DaveKeehl
Copy link
Owner

DaveKeehl commented Nov 29, 2024

also the threshold doesn't seem to be being applied. See the Reveal.svelte component. Unless I'm doing something wrong (likely :-) ).

Weird.. I'll look into it, thanks for sharing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants