Skip to content

Commit 552ee31

Browse files
authored
fix: base colors (#1572)
1 parent 3263e7c commit 552ee31

File tree

7 files changed

+31
-32
lines changed

7 files changed

+31
-32
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/styles.css

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,17 @@
99
}
1010
}
1111

12-
@source inline("bg-white/[.06] border-white/40 h-3 w-3 h-[64px] w-[65px]! left-[65px] {dark:,}text-base-{50,{100..900},950} dark:hover:bg-white/[.06] translate-x-1/4 -translate-y-1/4");
13-
@source inline("{-,}{top,bottom,left,right}-{0..6}");
12+
@source inline("aspect-square bg-white/[.06] border-white/40 h-3 w-3 h-[64px] w-[65px]! left-[65px] {dark:,}text-base-{50,{100..900},950} dark:hover:bg-white/[.06] {-,}translate-{x,y}-{1/2}");
13+
@source inline("{-,}{top,bottom,left,right}-{1/2,0..6} {!,}leading-[38px]");
14+
@source inline("bg-linear-to-{t,r,b,l} from-primary-{50,{100..900..100},950} to-primary-{50,{100..900..100},950}");
1415
@source inline("rounded rounded-{t,r,b,l} rounded-{t,r,b,l}-default");
1516
@source inline("{md:,lg:,2xl:,}relative {md:,lg:,2xl:,}flex {md:,lg:,2xl:,}absolute {md:,lg:,2xl:,}sticky");
16-
@source inline("{-,}m{t,r,b,l,x,y,}-{0..6} {-,}p{t,r,b,l,x,y,}-{0..6}");
17+
@source inline("{-,}m{t,r,b,l,x,y,}-{0..24} {-,}p{t,r,b,l,x,y,}-{0..24}");
1718
@source inline("{md:,lg:,}border-{0,2} {md:,lg:,}border-{t,r,b,l}-{0,2}");
1819
@source inline("{hover:,dark:,}bg-primary-{50,{100..900..100},950}");
1920
@source inline("{hover:,dark:,}border-base-{50,{100..900..100},950} {hover:,dark:,}border-transparent");
2021
@source inline("{hover:,dark:,}bg-base-{50,{100..900..100},950}");
21-
@source inline("{md:,lg:,}w-{1/2,1/3,2/3,1/4,2/4,3/4,1/5,2/5,3/5,4/5,1/6,2/6,3/6,4/6,5/6,1/7,2/7,3/7,4/7,5/7,6/7}");
22+
@source inline("{md:,lg:,}w-{1,1/2,1/3,2/3,1/4,2/4,3/4,1/5,2/5,3/5,4/5,1/6,2/6,3/6,4/6,5/6,1/7,2/7,3/7,4/7,5/7,6/7}");
2223
@source inline("{md:,lg:,}gap-{0.5,{1..12}}");
2324
@source inline("{md:,lg:,}grid-cols-{1..12}");
2425
@source inline("{md:,lg:,}col-span-{1..12}");
@@ -29,7 +30,7 @@
2930
::before,
3031
::backdrop,
3132
::file-selector-button {
32-
border-color: var(--color-gray-200, currentColor);
33+
border-color: var(--color-base-200, currentColor);
3334
}
3435
}
3536

@@ -99,7 +100,7 @@
99100
}
100101

101102
@utility scrollable-top {
102-
@apply after:absolute after:content-[''] after:bg-linear-to-t after:from-gray-100 after:h-4 after:left-0 after:right-0 after:-top-px after:-translate-y-full dark:after:bg-none;
103+
@apply after:absolute after:content-[''] after:bg-linear-to-t after:from-base-100 after:h-4 after:left-0 after:right-0 after:-top-px after:-translate-y-full dark:after:bg-none;
103104
}
104105

105106
@utility md-16 {

src/unfold/templates/admin/nav_sidebar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<div class="relative z-50">
44
<div class="fixed hidden xl:relative xl:block w-[288px] {% element_classes 'navigation_wrapper' %}" x-bind:class="{'xl:hidden!': !sidebarDesktopOpen, 'block!': sidebarMobileOpen}">
5-
<div class="bg-gray-50 relative z-30 dark:bg-gray-900">
5+
<div class="bg-base-50 relative z-30 dark:bg-base-900">
66
<div id="nav-sidebar" class="bg-base-50 border-r border-base-200 bottom-0 fixed max-h-screen top-0 w-[288px] dark:border-base-800 dark:bg-base-900 {% element_classes 'navigation' %}">
77
{% if templates.navigation %}
88
{% include templates.navigation %}

src/unfold/templates/unfold/components/button.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% if variant == "default" %}
44
border border-base-200 bg-white text-font-important-light dark:border-base-700 dark:bg-transparent dark:text-font-important-dark
55
{% elif variant == "secondary" %}
6-
bg-gray-100 border border-transparent dark:bg-base-800
6+
bg-base-100 border border-transparent dark:bg-base-800
77
{% elif variant == "ghost" %}
88
bg-transparent text-font-important-light dark:text-font-important-dark
99
{% else %}

