Skip to content

WP_Theme_JSON classes: clarify status of position.fixed #48635

@oandregal

Description

@oandregal

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.fixed as 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.

Metadata

Metadata

Assignees

Labels

[Type] QuestionQuestions about the design or development of the editor.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions