Skip to content

Components: Update Readme#69967

Open
Debarghya-Banerjee wants to merge 3 commits intoWordPress:trunkfrom
Debarghya-Banerjee:fix/69966-update-components-package-readme
Open

Components: Update Readme#69967
Debarghya-Banerjee wants to merge 3 commits intoWordPress:trunkfrom
Debarghya-Banerjee:fix/69966-update-components-package-readme

Conversation

@Debarghya-Banerjee
Copy link
Copy Markdown
Contributor

@Debarghya-Banerjee Debarghya-Banerjee commented Apr 22, 2025

What?

Fixes #69966

This PR adds a note to the README.md about including the RTL stylesheet when using @wordpress/components in non-WordPress projects.

Why?

The existing documentation for @wordpress/components in non-WordPress projects didn't include a note about the need for the RTL stylesheet when working in RTL contexts. This PR adds that information for clarity and completeness.

How?

The change involves updating the README.md to include a section for RTL (Right-to-Left) languages, recommending the inclusion of style-rtl.css when using the package outside WordPress.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 22, 2025

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: Debarghya-Banerjee <debarghyabanerjee@git.wordpress.org>
Co-authored-by: sejas <antoniosejas@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>

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

@Debarghya-Banerjee Debarghya-Banerjee changed the title Update components package readme Components: Update Readme Apr 22, 2025
@t-hamano t-hamano added [Type] Developer Documentation Documentation for developers [Package] Components /packages/components labels Apr 23, 2025
Copy link
Copy Markdown
Contributor

@sejas sejas left a comment

Choose a reason for hiding this comment

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

It would be great if we could be more specific about including only one stylesheet: either LTR or RTL.


In non-WordPress projects, link to the `build-style/style.css` file directly, it is located at `node_modules/@wordpress/components/build-style/style.css`.

> **Note:** If your project supports right-to-left (RTL) languages, you should also include the RTL stylesheet:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
> **Note:** If your project supports right-to-left (RTL) languages, you should also include the RTL stylesheet:
> **Note:** If your project supports right-to-left (RTL) languages, you should include the appropriate stylesheet, either the standard or the RTL version, but not both. The RTL stylesheet is located at:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Have updated the comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Components /packages/components [Type] Developer Documentation Documentation for developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Components: Document RTL handling in package readme

3 participants