src/unfold/templates/unfold/components/card.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<{% if href %}a href="{{ href }}"{% else %}div{% endif %} class="bg-white block border border-base-200 flex flex-col grow overflow-hidden p-6 relative rounded-default shadow-xs dark:bg-base-900 dark:border-base-800 {% if href %}cursor-pointer transition-all hover:border-base-300 hover:shadow-md hover:shadow-base-200 dark:hover:border-base-700 dark:hover:shadow-base-800/50 {% endif %}{% if class %} {{ class }}{% endif %}">
1+
<{% if href %}a href="{{ href }}"{% else %}div{% endif %} class="bg-white block flex flex-col grow overflow-hidden p-6 relative rounded-default shadow-xs dark:bg-base-900 dark:border-base-800 {% if not disable_border %}border border-base-200 {% else %}shadow-base-500/20{% endif %} {% if href %}cursor-pointer transition-all hover:border-base-300 hover:shadow-md dark:hover:border-base-700 dark:hover:shadow-base-800/50 {% endif %}{% if class %} {{ class }}{% endif %}">
22
{% if title %}
33
<h2 class="border-b border-base-200 font-semibold mb-6 -mt-6 -mx-6 py-4 px-6 text-[15px] text-font-important-light dark:text-font-important-dark dark:border-base-800">
44
{{ title }}
55
</h2>
66
{% endif %}
77

8-
<div class="grow relative {% if icon %} pl-6{% endif %}">
8+
<div class="grow relative{% if icon %} pl-8{% endif %}">
99
{{ children }}
1010

1111
{% if label %}
@@ -15,7 +15,7 @@ <h2 class="border-b border-base-200 font-semibold mb-6 -mt-6 -mx-6 py-4 px-6 tex
1515
{% endif %}
1616

1717
{% if icon %}
18-
<span class="material-symbols-outlined absolute -left-6 text-base-300 top-1/2 -translate-x-1/3 -translate-y-1/2 text-6xl! dark:text-base-500">{{ icon }}</span>
18+
<span class="material-symbols-outlined absolute -left-6 text-base-300 top-1/2 -translate-x-1/3 -translate-y-1/2 text-6xl! dark:text-base-500 {{ icon_class }}">{{ icon }}</span>
1919
{% endif %}
2020
</div>
2121

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
1-
<div class="{% if class %}{{ class }}{% endif %}">
2-
<div class="flex flex-col gap-2 relative">
3-
<div class="flex flex-row relative z-20">
4-
{% if title %}
5-
<h3 class="text-font-important-light dark:text-font-important-dark text-sm">
6-
{{ title }}
7-
</h3>
8-
{% endif %}
9-
10-
{% if description %}
11-
<strong class="bg-base-100 font-medium text-font-important-light ml-auto px-1.5 py-1 rounded-default text-xs dark:text-font-important-dark dark:bg-base-800">
12-
{{ description }}
13-
</strong>
14-
{% endif %}
15-
</div>
1+
<div class="flex flex-col gap-2 relative w-full {% if class %}{{ class }}{% endif %}">
2+
<div class="flex flex-row relative z-20">
3+
{% if title %}
4+
<h3 class="text-font-important-light dark:text-font-important-dark text-sm">
5+
{{ title }}
6+
</h3>
7+
{% endif %}
168

17-
{% if value %}
18-
<div class="bg-gray-100 overflow-hidden rounded-default dark:bg-base-800">
19-
<div class="h-1.5 bg-primary-600 rounded-default z-10 dark:bg-primary-500" title="{{ value }}%" style="width: {{ value }}%"></div>
20-
</div>
9+
{% if description %}
10+
<strong class="bg-base-100 font-medium text-font-important-light ml-auto px-1.5 py-1 rounded-default text-xs dark:text-font-important-dark dark:bg-base-800">
11+
{{ description }}
12+
</strong>
2113
{% endif %}
2214
</div>
15+
16+
{% if value %}
17+
<div class="bg-base-100 overflow-hidden rounded-default dark:bg-base-800">
18+
<div class="h-1.5 bg-primary-600 rounded-default z-10 dark:bg-primary-500 {{ progress_class }}" title="{{ value }}%" style="width: {{ value }}%"></div>
19+
</div>
20+
{% endif %}
2321
</div>

src/unfold/templates/unfold/widgets/clearable_file_input_small.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="flex flex-row">
44
<div class="{{ widget.file_wrapper_class }}">
55
{% if widget.is_initial and not widget.required %}
6-
<div class="bg-base-50 border-r border-base-200 flex flex-none items-center self-stretch px-3 dark:bg-base-900 dark:border-r-gray-700">
6+
<div class="bg-base-50 border-r border-base-200 flex flex-none items-center self-stretch px-3 dark:bg-base-900 dark:border-r-base-700">
77
<label for="{{ widget.checkbox_id }}" class="flex items-center">
88
<input type="checkbox"{% if widget.class %} class="{{ widget.class }}"{% endif %} name="{{ widget.checkbox_name }}" id="{{ widget.checkbox_id }}" />
99

0 commit comments

Comments
 (0)