Skip to content

Use CSS logical properties to support both LTR & RTL #234

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

Merged
merged 2 commits into from
May 6, 2025

Conversation

ramiy
Copy link
Contributor

@ramiy ramiy commented Apr 28, 2025

Add native browser LTR & RTL supports instead of using build-time scripts like rtlcss.

Replacing physical properties with logical properties and values adds flow relative direction instead of strict direction.

This PR prepares the ground for full RTL support with the browsers. When it happens, we will be able simply remove rtlcss and use the same CSS for both directions.

@ramiy ramiy requested a review from sheabunge April 28, 2025 18:36
@ramiy ramiy marked this pull request as draft April 28, 2025 18:45
@sheabunge
Copy link
Member

Very interesting! Logical properties are a new concept to me, but they make a lot of sense.

Is browser support at a level where we would be fine to merge this now, or do we need a build step to improve compatability?

@ramiy
Copy link
Contributor Author

ramiy commented Apr 30, 2025

Good question. So the browser support is depends on the property you refer to. I used only baseline widely available properties, meaning that they are not only fully interoperable by all browsers, but it's been over 30 months since the last browser started supporting the property. The PR doesn't include newly available not limited available properties.

As for the build step, we don't need to change anything at the moment. The build script creates a regular LTR file and a separate RTL file. When the PR will be merged, the too files will have less differences.

The goal is to make the LTR and RTL css files identical. Only then we will be able to remove rtlcss script and the CSS file will be bi-directional by default. We are not there yet. But PRs like this will help fulfill the goal.

@sheabunge sheabunge marked this pull request as ready for review May 6, 2025 05:39
@sheabunge sheabunge merged commit 0cb474b into codesnippetspro:core May 6, 2025
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 this pull request may close these issues.

None yet

2 participants