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

Order utilities clockwise where applicable #10947

Closed
wants to merge 6 commits into from

Conversation

thecrypticace
Copy link
Contributor

Fixes tailwindlabs/prettier-plugin-tailwindcss#147

We're gonna change things so the appropriate inset, padding, margin, etc… utilities are in a clockwise sort order.

[['end', ['inset-inline-end']]],
[['bottom', ['bottom']]],
[['left', ['left']]],
[['start', ['inset-inline-start']]],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we should keep start and end as-is? This change would sort it end first then start which seems odd? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. Yo @adamwathan what do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I put them there on purpose but doing some more research, it looks like the logical ones will be flipped when/if that’s ever supported:

image

So we should go top, right, inline-start, bottom, left, inline-end I think.

@adamwathan
Copy link
Member

Kinda second guessing some of this a bit, I think I would hate for pr-* to be sorted before pl-*. I think we should have an opinion about this in Tailwind but not convinced it should be TRBL 👀

@teddybradford
Copy link
Contributor

teddybradford commented Apr 8, 2023

A different approach could be to sort from

  • inline-axis to block-axis
  • inline-start to inline-end
  • block-start to block-end

and

  • x-axis to y-axis
  • left to right
  • top to bottom

(or, similarly, y-axis grouping followed by x-axis grouping).

@adamwathan
Copy link
Member

The people have spoken! Let's do:

  • top
  • bottom
  • inline-start
  • left
  • inline-end
  • right

image

@kachkaev
Copy link
Contributor

kachkaev commented May 9, 2023

👋 @thecrypticace, what is the current status of this PR? Happy to help with testing, if needed! Poll results above make sense actually, so the order does not have to be clockwise.

@thecrypticace
Copy link
Contributor Author

I'll re-open this PR once we've worked through the decisions we want to make here.

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.

5 participants