from Css
Custom theme from raw Highlight.js CSS text.
Use this when you fetch or generate CSS at runtime rather than bundling it as an asset.
val css = // ... fetch from network or build programmatically
val theme = HighlightTheme.fromCss(
cssText = css,
name = "my-runtime-theme",
)Content copied to clipboard
Return
A HighlightTheme whose color map is lazily parsed from cssText.
Parameters
css Text
Raw Highlight.js-compatible CSS text.
name
Display name for the theme.