Skip to content

Conversation

@userquin
Copy link
Contributor

@userquin userquin commented Jan 31, 2026

This PR adds a new UnoCSS Preset to detect, replace and warn wrong left/right usages.

There are some edge cases where we cannot do anything, for example pl8, if the code contains for example const pl8 =... the preset rule for padding will warn...

The rules covered with the preset are:

  • padding left and right with dash: pl- and pr- (the rule will replace the css with ps- and pe- content respetivelly)
  • marging left and right with dash: ml- and mr- (the rule will replace the css with ms- and me- content respetivelly)
  • text left and right: text-left and text-right (the rule will replace the css with text-start and text-end content respetivelly)
  • border left and right: border-l and border-r (the rule will replace the css with border-is and border-ie content respetivelly)
  • rounded border left and right: rounded-l and rounded-r (the rule will replace the css with rounded-is and rounded-ie content respetivelly)

@vercel
Copy link

vercel bot commented Jan 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Jan 31, 2026 7:13pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Jan 31, 2026 7:13pm
npmx-lunaria Ignored Ignored Jan 31, 2026 7:13pm

Request Review

@danielroe danielroe added this pull request to the merge queue Jan 31, 2026
@danielroe danielroe removed this pull request from the merge queue due to a manual request Jan 31, 2026
@danielroe
Copy link
Member

maybe skip this in ci to save time? not sure of the cost

@userquin
Copy link
Contributor Author

maybe skip this in ci to save time? not sure of the cost

using std-env or process.env.CI?

@userquin
Copy link
Contributor Author

maybe skip this in ci to save time? not sure of the cost

The cost is the same, the rules added are the same at preset-wind4, just the preset registration

@danielroe danielroe enabled auto-merge January 31, 2026 19:14
@danielroe danielroe added this pull request to the merge queue Jan 31, 2026
Merged via the queue into npmx-dev:main with commit ebe4002 Jan 31, 2026
13 checks passed
@userquin userquin deleted the chore-add-css-rtl-detector branch January 31, 2026 19:22
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.

2 participants