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

Custom markdown styles not working? #8287

Closed
bpasero opened this issue Jun 28, 2016 · 11 comments
Closed

Custom markdown styles not working? #8287

bpasero opened this issue Jun 28, 2016 · 11 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug markdown Markdown support issues verification-found Issue verification failed verified Verification succeeded
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Jun 28, 2016

Refs: #7945

I tried to configure a custom CSS with 3 different approaches:

  • relative file
  • absolute file path
  • URL

I do not seem to get it to work:

image

@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug markdown Markdown support issues labels Jun 28, 2016
@sandy081
Copy link
Member

It does not seem to work to me neither

@kieferrm
Copy link
Member

I improved the documentation in the user settings. You can use URLs like file:///your file path or http://.... I also made a couple changes to ensure we look workspace relative if there is an open workspace.

@bpasero
Copy link
Member Author

bpasero commented Jul 1, 2016

@kieferrm
Copy link
Member

kieferrm commented Jul 1, 2016

What I'm seeing is that the stylesheet is correctly added to the html page that is being displayed. When I open the dev tools inside the webview, the stylesheets don't seem to have any content. However, this only seems to be true for those gist urls. When setting http://www.krumplr.com/stylesheets/all.css as a custom stylesheet, the preview changes accordingly.

@kieferrm
Copy link
Member

kieferrm commented Jul 1, 2016

The issue is that GitHub responses with X-Frame-Options: deny. The question is 'What is a good way to help people figuring this out?'.

@kieferrm kieferrm closed this as completed Jul 1, 2016
@bpasero
Copy link
Member Author

bpasero commented Jul 2, 2016

Ah ok, sorry about that...

@bpasero bpasero added the verified Verification succeeded label Jul 4, 2016
@wghglory
Copy link

@kieferrm @bpasero @sandy081 I figured out a way. If you paste your gist url(i.e https://gist.githubusercontent.com/wghglory/9b6e502a0c81d135e83fce87be83a18c/raw/7a9bdd06e9f2fe4a53d84900d5ac77912f939873/github-markdown.css) here: https://rawgit.com, it will generate a new url for you. You can paste that into your settings.json.

"markdown.styles": [
    // your gist url, not working
    // "https://gist.githubusercontent.com/wghglory/9b6e502a0c81d135e83fce87be83a18c/raw/7a9bdd06e9f2fe4a53d84900d5ac77912f939873/github-markdown.css"

    // use this generated new url
    "https://cdn.rawgit.com/wghglory/9b6e502a0c81d135e83fce87be83a18c/raw/7a9bdd06e9f2fe4a53d84900d5ac77912f939873/github-markdown.css"
],

@Molunerfinn
Copy link

In macOS, the file:///your file path seems not working....

@wghglory
Copy link

@Molunerfinn use file:/your path

@Molunerfinn
Copy link

@wghglory still not working....

@kieferrm
Copy link
Member

kieferrm commented Aug 8, 2017

@Molunerfinn I use the following in my settings:

"markdown.styles": [
        "/Users/kieferrm/Development/markdown.css"
    ]

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug markdown Markdown support issues verification-found Issue verification failed verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants