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

Scrollbar Shadow should be positioned by default #111

Open
yairEO opened this issue Jan 16, 2023 · 2 comments
Open

Scrollbar Shadow should be positioned by default #111

yairEO opened this issue Jan 16, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@yairEO
Copy link
Contributor

yairEO commented Jan 16, 2023

Currently, Shadow.jsx does not come with CSS that has position

<Scrollable.Shadow>
    <Scrollable>
        ...
    </Scrollable>
</Scrollable.Shadow>

And so, whoever is using the Scrollable Shadow must position it themselves (in their app):

.scroll-shadow {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

And it begs the question why does the above CSS not come out-of-the-box inside the <Shadow> component SCSS file.

@yairEO yairEO added the bug Something isn't working label Jan 16, 2023
@yairEO yairEO changed the title Scrollbar Shadow should have position absolute by default Scrollbar Shadow should be positioned by default Jan 16, 2023
@ykadosh
Copy link
Collaborator

ykadosh commented Jan 17, 2023

That's a good question 😁
I remember there was a reason, but can't remember what it was...

One thing I can say is that you may not always want inset to be 0.
For example, if you have a sticky element inside your scrollable element.

@yairEO
Copy link
Contributor Author

yairEO commented Jan 18, 2023

Yes I thought about that, but the usual use-case is most likely simple - just scrollable content, so it makes sense to add these default styles.

For the more esoteric cases (like your example above), developers can make CSS modifications, since they anyway would need to write CSS (it will override the one from Webrix's <Shadow> anyway)

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

2 participants