3 Matching Annotations
- Last 7 days
You can also see this repo: default-passive-events.
- Sep 2020
Svelte will not offer a generic way to support style customizing via contextual class overrides (as we'd do it in plain HTML). Instead we'll invent something new that is entirely different. If a child component is provided and does not anticipate some contextual usage scenario (style wise) you'd need to copy it or hack around that via :global hacks.
- component/library author can't consider/know ahead of time all of the ways users may want to use it
- forced to fork/copy and paste library code because it didn't provide enough customizability/extensibility / didn't foresee some specific prop/behavior that needed to be overridable/configurable (explicit interface)
- run-time dynamicness/generics vs. having to explicitly list/hard-code all options ahead of time
- maintenance burden to explicitly define/enumerate/hard-code possible options (explicit interface)
- forking to add a desired missing feature/change
- trying to prevent one bad thing leading to people doing/choosing an even worse option
- Svelte: how to affect child component styles
There's no way to change style incapsulation method without patching the compiler, and this means maintaing a fork, which is not desirable.