joeyespo/grip

Not seeing some styles in rendered HTML output

ronnyknight45 opened this issue · 5 comments

I have come here from issue #265.

Using Grip 4.5.2 on Windows 10, Python 3.7.3.

The text is formatted with Segoe UI font, but except that all other styles are missing. Code fences and blocks have no background. Even horizontal rules are invisible. A simple check through Chrome's devtools reveals that CSS variables are missing. The cause for the invisible horizontal rule is the same.

image

Also, the terminal says that some of the assets were not found (status 404):

 * Serving Flask app "grip.app" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://localhost:6419/ (Press CTRL+C to quit)
 * Downloading style https://github.githubassets.com/assets/dark_colorblind-b9620813d35e4283a0f56c6d57cc11a8.css
 * Downloading style https://github.githubassets.com/assets/light_colorblind-cad30aeba0ae8a3e35bf7d4aba269ef3.css
 * Downloading style https://github.githubassets.com/assets/frameworks-ba9810e93b48f059907ab0a05f061068.css
 * Downloading style https://github.githubassets.com/assets/behaviors-a1277498f1c8f25dc5b980448a0d3a9e.css
 * Downloading style https://github.githubassets.com/assets/github-3748c4f16e53e8fe8ce3ece0cc195f65.css
 * Cached all downloads in C:\Users\ronnyk\.grip\cache-4.5.2
127.0.0.1 - - [11/Nov/2021 14:31:11] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [11/Nov/2021 14:31:11] "GET /__/grip/static/octicons/octicons.css HTTP/1.1" 200 -
127.0.0.1 - - [11/Nov/2021 14:31:11] "GET /__/grip/asset/behaviors-a1277498f1c8f25dc5b980448a0d3a9e.css HTTP/1.1" 200 -
127.0.0.1 - - [11/Nov/2021 14:31:11] "GET /__/grip/asset/frameworks-ba9810e93b48f059907ab0a05f061068.css HTTP/1.1" 200 -
127.0.0.1 - - [11/Nov/2021 14:31:11] "GET /__/grip/asset/github-3748c4f16e53e8fe8ce3ece0cc195f65.css HTTP/1.1" 200 -
127.0.0.1 - - [11/Nov/2021 14:31:11] "GET /__/grip/asset/light_colorblind-cad30aeba0ae8a3e35bf7d4aba269ef3.css HTTP/1.1" 200 -
127.0.0.1 - - [11/Nov/2021 14:31:11] "GET /__/grip/asset/dark_colorblind-b9620813d35e4283a0f56c6d57cc11a8.css HTTP/1.1" 200 -
127.0.0.1 - - [11/Nov/2021 14:31:12] "GET /__/grip/static/octicons/octicons.woff2?ef21c39f0ca9b1b5116e5eb7ac5eabe6 HTTP/1.1" 200 -
127.0.0.1 - - [11/Nov/2021 14:31:12] "GET /__/grip/asset/github-1d61350ad1dfbdc0e085df72d70a29ff.css.map HTTP/1.1" 404 -
127.0.0.1 - - [11/Nov/2021 14:31:12] "GET /__/grip/asset/dark_colorblind-acb84a1637d08c8e4fd17c21855d3105.css.map HTTP/1.1" 404 -
127.0.0.1 - - [11/Nov/2021 14:31:12] "GET /__/grip/asset/frameworks-d7c20d168f76d68b5aa5719438dd2d0f.css.map HTTP/1.1" 404 -
127.0.0.1 - - [11/Nov/2021 14:31:12] "GET /__/grip/static/favicon.ico HTTP/1.1" 200 -
127.0.0.1 - - [11/Nov/2021 14:31:12] "GET /__/grip/asset/behaviors-7dc2e61f657d2499a753805818e19bc7.css.map HTTP/1.1" 404 -
127.0.0.1 - - [11/Nov/2021 14:31:12] "GET /__/grip/asset/light_colorblind-c3a606c4babf2cea1a199c666bfaea3a.css.map HTTP/1.1" 404 -

Chrome's console says the same.

image

I've tried clearing the cache multiple times. Not behind any proxy.

I'm getting the same issue. Which caused my tables to render without borders.

image

I believe those errors are unrelated. See this on stackoverflow. However, I am also not getting the styles I would expect. Basically just black text on white. You can see a partial workaround in #348.

I had the same issue, using Using Grip 4.5.2 on Linux, Python 3. I turned to use a local css grip-style.css as workaround. Ref: #333

It looks like assets/light-13dc275a3a314268790358e25956033c.css is not being loaded.

Adding STYLE_URLS = ["https://github.com/assets/light-13dc275a3a314268790358e25956033c.css"] to settings.py as a workaround, but the hash may change later.

Version 4.6.0 has just been released with the remaining fixes to this issue. The problem was that the regular expression used to find the CSS files skipped over <style> elements immediately following a match (e.g. no newlines). See this commit for more details.

Try upgrading now with pip install --upgrade grip and hard-refreshing the page with a fresh run.

And thanks for your patience. Feel free to re-open if there's still problems with missing styles.