Skip to content
Discussion options

You must be logged in to vote

With Tailwind CSS, you shouldn't construct class names dynamically. Even though this will work here since you are using the browser CDN, it may cause problems down the line.

Specifically here, I'd use the style attribute to set the transform property: https://jsfiddle.net/4kpacyrj/
This allows you to explicitly set the order you desire.

Tailwind's rotate-* and translate-* class names set rotate and translate CSS properties respectively. There does not seem to be a way to reorder how these are applied - the order is explicitly defined in the spec:

  1. Translate by the computed X, Y, and Z values of translate.
  2. Rotate by the computed about the specified axis of rotate.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ajl20
Comment options

Answer selected by ajl20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants