Follow

Why am I doing this. What am I doing. gitlab.com/IvanSanchez/svelte- @leafletjs@twitter.com @sveltejs@twitter.com

· · Mastodon Twitter Crossposter · 1 · 0 · 0

No srsly why. This is triggering one of those bugs from hell where the horizontal offset of a L.Popup depends on the offsetWidth of a detached DOM element before the @leafletjs@twitter.com CSS is loaded async'ly.

Show thread

So:
- Linking the CSS in the <svelte:head> is async and leads to race conditions
- Doing an import of the CSS requires that the consumer uses some rollup-plugin-css stuff
- Embedding the Leaflet CSS in the component might not be doable and requires an extra build step

Show thread

...this is the kind of stuff that I'm very wary of when it comes to any kind of reactive framework (even @sveltejs@twitter.com): debugging this stuff requires *a lot* of knowledge about lifecycles and events and whatnot. Learning curve looks gentle enough, then it steeps up to brain damage.

Show thread
Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!