Skip to content

Commit b662dca

Browse files
Fix ui.log background color being tinted by inner element (#5831)
### Motivation Fixes #5828. Applying Tailwind `bg-*` classes to `ui.log` results in "dirty" colors (e.g. `bg-white` shows as #F8FAFC instead of pure white) because a semi-transparent `background-color: rgba(127, 159, 191, 0.05)` on the inner `.q-scrollarea__container` blends on top of the user-specified background. ### Implementation Move the default `background-color` from `.nicegui-log .q-scrollarea__container` to `.nicegui-log` itself. This way, user-applied `bg-*` classes on the log element win via CSS specificity, cleanly overriding the default tint instead of being layered underneath it. ### Progress - [x] I chose a meaningful title that completes the sentence: "If applied, this PR will..." - [x] The implementation is complete. - [x] This is not a security issue. - [x] Pytests are not necessary. - [x] Documentation is not necessary.
1 parent 1fd3345 commit b662dca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nicegui/static/nicegui.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,11 @@
212212
}
213213
.nicegui-log {
214214
outline: 1px solid rgba(127, 159, 191, 0.15);
215+
background-color: rgba(127, 159, 191, 0.05);
215216
}
216217
.nicegui-log .q-scrollarea__container {
217218
scroll-padding-bottom: 0.5rem;
218219
scroll-snap-type: y proximity;
219-
background-color: rgba(127, 159, 191, 0.05);
220220
}
221221
.nicegui-log .q-scrollarea__content {
222222
white-space: pre;

0 commit comments

Comments
 (0)