Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not seeing some styles in rendered HTML output #347

Closed
ronnyknight45 opened this issue Nov 11, 2021 · 5 comments
Closed

Not seeing some styles in rendered HTML output #347

ronnyknight45 opened this issue Nov 11, 2021 · 5 comments
Labels

Comments

@ronnyknight45
Copy link

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.

@paulhayes
Copy link

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

image

@theherk
Copy link

theherk commented Nov 26, 2021

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.

@tkin91e55
Copy link

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

@nicolas17
Copy link

nicolas17 commented Dec 21, 2021

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.

@joeyespo
Copy link
Owner

joeyespo commented Feb 2, 2022

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.

@joeyespo joeyespo closed this as completed Feb 2, 2022
@joeyespo joeyespo added the bug label Feb 2, 2022
wip-sync pushed a commit to NetBSD/pkgsrc-wip that referenced this issue Apr 30, 2024
- Fix "ImportError: cannot import name 'safe_join' from 'flask'" when using Flask 2.1.0+ ([#360](joeyespo/grip#360) - thanks, [@bryce-carson][]!)

- Update output and **fix style issues**
- Add support for **Python 3.7, 3.8, 3.9, 3.10**
- Improve handling of PDFs and other binary files
- Fix deprecation warnings from newer dependency versions

- End-of-life [Python versions](https://devguide.python.org/#status-of-python-branches) no longer intentionally supported
  - Python 2.6, 2.7 (Python 2 compatibility will be removed entirely in the next major release)
  - Python 3.0, 3.1, 3.2, 3.3 ([#275](joeyespo/grip#275) - thanks, [@svisser][]!), 3.4, 3.5, 3.6
- Current [dependency versions](requirements.txt) (more recent versions will be required in the next major release)

- Fix typo in error message ([#266](joeyespo/grip#266) - thanks, [@Godron629][]!)
- Update HTML/CSS scaffold to match GitHub ([#297](joeyespo/grip#297) - thanks, [@phyllisstein][]!)
- Fix tests by adding a missing `USER_CONTEXT` argument to one of the `GitHubRenderer` calls
- Serve non-`text/` MIME types as raw files for better handling of, e.g. PDF files ([#234](joeyespo/grip#234) - thanks, [@wvspee][]!)
- Fix style parsing, which caused some styles to be missing ([#347](joeyespo/grip#347))

- Readme: Update to correct `--no-inline` option ([#267](joeyespo/grip#267) - thanks, [@TomDLT][]!)
- Readme: Fix links to Grip class ([#276](joeyespo/grip#276) - thanks, [@jacebrowning][]!)
- Readme: Clarify that this sends your markdown to GitHub ([#251](joeyespo/grip#251) - thanks, [@courajs][]!)
- Update `pytest` usages (see [pytest 3.0.0 changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst#300-2016-08-18))
- Add `.pytest_cache` to `.gitignore` ([#287](joeyespo/grip#287) - thanks, [@svisser][]!)
- Add `.venv` and `.idea` to `.gitignore` and clean up
- Add `flake8` test dependency and fix linting errors ([#299](joeyespo/grip#299))
- Add `pytest` test dependency ([#294](joeyespo/grip#294) - thanks, [@Methacrylon][]!)
- License: Distribute LICENSE file ([#274](joeyespo/grip#274) - thanks, [@synapticarbors][]!)
- License: Update year
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants