Open betaboon opened 3 years ago
Ah, probably. But first, could you tell me your motivation or use case?
I'm working on a component library and am using storybook for "documentation" of components.
storybook has a zoom-in function. when zoomed in neither appendTo = body
nor appendTo = parent
work properly.
example (Zoom-in-button in the top-bar)
It's a bug... I'll try to fix it.
Please try v0.5.2.
Appending to the target element is not implemented, but it is aware of the zoom
CSS property of the <body>
.
@luncheon for browsers that support zoom (eg chrome) it works. for browsers that do not support zoom (eg firefox) storybook is using transform (see here) which ofc is not covered by your fix. great progress already tho :)
could you tell me your motivation or use case
Let's say I have a checklist. And each item on the list has a toggling checkbox to the left. Perhaps when a user clicks/taps on the list item, you'd want to make it so that the ripple emanates from the center of checkbox, rather than the label. An example of that exact behavior can be found here (click on the label "TWA Member locations.xlsx").
@evantishuk Like this? https://codepen.io/luncheon/pen/ExZyMwe
@luncheon
At quick glance, those seem to behave identically. So, yeah, that's the gist of it!
@betaboon
Added support for the transform: scale()
of the body
in v0.5.3.
@luncheon works like a charm :)
@luncheon i think i just came across a use-case for this feature request:
demo: https://svelte.dev/repl/5ee97c4d0b78427bb52aeb1a2d2f6819?version=3.37.0
@betaboon Indeed. I'd like to consider (and implement) it when I have time.
@luncheon i just noticed that 0.5.3 breaks my setup when doing SSR :/
@betaboon Oops😅 Please update to 0.5.4. Thanks.
Now added support for appendTo: "target"
, and made it the default. The original reason for making appendTo: "body"
the default was for IE, and IE is already obsolete. I found appendTo: "target"
to be just right for the default.
With this breaking change, the version is now 1.0.0.
would it be possible to add the feature to append the ripple to the events targetElement?