Admin dark-mode properly done

This commit is contained in:
Dariusz Niemczyk 2023-07-11 18:12:12 +02:00
parent af1be4aca7
commit 878f246b08
No known key found for this signature in database
GPG Key ID: 28DFE7164F497CB6
4 changed files with 36 additions and 3 deletions

View File

@ -1,4 +1,38 @@
/* django-admin CSS patches */ /* django-admin CSS patches */
.select2-container { .select2-container {
min-width: 400px; min-width: 400px;
}
@media (prefers-color-scheme: dark) {
/* Change the appearence of the bakground colour surrounding the search input field */
.select2-search {
background-color: #343a40 !important;
}
/* Change the appearence of the search input field */
.select2-search input {
color: #ffffff !important;
background-color: #343a40 !important;
}
/* Change the appearence of the search results container */
.select2-results {
background-color: #343a40 !important;
}
/* Change the appearence of the dropdown select container */
.select2-container .select2-selection {
border-color: #6c757d !important;
color: #ffffff !important;
background-color: #343a40 !important;
}
/* Change the caret down arrow symbol to white */
.select2-container .select2-selection__arrow b {
border-color: #fff transparent transparent transparent !important;
}
/* Change the color of the default selected item i.e. the first option */
.select2-container .select2-selection--single .select2-selection__rendered {
color: #ffffff !important;
}
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -72,6 +72,7 @@
{% block content %} {% endblock %} {% block content %} {% endblock %}
</div> </div>
{% endblock %} {% endblock %}
<script src="{% static 'js/jquery.min.js' %}"></script>
<script src="{% static 'js/bootstrap.min.js' %}"></script> <script src="{% static 'js/bootstrap.min.js' %}"></script>
</body> </body>
</html> </html>