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

My simple (but not perfect) solution for the broken buttons alignment #20

Open
senabo opened this issue Jan 18, 2024 · 0 comments
Open

Comments

@senabo
Copy link

senabo commented Jan 18, 2024

reference to the closed issue #12

I've created a custom mixin with override styles for object-tools block (extra buttons are rendering there)

class CustomExtraButtonsMixin(ExtraButtonsMixin):
    """
    Extra buttons mixin with buttons layout fix.
    """
    class Media:
        css = {
            'all': ('css/admin/extra-buttons/buttons-layout.css',)
        }

and buttons-layout.css:

.object-tools {
    font-size: 0.625rem;
    font-weight: bold;
    /* Disable default styles */
    padding-left: 0;
    float: none;
    position: unset;
    margin-top: 0;

    /* Custom styles to fix layout */
    display: flex;
    flex-wrap: wrap;
    padding-bottom: 16px;
    gap: 16px;
    justify-content: flex-start;
}

@media (max-width: 767px) {
    .object-tools li + li {
        margin-left: 0!important;
    }
}

Result:

Screenshot_20240119_000230

and responsive:

Screenshot_20240119_000421

Originally posted by @senabo in #12 (comment)

@senabo senabo changed the title My simple (but not perfect) solution for broken buttons alignment My simple (but not perfect) solution for the broken buttons alignment Jan 18, 2024
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

1 participant