-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
What problem does this address?
In comparing Gutenberg and WordPress core versions of the WP_Theme_JSON class, I realized the position.sticked setting/style was backported but the postition.fixed is in a mixed position.
What I know
This core ticket https://core.trac.wordpress.org/ticket/57618 and corresponding PR WordPress/wordpress-develop#3973 backported to core support for position.sticky, where it's mentioned that:
The backport deviates from Gutenberg trunk in one way: fixed position type is excluded from the appearance tools opt-in: this is because fixed positioning isn't being opted-in for the Group block and isn't ready to be used as a default opt-in. The code paths exist for fixed positioning as it will be supported in the future, but for now, sticky is the only one exposed by default. (The overall block support should still support it as a valid value, though)
However, WordPress core still considers position.fixed a valid setting, as per https://github.com/WordPress/wordpress-develop/pull/3973/files#diff-e12c3008d747d1bec5be9927c5e7b1ced0a88641abe52c278d495da936714817R343
Next steps
I don't know.
Without having the full context, I presume we may need to:
-
WordPress core: do not have
postition.fixedas a valid setting? -
Gutenberg: if making Gutenberg work like core is not feasible, at least we need to document the situation. In other cases where we don't want to backport some code we add a comment, like we do for fonts and appearance tools.