You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When not available through the config, the styles will be computed for every component using them, since they aren't centralized.
Acceptance criteria
Define a solution that help us overcome the listed drawbacks.
A proof of concept is desirable.
Dev notes
Can we centralize the style extraction by defining a global store/Provider that will emit updates to react to changes?
We could perform the style incrementally, so we can render the stripe form as soon as possible, then re-compute the styles once we make sure all CSS is fully loaded.
We can also react to other events, for example, in the site editor we can monitor if colors/background change and react accordingly.
For classic checkout, we can call elements.update( { appearance } ); when styles change.
The text was updated successfully, but these errors were encountered:
Description
The current style extraction mechanism has a couple drawbacks:
Acceptance criteria
Dev notes
elements.update( { appearance } );
when styles change.The text was updated successfully, but these errors were encountered: