CSS Window border, how to disable when maximized.
-
Hey all,
Currently I have a simple mod that is as follows:
body { border: 1px solid var(--colorAccentBg) }
Only downside is, when watching a YouTube video fullscreen or when I maximize the browser, the border is still there.
Do any of you geniuses know if it is possible to not see the border when my window is maximized?
(mod: moved to different forum)
-
@Sojiro84 you can try
#browser:not(.minimal-ui) { border: 1px solid var(--colorAccentBg) !important }
-
@Sojiro84 I didn't see the requirement about maximize, it's quite easy
#browser:not(.minimal-ui):not(.maximized) {border: 1px solid var(--colorAccentBg) !important;}
-
Here is a version that doesn't take away 2px of height and width and instead "overlays" the border on top.
#browser:not(.maximized):not(.minimal-ui):after { content: ''; z-index: 1; height: 100vh; width: 100vw; position: fixed; left: 0; top: 0; pointer-events: none; box-shadow: inset 0 0 0px 1px var(--colorBorderHighlight); }
-
@LonM Nice hack! very smart indeed. LOL
More idea:
Can also add.hasfocus
or.isblurred
to change color/grayout, or show/hide the border on/off focus. -
Ppafflick moved this topic from Modifications on