Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style engine: update docs for css_var #53710

Merged
merged 2 commits into from
Aug 16, 2023
Merged

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented Aug 16, 2023

What?

The doc comments for css_var were topsy turvy.

The css_var property used to be this way, e.g., '--wp--preset--color--$slug' => 'color' , but then we swapped it around.

Why?

To avoid confusion

Testing Instructions

Check the code or unit test: k/phpunit/style-engine/style-engine-test.php#L237

The doc should reflect the key/values

@ramonjd ramonjd added the [Type] Developer Documentation Documentation for developers label Aug 16, 2023
@ramonjd ramonjd self-assigned this Aug 16, 2023
@ramonjd ramonjd added the [Package] Style Engine /packages/style-engine label Aug 16, 2023
Copy link
Contributor

@andrewserong andrewserong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement! Just left a tiny nit about if we should also include an example of the value in the comment, but otherwise LGTM 👍

packages/style-engine/class-wp-style-engine.php Outdated Show resolved Hide resolved
@ramonjd ramonjd enabled auto-merge (squash) August 16, 2023 02:14
@ramonjd ramonjd merged commit f57fa04 into trunk Aug 16, 2023
50 checks passed
@ramonjd ramonjd deleted the fix/style-engine-docs-css-var branch August 16, 2023 02:45
@github-actions github-actions bot added this to the Gutenberg 16.5 milestone Aug 16, 2023
@SiobhyB SiobhyB added the Needs PHP backport Needs PHP backport to Core label Sep 5, 2023
@ramonjd ramonjd removed the Needs PHP backport Needs PHP backport to Core label Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Style Engine /packages/style-engine [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants