jaredh159 / tailwind-react-native-classnames

simple, expressive API for tailwindcss + react-native
2.08k stars 84 forks source link

Wrong limits for breakpoints? #223

Closed rborn closed 9 months ago

rborn commented 1 year ago

I think the breakpoints are calculated wrong? My understanding is that they should include the min value in the "next" range and not exclude it?

Eg:

breakpoint:1024px will consider before breakpoint if width <= 1024 but it should be width < 1024

rborn commented 1 year ago

@jaredh159 PS: I can make a PR if you agree with the above 🤗

jaredh159 commented 1 year ago

hmmm... yeah, maybe we're doing it wrong. are you sure you're clear on how tailwind utils handle these? i think we'd want to carefully match their default behavior. if you can verify that we're not matching the correct behavior, then yeah, i'd definitely be open to a PR. ...although it makes me sort of wonder if it should be considered a breaking change, in case anyone's apps are relying on the old behavior 😬

rborn commented 1 year ago

I tested with their playground resizing the screen and it does it as I say 😁 The screens are basically media queries which use min-width: 576px.

I will prepare a PR and maybe we increase to v4 🤣