-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2024 Theme: Add RTL style overrides, ensure RTL CSS is loaded on RTL …
…sites (#2669) * Styles: Ensure the RTL CSS loads on RTL sites * Styles: Add spacing to online workshops buttons so they are swapped in RTL * Add RTL-specific overrides * Fix spacing on checkbox answers in quiz * Flip the focal point of the image on RTL views * Remove the border from module title entirely * Set a left border to fix RTL style The RTL CSS incorrectly applies a right border style, which creates a visible border. Adding a width to the block's left border (which is right, when flipped RTL), hides the incorrect border.
- Loading branch information
Showing
6 changed files
with
78 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
44 changes: 44 additions & 0 deletions
44
wp-content/themes/pub/wporg-learn-2024/src/style/_rtl.scss
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* Styles for RTL sites. | ||
* Note, these styles are set here using the LTR layout keywords, so that when | ||
* `rtlcss` runs it flips the right/left to the correct values. | ||
*/ | ||
|
||
body.rtl { | ||
|
||
// Override the inline styles on Learning Pathway Card content. | ||
.wporg-learn-learning-pathway-card-header-content { | ||
padding-right: 0 !important; | ||
padding-left: 30px !important; | ||
} | ||
|
||
// Override the alignment on Sensei buttons. | ||
.wp-block-sensei-lms-button-take-course.has-text-align-left { | ||
text-align: unset; | ||
} | ||
|
||
// Flip the chevrons on Sensei lesson listings, "back to lesson". | ||
.wp-block-sensei-lms-course-outline-lesson__chevron, | ||
.sensei-lms-quiz-back-to-lesson svg { | ||
transform: rotate(180deg); | ||
} | ||
|
||
// Override the space between quiz inputs and question labels. | ||
&.quiz form #sensei-quiz-list li ul li input { | ||
margin: 0 10px 0 0; | ||
} | ||
|
||
&.quiz form #sensei-quiz-list .sensei-multiple-choice-answer-option-checkbox + label { | ||
margin-left: 0; | ||
|
||
&::before { | ||
margin: 0 10px 0 0; | ||
} | ||
} | ||
|
||
// Fix the spacing of the locked lesson icon. | ||
.sensei-course-theme-locked-lesson-notice__icon { | ||
padding-right: 14px; | ||
padding-left: 0; | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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