Skip to content

Commit 8c3621b

Browse files
authored
fix: stacked inline fieldset styling (#1310)
1 parent 07b01a1 commit 8c3621b

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

src/unfold/static/unfold/css/styles.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/unfold/templates/admin/edit_inline/stacked.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ <h2 id="{{ inline_admin_formset.formset.prefix }}-heading" class="inline-heading
1717
{{ inline_admin_formset.formset.management_form }}
1818
{% include "unfold/helpers/messages/error.html" with errors=inline_admin_formset.formset.non_form_errors %}
1919

20-
<div class="border border-base-200 mb-6 overflow-hidden rounded-default shadow-xs w-full dark:border-base-800 *:border-t *:first:border-t-0 *:border-base-200 dark:*:border-base-800"
20+
<div class="border border-base-200 mb-6 overflow-hidden rounded-default shadow-xs w-full dark:border-base-800 *:border-t first-of-type:border-t-0 *:border-base-200 dark:*:border-base-800"
2121
{% if inline_admin_formset.opts.ordering_field %}
2222
data-ordering-field="{{ inline_admin_formset.opts.ordering_field }}" x-on:end="sortRecords" x-sort.ghost
2323
{% endif %}>

src/unfold/templates/admin/includes/fieldset.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22

33
<fieldset class="module{% if fieldset.classes %} {{ fieldset.classes }}{% endif %}" {% if stacked != 1 %}x-show="activeTab == 'general'"{% endif %}>
44
{% if fieldset.name and "tab" not in fieldset.classes %}
5-
<h2 class="bg-base-100 font-semibold mb-6 px-4 py-3 rounded-default text-font-important-light text-sm 2xl:-mx-4 dark:bg-white/[.02] dark:text-font-important-dark">
6-
{{ fieldset.name }}
7-
</h2>
5+
{% if stacked == 1 %}
6+
<h2 class="bg-base-50 border-b border-base-200 border-t border-dashed font-semibold text-font-important-light px-3 py-2 dark:text-font-important-dark dark:bg-white/[.02] dark:border-base-800">
7+
{{ fieldset.name }}
8+
</h2>
9+
{% else %}
10+
<h2 class="bg-base-100 font-semibold mb-6 px-4 py-3 rounded-default text-font-important-light text-sm 2xl:-mx-4 dark:bg-white/[.02] dark:text-font-important-dark">
11+
{{ fieldset.name }}
12+
</h2>
13+
{% endif %}
814
{% endif %}
915

1016
{% if fieldset.description %}

src/unfold/templates/admin/login.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ <h1 class="font-semibold mb-10">
6363
{% url 'admin_password_reset' as password_reset_url %}
6464

6565
<div class="submit-row">
66-
<button type="submit" class="bg-primary-600 border border-transparent flex flex-row font-semibold group items-center justify-center py-2 rounded-default text-sm text-white w-full">
66+
<button type="submit" class="bg-primary-600 border border-transparent cursor-pointer flex flex-row font-semibold group items-center justify-center py-2 rounded-default text-sm text-white w-full">
6767
{% translate 'Log in' %}
6868

6969
<span class="material-symbols-outlined ml-2 relative right-0 text-base transition-all group-hover:-right-1">arrow_forward</span>

0 commit comments

Comments
 (0)