astro-tweet icon indicating copy to clipboard operation
astro-tweet copied to clipboard

Use logical properties to support RTL and more writing modes

Open OverflowCat opened this issue 1 year ago • 5 comments

This PR replaces physical properties with logical ones to enhance support for languages that are not left-to-right (LTR).

I’ve updated the demo to showcase different options:

png (14) png (15)

While logical properties are not new, frameworks like Tailwind have only recently begun incorporating them more extensively. The properties used in this PR require Chromium 87+ (released on 2020-11-17). If backward compatibility or upstream mergability is a concern, feel free to skip this PR :-) Another option is to use the PostCSS Logical Properties and Values plugin for fallback support if you’re working in an LTR-only environment.

Additionally, I suggest we consider adding i18n features, or at least allowing users to customize button text.

OverflowCat avatar Aug 19 '24 02:08 OverflowCat

⚠️ No Changeset found

Latest commit: 996a2a0b07a420b12f885d7b381b8c826fac8006

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Aug 19 '24 02:08 changeset-bot[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
astro-tweet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 19, 2024 2:53am

vercel[bot] avatar Aug 19 '24 02:08 vercel[bot]

Hey @OverflowCat, sorry I missed notifications from this repo. Let me review this.

tsriram avatar Dec 30 '24 11:12 tsriram

@OverflowCat, both the screenshots say "Before". Did you mean to attach an "After" screenshot? 🤔

tsriram avatar Dec 30 '24 12:12 tsriram

@OverflowCat, both the screenshots say "Before". Did you mean to attach an "After" screenshot? 🤔

The screenshots are all After. The first one is RTL (using an Arabic tweet may show this more clearly); others are vertical. (Only a few languages can be written vertically, but you can consider it free because after supporting RTL, you only need to modify the writing-mode to switch between various writing directions. This is simply to demonstrate the correctness of the layout.)

OverflowCat avatar Dec 30 '24 21:12 OverflowCat