You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(theme-classic): let rtlcss flip Infima like the other CSS - #13088
Last part of moving Infima into the monorepo as @docusaurus/infima.
@docusaurus/infima no longer ships a pre-flipped infima-rtl.css. For RTL sites, theme-classic loads infima.css like LTR sites, and its RTL PostCSS plugin flips Infima like all the other CSS. This removes the infima-rtl.css build output, its export, the package's rtlcss devDependency (its last one) and theme-classic's "skip Infima" special case. The /*rtl:raw:*/ comment of breadcrumb.css now reaches the site's rtlcss, which still rotates the separator.
The var() fallback bug
Just removing the skip isn't enough. postcss-preset-env adds var() fallbacks, computed from the :root values of the same file, for browsers without custom properties (like op_mini all, part of the browserslist defaults). Once the cascade layers plugin has wrapped the file (it calls root.clone() in Once), the per-node visitors of rtlcss flip the var() declaration but not its fallback:
That puts padding or borders on both sides of RTL lists, blockquotes, alerts, the TOC, nested menus, and breaks the navbar sidebar transform. The plugin now runs rtlcss once on the final CSS, in OnceExit, and forwards its messages. rtlcss() without options is the same as the former rtlcss(result.root as ConfigOptions): rtlcss spreads the options over its defaults, and a Root has none of their keys.
Test Plan
New theme-classic unit test running the real postcss-preset-env, cascade layers and RTL plugins together. With the former per-node plugin, it fails with the output above.
Argos doesn't cover RTL, so I built minimal RTL sites (fa locale, direction: 'rtl') on main and on this PR, with a cold rspack cache (it isn't invalidated when configurePostCss code changes). The CSS is byte-identical:
classic preset without docs and blog: styles.097a56e086.css
classic preset with docs and blog (TOC, docs sidebar, pagination, blog sidebar): styles.8cba481226.css
The website CSS (BUILD_FAST=true docusaurus build --locale en) is byte-identical: styles.f2a9a866c1.css.
The infima Argos build shows infima-rtl.css as removed.
slorber
added
pr: maintenance
This PR does not produce any behavior differences to end users when upgrading.
Argos
Add this label to run UI visual regression tests. See argos.yml GH action.
labels
Nov 19, 2026
Review was skipped as selected files did not have any reviewable changes.
Files ignored due to path filters: 1
pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: cb898f32-9cc8-4bd5-98fd-9d501d672a0f
Commits
Reviewing files that changed from the base of the PR and between f2fdfe3 and fccb8d6.
Files ignored due to path filters: 1
pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The Infima package no longer builds or exports a separate RTL stylesheet. The classic theme always loads infima.css and applies rtlcss to final CSS for RTL locales. A test checks the resulting fallback and variable declaration.
Changes: RTL CSS handling
Layer / File(s)
Summary
Remove the prebuilt Infima RTL stylesheet packages/docusaurus-infima/package.json, packages/docusaurus-infima/scripts/build.mjs, packages/docusaurus-infima/README.md
The package no longer declares or builds infima-rtl.css. The README now describes import inlining without the RTL build step.
Transform final theme CSS for RTL packages/docusaurus-theme-classic/src/index.ts, packages/docusaurus-theme-classic/src/__tests__/rtl.test.ts, packages/docusaurus-theme-classic/package.json, knip.config.ts, argos/README.md
The theme loads infima.css for all locales and runs rtlcss on final CSS for RTL locales. Dependencies and an RTL test support this processing. The Knip ignore list no longer includes @docusaurus/infima. Argos instructions no longer say that uploaded CSS includes both LTR and RTL variants.
sequenceDiagram
participant ClassicTheme
participant PostCSS
participant rtlcss
ClassicTheme->>PostCSS: Load infima.css and process final CSS
PostCSS->>rtlcss: Transform final CSS for RTL locales
rtlcss->>PostCSS: Return transformed CSS and messages
Loading
Possibly related issues
meta/docusaurus#11719: This change removes the separate Infima RTL output as part of the Infima package changes, but it does not shrink Infima.
Possibly related PRs
meta/docusaurus#13086: It introduces the OnceExit RTL processing approach and builds the separate Infima RTL stylesheet that this change removes.
meta/docusaurus#13085: It switches the classic theme to the Infima package and includes related RTL handling changes.
meta/docusaurus#13082: It adds the Infima package and the RTL stylesheet export removed here.
Merge Risk: Minimal · previous review 728be
This change makes RTL sites load the standard Infima stylesheet and flips it with the rest of the theme CSS. The author reports identical build output and a new test covering the fallback case. No merge-blocking risk was identified.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: theme-classic now lets rtlcss flip Infima along with other CSS, instead of loading a separate RTL stylesheet. The raw summary and objectives confirm this. The title us…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check
Explanation
The title names the main change: theme-classic now lets rtlcss flip Infima along with other CSS, instead of loading a separate RTL stylesheet. The raw summary and objectives confirm this. The title uses the conventional refactor(scope) prefix and is concise. It does not mention the removal of infima-rtl.css, but it does not need to cover every detail.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Fix failing CI checks
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: a94de845-5f54-464e-b55f-76615d20245c
Commits
Reviewing files that changed from the base of the PR and between d8a038a and 728bef3.
Files ignored due to path filters: 1
pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 1
argos/README.md
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
slorber
added
Argos
Add this label to run UI visual regression tests. See argos.yml GH action.
and removed
Argos
Add this label to run UI visual regression tests. See argos.yml GH action.
labels
Nov 19, 2026
Stop shipping the pre-flipped infima-rtl.css. The RTL PostCSS plugin
now runs rtlcss once on the final CSS (OnceExit): its per-node
visitors missed the var() fallbacks of postcss-preset-env once the
cascade layers plugin wrapped the file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
slorber
added
Argos
Add this label to run UI visual regression tests. See argos.yml GH action.
and removed
Argos
Add this label to run UI visual regression tests. See argos.yml GH action.
labels
Nov 19, 2026
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ArgosAdd this label to run UI visual regression tests. See argos.yml GH action.CLA SignedSigned Facebook CLApr: maintenanceThis PR does not produce any behavior differences to end users when upgrading.
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Last part of moving Infima into the monorepo as
@docusaurus/infima.@docusaurus/infimano longer ships a pre-flippedinfima-rtl.css. For RTL sites, theme-classic loadsinfima.csslike LTR sites, and its RTL PostCSS plugin flips Infima like all the other CSS. This removes theinfima-rtl.cssbuild output, its export, the package'srtlcssdevDependency (its last one) and theme-classic's "skip Infima" special case. The/*rtl:raw:*/comment ofbreadcrumb.cssnow reaches the site's rtlcss, which still rotates the separator.The var() fallback bug
Just removing the skip isn't enough. postcss-preset-env adds
var()fallbacks, computed from the:rootvalues of the same file, for browsers without custom properties (likeop_mini all, part of the browserslist defaults). Once the cascade layers plugin has wrapped the file (it callsroot.clone()inOnce), the per-node visitors of rtlcss flip thevar()declaration but not its fallback:That puts padding or borders on both sides of RTL lists, blockquotes, alerts, the TOC, nested menus, and breaks the navbar sidebar transform. The plugin now runs rtlcss once on the final CSS, in
OnceExit, and forwards its messages.rtlcss()without options is the same as the formerrtlcss(result.root as ConfigOptions): rtlcss spreads the options over its defaults, and aRoothas none of their keys.Test Plan
theme-classicunit test running the real postcss-preset-env, cascade layers and RTL plugins together. With the former per-node plugin, it fails with the output above.falocale,direction: 'rtl') onmainand on this PR, with a cold rspack cache (it isn't invalidated whenconfigurePostCsscode changes). The CSS is byte-identical:styles.097a56e086.cssstyles.8cba481226.cssBUILD_FAST=true docusaurus build --locale en) is byte-identical:styles.f2a9a866c1.css.infimaArgos build showsinfima-rtl.cssas removed.Test links
Deploy preview: https://deploy-preview-13088--docusaurus-2.netlify.app/
Related issues/PRs
Follows #13081, #13082, #13085 and #13086
🤖 Generated with Claude Code