dotnet / docfx

Static site generator for .NET API documentation.
https://dotnet.github.io/docfx/
MIT License
4.09k stars 866 forks source link

custom css is not applied for downloaded pdf #10197

Open Bhavana1v opened 2 months ago

Bhavana1v commented 2 months ago

Describe the bug We have custom css for "@media print" in normal style and case.

/ custom-table-style.css / @media print { .custom-table { width: 100%; table-layout: fixed; border-collapse: collapse; }

.custom-table th, .custom-table td { word-wrap: break-word; overflow: hidden; border: 1px solid #D3d3d3; padding: 5px; / Adjust padding as needed / } }

.custom-table { width: 100%; table-layout: fixed; border-collapse: collapse; }

.custom-table th, .custom-table td { word-wrap: break-word; overflow: hidden; border: 1px solid #D3d3d3; padding: 5px; /* Adjust padding as needed

Style is being applied for docfx site. But it is not getting applied for the downloaded pdf.

To Reproduce Steps to reproduce the behavior:

  1. Create custom css as mentioned above for a page having table and try to generate PDF.

Expected behavior Both docfx website and PDF should show similiar table styles.

Context (please complete the following information):

Actual behaviour Website shows correct css style but downloaded pdf is showing theme style itseems..

Additional context If we try to print - custom style is reflected.