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

Add linting rules to flag CSS that doesn't work well with rtl automatically #1409

Open
lyonsil opened this issue Dec 19, 2024 · 0 comments
Open

Comments

@lyonsil
Copy link
Member

lyonsil commented Dec 19, 2024

Enable some CSS/Tailwind linting rules to flag things that explicitly use styles that don't translate automatically when in a right-to-left context so we can either

  • replace them with logical properties, or
  • mark them as intentional exceptions

From a long discussion in Discord.

.inset {
-  top: 0;
-  right: 0;
-  bottom: 0;
-  left: 0;
+  inset: 0;
}
.margin {
-  margin-left: 0;
+  margin-inline-start: 0;
}

Possible solutions:

In response to a sample from stylelint-use-logical, @merchako mentioned:

Unfortunately, I don't see any Tailwind classes flagged with this linter. We might be able to configure our own logical Tailwind linting by extending linting of the Tailwind CSS Intellisense

@lyonsil lyonsil added this to Paranext Dec 19, 2024
@lyonsil lyonsil changed the title Add a linting rule to flag CSS that doesn't work well with rtl automatically Add linting rules to flag CSS that doesn't work well with rtl automatically Dec 19, 2024
@merchako merchako moved this to 📮 Idea Bucket in Paranext Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📮 Idea Bucket
Development

No branches or pull requests

1 participant