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

Missing information for writing user-provided CSS files #189

Open
andy-maier opened this issue Jun 26, 2020 · 1 comment
Open

Missing information for writing user-provided CSS files #189

andy-maier opened this issue Jun 26, 2020 · 1 comment

Comments

@andy-maier
Copy link

I did not find any information about writing user-provided CSS files.

I am not asking for general information about CSS, but instead whatever about CSS is specific to markdown-pdf. For example, the intermediate HTML that is created by markdown-pdf uses HTML elements in certain ways that need to be understood for reasonable CSS style sheets to be written by a user.

@andy-maier andy-maier changed the title Missing CSS documentation Missing information for writing user-provided CSS files Jun 26, 2020
@andy-maier
Copy link
Author

andy-maier commented Jun 26, 2020

To give one practical example where it is necessary to understand this:

Adding this to the CSS file:

table, tr, th, td {
    border: 1px solid black;
    page-break-inside: avoid;
}

th {
    font-weight: bold;
}

does not render the table headings in bold font as one would expect, because supposedly, the first row of the table is not represented using the TH tags in the intermediate HTML.

In my markdown, I use this table format:

| Name | Value |
|:---- |:----- |
| P1   | 1     |

So at the markdown level, there is a definition of what the header is, and that header is by default rendered in bold font for example on GitHub.

Update: I tried several variations of this and ended up being unable to get the table header to be bold.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant