fix(rtl): use CSS logical properties for problem blocks and remove ha… - #92
Open
andrey-canon wants to merge 1 commit into
Open
fix(rtl): use CSS logical properties for problem blocks and remove ha…#92andrey-canon wants to merge 1 commit into
andrey-canon wants to merge 1 commit into
Conversation
…rdcoded LTR import (#81) - Removed the explicit `@import 'vendor/bi-app/bi-app-ltr';` in `_builtin-block-variables.scss` that was overriding RTL configurations. - Replaced physical CSS properties (`left`, `padding-left`, `margin-right`) with their logical equivalents (`inset-inline-start`, `padding-inline-start`, `margin-inline-end`) in `ProblemBlockDisplay.css` to natively support bidirectional layouts.
johanseto
approved these changes
Aug 13, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR fixes styling and alignment issues when the platform is rendered in Right-to-Left (RTL) languages within the Problem Blocks (choice groups, radio buttons, and checkboxes) for the Verawood release.
Previously, the layout relied on physical CSS properties that forced elements to the left side regardless of the language direction.
Changes Made
xmodule/static/css-builtin-blocks/ProblemBlockDisplay.css:margin-rightwithmargin-inline-end.padding-leftwithpadding-inline-start.leftwithinset-inline-start.Impact
By delegating the alignment to the browser using logical properties, elements like radio buttons and checkboxes will now automatically mirror their position based on the
dir="rtl"ordir="ltr"HTML attribute, fixing the UI without needing separate overriding stylesheets.How to Test
Checkout This branch
Set the following setting to
False:USE_EXTRACTED_PROBLEM_BLOCK = FalseCompile assets:
npm run compile-sass -- --skip-themesBefore
EN
AR
After
EN
AR
Issue #1805
Migration pr of #81