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
postcss-logical-float-and-clear not including [dir="rtl"] version of ruleset #958
Comments
Note that it looks like PostCSS Logical doesn't do a [dir="rtl"] prefix anymore. It appears that this change appeared in #740, but the link to the Changelog is broken |
Hi @mherchel, I've added updated changelog links where needed : https://github.com/csstools/postcss-plugins/blob/main/plugins/postcss-logical/CHANGELOG.md#600-january-24-2023 This change was very breaking and although it was announced, it still surprised many people :) |
yeah, I totally get the issues from the old approach (especially with the specificity). Is there a way to revert to that behavior though? We're using PostCSS Preset ENV in Drupal core, and we don't have any way to predict if a site's language is going to be LTR or RTL, hence the need for that functionality. |
No. But there is one alternative we are considering. You write selectors with The specificity would remain the same, so it doesn't have that specific issue. But this approach still suffers from bloated outputs. Is it possible to generate multiple output stylesheets for Drupal core? And then leave it up to theme builders / users to include the correct one depending on settings, ... |
Also a valid approach is to fork the old logical plugin and keep using it directly (not through PostCSS Preset Env). This allows you to keep using The source code can be found on the If you do decide to fork from that point we are happy to assist in any way. |
Thanks for the response. At this point all of our supported browsers support logical properties (yay!) except for Thanks again for all of the excellent work here :D |
Bug description
I'm not sure if this is a bug or a feature (because the documentation doesn't say that this should be compiled this way)
The issue is that PostCSS Logical
willused to compile CSS and include RTL versions (assuming default is LTR).Example source:
Example output:
However, I can't see any option within PostCSS Logical Float And Clear to do the same.
Source CSS
.test { float: inline-start; }
Expected CSS
.test { float: left; }
[dir="rtl"] .test { float: right; }
Actual CSS
.test { float: left; }
Does it happen with
npx @csstools/csstools-cli <plugin-name> minimal-example.css
?N/A
Debug output
No response
Extra config
No response
What plugin are you experiencing this issue on?
PostCSS Preset Env, PostCSS Logical Float and Clear
Plugin version
1.0.1
What OS are you experiencing this on?
macOS
Node Version
16.13.1
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: