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

Docs/iAPI: Recommend kebab-case in data-wp-class #62817

Merged
merged 2 commits into from
Jun 27, 2024

Conversation

luisherranz
Copy link
Member

What?

Add a notice to recommend users to use kebab-case for the class names when using data-wp-class.

I've also removed a couple of sentences that referred to the arguments we were passing to the callbacks of wp-class and wp-style, which were eliminated before WordPress 6.5.

Why?

Because HTML is not case-sensitive in attribute names and using camelCase can cause problems and confusion.

How?

I've simply added an explanation and an example in the wp-class section.

Copy link

github-actions bot commented Jun 25, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: luisherranz <luisherranz@git.wordpress.org>
Co-authored-by: cbravobernal <cbravobernal@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@luisherranz luisherranz added [Type] Developer Documentation Documentation for developers [Feature] Interactivity API API to add frontend interactivity to blocks. labels Jun 25, 2024
Copy link
Contributor

@cbravobernal cbravobernal left a comment

Choose a reason for hiding this comment

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

LGTM

@luisherranz luisherranz merged commit b883f30 into trunk Jun 27, 2024
60 checks passed
@luisherranz luisherranz deleted the docs/interactivity-api-wp-class-case branch June 27, 2024 16:49
@github-actions github-actions bot added this to the Gutenberg 18.8 milestone Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Interactivity API API to add frontend interactivity to blocks. [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants