zachdaniel / tails

Utilities for working with tailwind classes, like semantic merge, and conditional class lists.
MIT License
81 stars 9 forks source link

Attributes with `-px` do not work #19

Closed ravensiris closed 4 months ago

ravensiris commented 4 months ago

Describe the bug Seems like merging attributes with -px does not work.

To Reproduce

iex(2)> import Tails
Tails
iex(3)> classes(["p-px", "p-4"])
"p-4 p-px"

Expected behavior It would replace a p-px class with p-4

iex(2)> import Tails
Tails
iex(3)> classes(["p-px", "p-4"])
"p-4"

Runtime

zachdaniel commented 4 months ago

Can you show me the tailwind docs on p-px? I can't find it.

ravensiris commented 4 months ago

Sure: Here's the default spacing scale https://tailwindcss.com/docs/customizing-spacing#default-spacing-scale

and here are the docs for padding: https://tailwindcss.com/docs/padding image

zachdaniel commented 4 months ago

I must be blind 😆 thanks. Looks like we'll need to special case px.