tulios / json-viewer

It is a Chrome extension for printing JSON and JSONP.
https://chrome.google.com/webstore/detail/json-viewer/gbmdgpbipfallnflgajpaliibnhdgobh
MIT License
3.33k stars 680 forks source link

Background color not covering background anymore #268

Closed voltaek closed 3 years ago

voltaek commented 3 years ago

Plugin v0.18.0, Chrome v87.0.4280.66, Windows Server 2019 Standard v1809 (Windows 10 equivalent).

I recently clicked the Update Extensions button (under Extensions when in Developer Mode) in Chrome the other day, and then this issue showed up, so I suspect I was running an older version of the extension for awhile.

Now when a page JSON loads up the background color only covers down to where the content is, instead of the entire background of the page like it used to do. This makes the buttons along the right difficult to see, as they are styled with the intention of being overtop a dark background, plus the obvious white screen instead of dark like I expect with a dark theme. You can see in my attached image that I'm hovering over one of the buttons that would normally be almost impossible to see.

Taking a quick look at the styling, it looks like adding min-height: 100vh; to the .CodeMirror-scroll CSS class would solve the issue. I'd submit a PR, but I can't seem to locate where this CSS rule is located in the styling files.

json_ext_issue

jomiva commented 3 years ago

image It's happening to me aswell

silviohfc commented 3 years ago

Taking a quick look at the styling, it looks like adding min-height: 100vh; to the .CodeMirror-scroll CSS class would solve the issue. I'd submit a PR, but I can't seem to locate where this CSS rule is located in the styling files.

Thanks for the hint, i'm having the same problem.

voltaek commented 3 years ago

Looks like a PR has been merged that fixes this issue, but an update to the extension has not been pushed out, yet. Their fix is to add this:

body, html {
    height: 100%;
}

While we wait for a release, you can add the fix to the Custom Style section of the plugin's Options, same as I'd done with my quick-fix styling.

marcusyoda commented 3 years ago

image

html,
body {
  height: 100%;
}

.CodeMirror {
  min-height: 100%;
  font-family: monaco, Consolas, Menlo, Courier, monospace;
  font-size: 16px;
  line-height: 1.5em;
}
tulios commented 3 years ago

Version 0.18.1 with the fix was already submitted for review and it will be automatically published once it's done.

tulios commented 3 years ago

The version was released.