You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.js
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -230,6 +230,7 @@ In "single" mode, the output will apply the values of all variables to the rules
230
230
@param {boolean} [options.onlyStyles=false] - Only output the style part of the CSS without any variables. Forces `preserveVariables` to be `true` and ignores the theme values. Useful to get the base styles to use multiple themes.
231
231
@param {boolean} [options.useFixture=true] - Include extra styles from GitHub Flavored Markdown, like code snippets.
232
232
@param {string} [options.rootSelector=.markdown-body] - Set the root selector of the rendered Markdown body as it should appear in the output CSS. Defaults to `.markdown-body`.
233
+
@param {boolean} [options.transparentBackground=false] - If `true`, the background color will be set to `transparent`. Useful when you want to embed the Markdown content in a page with a custom background color.
233
234
*/
234
235
// eslint-disable-next-line complexity
235
236
exportdefaultasyncfunctiongetCSS({
@@ -241,6 +242,7 @@ export default async function getCSS({
241
242
onlyStyles =false,
242
243
useFixture =true,
243
244
rootSelector ='.markdown-body',
245
+
transparentBackground =false,
244
246
}={}){
245
247
if(onlyVariables&&onlyStyles){
246
248
// Would result in an empty output
@@ -300,6 +302,21 @@ export default async function getCSS({
0 commit comments