-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.0.0-beta.3 to beta.7] RTL mode: margin-start/end & padding-start/end do not work #15341
Comments
After digging a bit, it seems that by default only LTR directives are included. I am now able to correctly render those attributes by including the relevant scss files instead of the preprocessed css files: [globals.scss] $app-direction: multi;
@import "~@ionic/angular/dist/css/ionic";
@import "~@ionic/angular/dist/themes/ionic.globals.md"; [index.html] <html lang="en" dir="ltr">
... So it seems a bit like for Ionic 3. Is this the correct approach? I updated the repo on https://github.com/abennouna/ionic4-rtl-issue |
With beta.6: @import '~@ionic/angular/dist/css/normalize';
@import '~@ionic/angular/dist/css/core';
@import '~@ionic/angular/dist/css/structure';
@import '~@ionic/angular/dist/css/typography';
@import '~@ionic/angular/dist/css/utils.bundle';
@import '~@ionic/angular/dist/themes/ionic.globals.md'; |
Is this issue still exist in beta.17? |
Yes: RTL mode is broken out of the box, and it's not clear how we can make it work with static CSS files. As a workaround, we use SCSS files for the moment. You can check the updated demo here and the demo repository here |
@paulstelzer I'd like to try to fix some RTL issues, like this one. Do you know how the CSS compilation work in v4? I've been banging my head for some time now, and I can't understand how the RTL styles are supposed to be compiled in the final CSS files. (Edit: So it seems a way to make it work is to target by [dir="rtl"], will continue my tests...) For instance, the ruleset for --padding-end: #{$padding}; As mentioned before, when I import the static CSS file alone, I don't get anything related to RTL styles. But, even if I change that line with: @include ltr() {
--padding-end: #{$padding};
}
@include rtl() {
--padding-start: #{$padding};
} edit: the lines above are not the solution and compile the project, I see the CSS does not change at all. Any help or pointer will be appreciated, thanks! |
Maybe @brandyscarney or @manucorporat can help you :) |
hope you update demo with sample of all error in rtl and make this as guide like floating input not working in RC0
even i think your pull request with direction suggestion is the best work around the problem with static css files |
Is fixed by #16987. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Bug Report
Ionic Info
Describe the Bug
The 4 attributes
margin-start
,margin-end
,padding-start
, andpadding-end
do not work correctly in RTL mode: they render like in LTR mode.Steps to Reproduce
Steps to reproduce the behavior:
dir="rtl"
to the HTML root elementRelated Code
Expected Behavior
The 4 attributes must render as right-to-left mode.
Additional Context
I tried with and without
$app-direction: multi
but I haven't noticed any change.The text was updated successfully, but these errors were encountered: