Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flex with padding #157

Closed
jkniest opened this issue Nov 20, 2022 · 1 comment
Closed

Flex with padding #157

jkniest opened this issue Nov 20, 2022 · 1 comment

Comments

@jkniest
Copy link

jkniest commented Nov 20, 2022

Heyho,

when using flex to render columns besided each other and then applying padding to each of the boxes causes a weird result.

Working, without padding

        render(<<<HTML
            <div class="flex mt-1 justify-evenly">
                <span class="flex-1 bg-green-100">
                    Today:
                </span>
                <span class="flex-1 bg-green-200">
                    Tomorrow:
                </span>
            </div>
        HTML);

CleanShot 2022-11-20 at 02 41 23


But when applying padding to the boxes they are not properly aligned anymore:

        render(<<<HTML
            <div class="flex mt-1 justify-evenly">
                <span class="flex-1 bg-green-100 p-1">
                    Today:
                </span>
                <span class="flex-1 bg-green-200 p-1">
                    Tomorrow:
                </span>
            </div>
        HTML);

CleanShot 2022-11-20 at 02 41 34

Did I something wrong? I will try to look into the library to figure it out, but maybe I'm just using it wrong 😅 Thanks for the awesome library!

@xiCO2k
Copy link
Collaborator

xiCO2k commented Nov 21, 2022

Hey @jkniest I think if you go with just px-1 it should work, multi line flex is not yet supported :(

@xiCO2k xiCO2k closed this as completed Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants