Skip to content
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

Directive /* rtl:ignore */ not working #35

Open
Seb33300 opened this issue Aug 4, 2021 · 2 comments · May be fixed by #36
Open

Directive /* rtl:ignore */ not working #35

Seb33300 opened this issue Aug 4, 2021 · 2 comments · May be fixed by #36

Comments

@Seb33300
Copy link

Seb33300 commented Aug 4, 2021

I am trying to build a custom RTL Bootstrap 5 (version 5 is compatible with RTLCSS) unsing webpack with your tool but it looks like the /*rtl:ignore*/ directive is ignored.

For example, this line: https://github.com/twbs/bootstrap/blob/f61a0218b36d915db80dc23635a9078e98e2e3e0/scss/_reboot.scss#L278

Should always render direction: ltr; but in my project, webpack-rtl-plugin converts it to direction: rtl;.

Am I missing something?

As indicated in the readme, in my project I added const WebpackRTLPlugin = require('webpack-rtl-plugin') at the top of my webpack.config.js.
And then, added the plugin new WebpackRTLPlugin() to webpeck.

Please note that if I remove the line to add WebpackRTLPlugin plugin, the result is a css file containing:
direction: ltr /* rtl:ignore */;

@Seb33300 Seb33300 changed the title Control Directives /*rtl:ignore*/ not working Directive /*rtl:ignore*/ not working Aug 4, 2021
@Seb33300
Copy link
Author

Seb33300 commented Aug 4, 2021

Just found the issue.

This is because Bootstrap use /* rtl:ignore */ instead of /*rtl:ignore*/ and this is a bug fixed in RTLCSS 2.4.1

This plugin is locked to RTLCSS 2.4.0 but if I force to use 2.4.1, the issue disappear.

You should consider to update your package.json to not use locked version of dependencies (^2.4.0 instead of 2.4.0).

@Seb33300 Seb33300 linked a pull request Aug 5, 2021 that will close this issue
@Seb33300 Seb33300 changed the title Directive /*rtl:ignore*/ not working Directive /* rtl:ignore */ not working Aug 7, 2021
@Seb33300 Seb33300 changed the title Directive /* rtl:ignore */ not working Directive /* rtl:ignore */ not working Jan 20, 2022
@dubisoft-solutions
Copy link

I still have the same problem, any ideas how to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants