MCPcopy
hub / github.com/bubkoo/html-to-image / formatCSSProperties

Function formatCSSProperties

src/clone-pseudos.ts:11–20  ·  view source on GitHub ↗
(style: CSSStyleDeclaration, options: Options)

Source from the content-addressed store, hash-verified

9}
10
11function formatCSSProperties(style: CSSStyleDeclaration, options: Options) {
12 return getStyleProperties(options)
13 .map((name) => {
14 const value = style.getPropertyValue(name)
15 const priority = style.getPropertyPriority(name)
16
17 return `${name}: ${value}${priority ? ' !important' : ''};`
18 })
19 .join(' ')
20}
21
22function getPseudoElementStyle(
23 className: string,

Callers 1

getPseudoElementStyleFunction · 0.85

Calls 1

getStylePropertiesFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…