Skip to content

Commit

Permalink
fix: Minimum width for select2 box (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun authored Mar 21, 2024
1 parent 6a6ee2a commit b9d5ebe
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions djangocms_frontend/contrib/badge/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class Meta:
badge_text = forms.CharField(
label=_("Badge text"),
max_length=255,
widget=forms.TextInput(attrs={"class": "js-prepopulate-selected-text"}),
)
badge_context = forms.ChoiceField(
label=_("Context"),
Expand Down
1 change: 1 addition & 0 deletions djangocms_frontend/contrib/link/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ class Meta:
name = forms.CharField(
label=_("Display name"),
required=False,
widget=forms.TextInput(attrs={"class": "js-prepopulate-selected-text"}),
)
template = forms.ChoiceField(
label=_("Layout"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
{{ block.super }}
<style> {# Bugfix for Django admin styling #}
@media screen {
.change-form .select2-dropdown {
background: var(--body-bg);
border: 1px solid var(--border-color);
.change-form .select2-dropdown {
background: var(--body-bg);
border: 1px solid var(--border-color);
}
}
select {
min-width: 160px;
}
}
</style>
<script src="{% static 'djangocms_frontend/js/bundle.link.js' %}"></script>
{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion djangocms_frontend/static/djangocms_frontend/css/base.css

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<fieldset class="module aligned {{ fieldset.classes|cut:"collapse" }}">
{% if fieldset.name and not "collapse" in fieldset.classes %}<h2>{{ fieldset.name }}</h2>{% endif %}
{% if fieldset.name %}<h2>{{ fieldset.name }}</h2>{% endif %}
{% if fieldset.description %}
<div class="description">{{ fieldset.description|safe }}</div>
{% endif %}
Expand Down Expand Up @@ -32,4 +32,3 @@
</div>
{% endfor %}
</fieldset>

4 changes: 1 addition & 3 deletions private/sass/components/_icon-picker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
display: inline-block;
.icon-container {
position: relative;
margin-bottom: 0.5em;
margin-left: auto;
margin-right: auto;
margin: 0.5em auto;
width: 7em;
height: 7em;
border: 1px var(--dca-gray-light, var(--border-color, lightgray)) solid;
Expand Down

0 comments on commit b9d5ebe

Please sign in to comment.