close
Skip to content

When Gutenberg is active, RTL styles are not loading correctly on the front. #41649

@carolinan

Description

@carolinan

Description

Different RTL files and styles are loaded on the front of the website depending on if Gutenberg is active or not.
This breaks some RTL styles, for example for the query pagination and comment query pagination blocks.

The example page I am using to reproduce this is the front page of Twenty Twenty-Two, with enough posts to show the query pagination in the query loop.

WordPress trunk, without Gutenberg, loads the following rtl files:

<link rel='stylesheet' id='wp-block-navigation-rtl-css'  href='http://localhost:8889/wp-includes/blocks/navigation/style-rtl.css?ver=6.1-alpha-53344-src' media='all' />
<link rel='stylesheet' id='wp-block-image-rtl-css'  href='http://localhost:8889/wp-includes/blocks/image/style-rtl.css?ver=6.1-alpha-53344-src' media='all' />
<link rel='stylesheet' id='wp-block-columns-rtl-css'  href='http://localhost:8889/wp-includes/blocks/columns/style-rtl.css?ver=6.1-alpha-53344-src' media='all' />
<link rel='stylesheet' id='wp-block-library-rtl-css'  href='http://localhost:8889/wp-includes/css/dist/block-library/common-rtl.css?ver=6.1-alpha-53344-src' media='all' />

Inline styles are replaced with their rtl versions. - For example to rotate the query pagination arrows.

With Gutenberg 13.4.0 active, the following rtl file is loaded, but it is the only one:
<link rel='stylesheet' id='wp-block-navigation-rtl-css' href='http://localhost:8889/wp-content/plugins/gutenberg/build/block-library/blocks/navigation/style-rtl.css?ver=1654842440' media='all' />
Inline styles are not replaced with their rtl versions, and the query pagination arrows are not rotated.

See #40684 (comment)

Step-by-step reproduction instructions

  1. Activate Gutenberg trunk or 13.4.0.
  2. Activate an RTL language. I tested with Arabic.
  3. Add or select a query pagination block and enable the arrow option. Save,
  4. Compare the position and direction of the arrows in the editor and the front, confirm that the views do not match.

Screenshots, screen recording, code snippet

No response

Environment info

WordPress trunk
Gutenberg trunk or 13.4-0

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions