Understand Folio's CSS support and parsing behavior
mainFolio's HTML-to-PDF converter supports a subset of 139 CSS properties.
Key behaviors:
- Silent Failure: Properties not explicitly listed in the documentation are silently ignored during rendering. There are no warnings for unknown properties.
- Asset Escalation: While unknown CSS properties are always silent, you can use
html.Options.StrictAssetsto escalate certain other asset failures. - Mathematical Functions:
calc(),min(),max(), andclamp()are supported wherever<length>or<percentage>values are accepted. - Color Support: Folio renders in sRGB only. While it supports named colors, hex,
rgb(),rgba(),hsl(),hsla(), andcmyk(), it does not supportoklch()orcolor-mix().