Skip to content

Commit 33bb53d

Browse files
authored
fix: SCA filters to adapt better with django unfold (#230)
1 parent d067971 commit 33bb53d

File tree

1 file changed

+28
-19
lines changed

1 file changed

+28
-19
lines changed

surface/sca/templates/views/layout.html

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -102,39 +102,48 @@
102102
crossorigin="anonymous"
103103
referrerpolicy="no-referrer"></script>
104104
<style>
105-
.ui.segment, .ui.segment * {
106-
color: var(--unfold-foreground, inherit) !important;
105+
:root {
106+
--ui-control-background: var(--color-base-0, #ffffff);
107+
--ui-control-foreground: var(--color-base-900, #0f172a);
108+
--ui-control-border: var(--color-base-200, #cbd5f5);
107109
}
108-
/* Transparent background, themed text and border for form fields */
110+
111+
.dark {
112+
--ui-control-background: var(--color-base-900, #0f172a);
113+
--ui-control-foreground: var(--color-base-0, #f8fafc);
114+
--ui-control-border: var(--color-base-700, #475569);
115+
}
116+
109117
.ui.form input,
110118
.ui.form select,
111119
.ui.form textarea {
112-
background: transparent !important;
113-
color: var(--unfold-foreground, inherit) !important;
114-
border: 1px solid var(--unfold-foreground, #ccc) !important;
120+
background: var(--ui-control-background) !important;
121+
color: var(--ui-control-foreground) !important;
122+
border: 1px solid var(--ui-control-border) !important;
115123
}
116-
/* Semantic UI dropdowns: themed border and text, translucent when expanded */
124+
117125
.ui.selection.dropdown,
118126
.ui.selection.dropdown .menu {
119-
border: 1px solid var(--unfold-foreground, #ccc) !important;
120-
background: transparent !important;
121-
color: var(--unfold-foreground, inherit) !important;
127+
border: 1px solid var(--ui-control-border) !important;
128+
background: var(--ui-control-background) !important;
129+
color: var(--ui-control-foreground) !important;
122130
transition: background 0.2s;
123131
}
124-
.ui.selection.active.dropdown .menu {
125-
background: rgba(197, 202, 210, 0.5) !important;/* Subtle translucent color when expanded */
126-
color: var(--unfold-foreground, inherit) !important;
132+
133+
.ui.selection.dropdown .menu .item {
134+
background: var(--ui-control-background) !important;
135+
color: var(--ui-control-foreground) !important;
127136
}
128-
129-
.ui.selection.active.dropdown .menu .item:hover,
130-
.ui.selection.active.dropdown .menu .selected.item,
137+
138+
.ui.selection.dropdown .menu .item:hover,
131139
.ui.selection.dropdown .menu .item:active {
132-
background: rgba(50, 130, 246, 0.75) !important; /* Subtle blue highlight on hover/active */
133-
color: var(--unfold-foreground, inherit) !important;
140+
background: var(--color-primary-500) !important;
141+
color: #f8fafc !important;
134142
}
143+
135144
.ui.selection.dropdown > .text,
136145
.ui.dropdown > .text {
137-
color: var(--unfold-foreground, inherit) !important;
146+
color: var(--ui-control-foreground) !important;
138147
}
139148
</style>
140149
{% endblock %}

0 commit comments

Comments
 (0)