Skip to content

Why is ml-* having no effect inside a space-x-* parent? #2212

Answered by simonswiss
leemason asked this question in Help
Discussion options

You must be logged in to vote

Hi @leemason 👋

  1. Is this a side effect or expected?

It's kinda... both! 😅

Your ml-auto is not being applied because the spacing utility has a higher specificity, as you correctly guessed.

This is an expected side effect of the implementation of the spacing utilities, and the trade-offs were acknowledged with a good deal of details by @adamwathan in the PR implementing these spacing utilities.

If you scroll down to the implementation section, you'll find an elaborate response to your question!

  1. Any suggestions for a different approach if it's expected?

In situations where you need to control "internal spacing", the recommendation is to revert to the "old way" of handling spacing on th…

Replies: 1 comment 1 reply

Comment options

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

Answer selected by simonswiss
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