Open yairEO opened 1 year ago
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.
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)
Currently,
Shadow.jsx
does not come with CSS that hasposition
And so, whoever is using the Scrollable Shadow must position it themselves (in their app):
And it begs the question why does the above CSS not come out-of-the-box inside the
<Shadow>
component SCSS file.