joeyespo / grip

Preview GitHub README.md files locally before committing them.
MIT License
6.47k stars 424 forks source link

Style doesn't look like GitHub for Code Blocks / Inline Code #385

Open luckylinux opened 4 months ago

luckylinux commented 4 months ago

I really like the idea of this Project !

Unfortunately, however, the rendered README.md isn't quite close to what it is on GitHub.com.

Is there some additional Configuration required with Regards to CSS / Stylesheets ?

Example with grip (locally): image

Example on github.com (remotely): image

The code Highlighting / Markup (greyed-box for Code Blocks & Inline Code) is particularly missing :cry:.

<code> CSS Inspect looks different.

Locally <code> CSS: image

Remotely <code> CSS: image

Particularly --bgColor-neutral-muted appears to NOT be used by grip.

Stylesheet Issue ?

sebkolind commented 4 months ago

I am having the same issue - it seems that this have been an issue in the past #349 among other issues. I am on version 4.6.2.

jrolfs commented 4 months ago

@sebkolind I think you mean 4.6.1 which is the latest release? Anyway, I'm also seeing the same issue on 4.6.1 on macOS.

sebkolind commented 4 months ago

@jrolfs ah yes, a typo :)

ventz commented 3 months ago

Seeing the same issue on stable 4.6.2 (from brew)

url "https://files.pythonhosted.org/packages/f4/3f/e8bc3ea1f24877292fa3962ad9e0234ad4bc787dc1eb5bd08c35afd0ceca/grip-4.6.2.tar.gz"

% brew info grip       
==> grip: stable 4.6.2 (bottled)
GitHub Markdown previewer
https://github.com/joeyespo/grip
Installed
/opt/homebrew/Cellar/grip/4.6.2_6 (934 files, 11.0MB) *
  Poured from bottle using the formulae.brew.sh API on 2024-06-04 at 20:57:14
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/g/grip.rb
License: MIT
==> Dependencies
Required: certifi ✔, python@3.12 ✔
fabianomartinsrj commented 3 months ago

Same issue here.

▶ brew info grip
==> grip: stable 4.6.2 (bottled)
GitHub Markdown previewer
https://github.com/joeyespo/grip
Installed
/usr/local/Cellar/grip/4.6.2_6 (738 files, 7.9MB) *
  Poured from bottle using the formulae.brew.sh API on 2024-06-16 at 20:17:28
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/g/grip.rb
License: MIT
==> Dependencies
Required: certifi ✔, python@3.12 ✔
wamry commented 2 months ago

what is the latest version that doesn't have this issue?

fabien-ors commented 1 month ago

Thank you for this very good package!

I confirm the issue using fresh installation of grip 4.6.2 on ubuntu-latest github runner (Ubuntu 22.04, python 3.10.12). I obtain the following HTML file (no background color for code blocks, links not underlined and not colored): https://soft.mines-paristech.fr/gstlearn/latest/R_README.html The corresponding github Markdown file is the following: https://github.com/gstlearn/gstlearn/blob/zenodo_cfg/r/README.md

Please, let me know if there exists a workaround or if I can help to fix the issue.

Jach commented 5 days ago

I worked around this with the Stylus browser extension. (Available for Firefox and Chrome.) I made a new style for localhost:6419 and took the first block of attributes from the light theme specified in https://github.githubassets.com/assets/light-3e154969b9f9.css and pasted them into a Stylus script as :root. i.e.

:root {
  --topicTag-borderColor: #ffffff00;
  --highlight-neutral-bgColor: #fff8c5;
  --page-header-bgColor: #f6f8fa;
...rest of them...
}

Now I have colors again.