Closed MarkAlexanderDev closed 1 year ago
From what I can tell, this behavior comes from react-pdf itself, not react-pdf-tailwind - this package is just responsible for converting Tailwind-style strings to style objects. Though I agree row being the default makes sense, imo it shouldn't be handled in this package.
This is because react-pdf uses yoga under the hood, which uses some defaults that differ from the web standard (flex-direction
defaulting to column
being one of them). I think I'll follow these "quirks" for now in this package as well, rather than overriding them, as other tailwind wrappers for yoga based layouts (like NativeWind for React Native) do the same.
The "flex" property in tailwind is supposed to give the row layout by default, with this package, we have to extra specify "flex-row" property to have the row layout.