Skip to content

luci-theme-bootstrap: unbound darkmode file editor #7744

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JimMatthew
Copy link
Contributor

Add css to make the Unbound file editor have a dark background when using Bootstrap dark mode theme.
Currently the unbound file editor has a yellowish background, even in dark mode. This makes the background dark.
I am not sure if this is the best way to do this but the change is fairly straightforward.

Let me know if this is something you are interested in or if there are any changes you would like made.

Current:
Screenshot 2025-04-22 090611

After change:
Screenshot 2025-04-22 090024

Change the file editor background in Unbound when using Bootstrap dark theme

Signed-off-by: JimMatthew <[email protected]>
@systemcrash
Copy link
Contributor

This looks OK - but all of the themes should be updated synonymously.

@JimMatthew
Copy link
Contributor Author

This looks OK - but all of the themes should be updated synonymously.

I am not really sure what you mean, can expand on that?

@systemcrash
Copy link
Contributor

You've only updated one theme. There are 3 other.s

@Ramon00
Copy link
Contributor

Ramon00 commented Apr 26, 2025

i thought only bootstrap had a light/dark mode?

@@ -2621,3 +2621,7 @@ div.cbi-value var.cbi-tooltip-container,
[data-darkmode="true"] [data-page="admin-status-realtime-connections"] #view > div > div > div > svg > line[style] {
stroke: #fff!important;
}

[data-darkmode="true"] .cbi-input-textarea {
background-color: var(--background-color-high);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The background color is already switched between light and dark (or well it should be). So why do we need to add another conditional define here? I guess maybe it is better to assign the background color higher up in the (parent) CSS structure?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its because in the unbound package, the background is getting set manually
style>
textarea
{
background-color: #fffff0;
font-family: monospace;
}
</style>
https://github.com/openwrt/luci/blob/master/applications/luci-app-unbound/luasrc/view/unbound/css-editing.htm

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it not make more sense to just remove the background-color: #fffff0; ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah it would make more sense to do it that way. I just assumed the package author put it there for a reason (they wanted an ivory background) , so wasn't sure what the best thing to do would be.

@jow-
Copy link
Contributor

jow- commented Apr 30, 2025

Just remove the style overrides and let unbound use the default styles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants