styles
Type:
<string> | <string[]>
- CLI
- JavaScript
- Shell
- Python
- Ruby
const mql = require('@microlink/mql')
const { status, data } = await mql('https://example.com', { screenshot: true, styles: ['body { background: white; }','div { border: 1px solid gray; font-family: "Comic Sans MS", "Comic Sans", cursive; }'] })
mql.render(data)
The code to be injected can be defined as:
- Inline code (e.g.,
'body{background:red}'
). - Absolute URLs (e.g.,
'https://cdn.jsdelivr.net/npm/hack@0.8.1/dist/dark.css'
).