jsnee / vscode-dmbinder

Visual Studio Code extension for managing campaign documents.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Customizing css for rendering

Grimo0 opened this issue · comments

Hi !

I'm using this extensions for some days now (wonderful work by the way) and i'm currently trying to improve my layout. For this, i add a style tag at the beggining of the doc with my css. But even if it's working within https://homebrewery.naturalcrit.com/ it's not for the pdf rendering.

Any advice on how to make it work ?

PS. Not sure about how to post this but couldn't find a better place (please tell me if there is such and i'll move this right away).

Thank you! I'm glad you can find it useful! I will say that there is some additional style I use on top of what is on the homebrewery site. So it is absolutely possible that the extension has some styles that might be overriding yours, but it should be easy to overcome/figure out what is going on. Also, this is absolutely the correct place to ask questions like that or provide feedback!

Can you provide an example of a style section that you might use (that doesn't seem to show up on the rendered PDF)?
Also, do you happen to know if it shows up on the markdown preview in VS Code (if you hit ctrl+k, v it should pop up a second window with a live preview of your document as it should be rendered)?

Since then i changed my brew and can't find the exact css i was applying but this one doesn't work :

<style>
.phb#p1 { text-align:center; }
.phb#p1:after { display:none; } 
</style>

This should hide the yellow line at the bottom of the first page.

It works within the preview though as you guessed.

By the way, i noticed why doing some tests two bugs with the Automaticaly generate component blocks function but i will post them under an other issue.

I don't have any issues with this:
image

I'd ask three questions:

  • Are you using the latest version of the extension? (Version 0.5.3)
  • Do you have the PDF opened up when you try to render it? (I've had some issues where if I had the PDF open when I render a source file, it fails to overwrite the file since it's in use)
  • Do you see any messages pop up in the bottom right hand corner when you try to render the file? (Might look like the image below)
    image

I take it all back. I know the cause of your issue. It's caused by the other bug you created (#10). The PDF renderer automatically runs the "automatically generate component blocks" when run. I can confirm that if I add an autogenerate block to my document, the styling isn't present in the rendered PDF. I'll close this question and work on your bug right away! :)

Didn't think about that, but it seems logic with the exposed setting.
Thank you for checking it !

Fixes are in and Microsoft is in the process of verifying the updated extension, I'll close the other issue once it goes live! Thanks again! And keep the feedback coming!