jrief / django-formset

The missing widgets and form manipulation library for Django
https://django-formset.fly.dev/
MIT License
317 stars 30 forks source link

!important styles break my styling #154

Closed boosh closed 1 month ago

boosh commented 1 month ago

Hi @jrief, some styles are marked !important which makes it difficult for me to override them, since they don't seem to work correctly. I need to disable them

https://github.com/jrief/django-formset/blob/964faf74e9a9ef9ad58522bf2bdd21f78c61aff8/client/django-formset/DjangoFormset.scss#L135

They cause checkboxes and radio buttons to be off-centre:

Screenshot 2024-07-23 at 11 14 37

It'd be good if styles could either be removed entirely (so we can define our own CSS completely) or have any !important styles removed.

boosh commented 1 month ago

Actually I can work around it with this, but I have to put it on every page with the form:

    <style>
         html django-formset [role=group] input,
         html django-formset [role=group] [role=textbox] {
            background-repeat: no-repeat !important;
            background-position: center center !important;
            background-origin: padding-box !important;
        }
    </style>
boosh commented 1 month ago

I'll close this, but FYI