question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

luci-theme-openwrt-2020 - unnecessary limited page width

See original GitHub issue

The openwrt-2020 theme artificially limits the entire page width to 1366px, this is unnecessary and makes the theme look dated. None of the other themes do this. Removing the max-width limitation IMO makes the theme look a lot nicer on larger screen sizes. Patch follows.

diff --git a/themes/luci-theme-openwrt-2020/htdocs/luci-static/openwrt2020/cascade.css b/themes/luci-theme-openwrt-2020/htdocs/luci-static/openwrt2020/cascade.css
index 1a276c49..8da5eabb 100644
--- a/themes/luci-theme-openwrt-2020/htdocs/luci-static/openwrt2020/cascade.css
+++ b/themes/luci-theme-openwrt-2020/htdocs/luci-static/openwrt2020/cascade.css
@@ -38,7 +38,6 @@
 html {
        height: 100%;
        width: 100%;
-       max-width: 1366px;
        margin: 0 auto;
        background: #fff linear-gradient(90deg, rgba(0, 0, 0, .8), rgba(0, 0, 0 ,.5), rgba(0, 0, 0, .8));
 }

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
sky96111commented, Jun 15, 2021

Sadly, it seems not work for me 😦 It leaves a white blank about 20px on the right side of the authentication interface, also proportion of main content and sidebar is about 1:4, which lead to sidebar presentation vary wide. It looks like rem is not suitable for resolving a non-fixed pixel in different scale ratio. Finally I choose to add

@media only screen and (-webkit-min-device-pixel-ratio: 1.5) {
  html {
    max-width: 2049px;
  }
}

to specify max-width to 1.5 times in HiDPI screens. Obviously, it is not elegant. Actually, remove the limitation may be better choice for me…

1reaction
slimjimsoftwarecommented, Jun 13, 2021

Yeah, that was a sloppy patch, sorry about that. Looking at it closer I agree that setting the right content column to a max width would probably be the nicest solution. Also just to clarify, this issue isn’t so much about the dark background on either side, it’s more that when one sees left side-menus they generally are anchored to the left of the browser window. This is just a personal thing but for me having a dark vertical bar to the left of the left-hand menu feels a little jarring and tends to draw the attention away from the menu. Obviously this is all subjective but I think the theme just looks nicer on larger screens when the menu is anchored left and there’s no dark background, so another solution may be to just do that, remove the background and anchor the whole screen left? It’s by far my favourite theme so would be nice to have it looking great on large screens.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[OpenWrt Wiki] LuCI themes
↓ Name Version Description File size Ins... luci‑theme‑bootstrap git‑22.288.45155‑afd0012 Bootstrap Theme (default)\\ \\ 16kB 15... luci‑theme‑bootstrap git‑20.029.49294‑41e2..8‑1 Bootstrap Theme (default)\\ \\ 11kB 11... luci‑theme‑bootstrap git‑21.252.54297‑fc2f..d‑1 Bootstrap...
Read more >
Luci themes: differences, and how to select active one
Is there any way to set which Luci theme applies, if multiple themes are ... out from the System page (which anyway is...
Read more >
Openwrt as default web LuCI theme - #39 by iambanh2
And so it has to deal with all the hardcoded things that come in the default page templates, including tables and overviews that...
Read more >
19.07 luci-app-ddns page broken with OpenWrt theme
arfett March 14, 2020, 4:28am #1. As the title suggests the luci ddns page (package luci-app-ddns) will not load on a fresh build...
Read more >
OpenWRT code-execution bug puts millions of devices at risk
These code-execution exploits are limited in their scope because adversaries must either be in a position to conduct a man-in-the-middle ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found