MCPcopy
hub / github.com/vuejs/core / ssrRenderStyle

Function ssrRenderStyle

packages/server-renderer/src/helpers/ssrRenderAttrs.ts:100–109  ·  view source on GitHub ↗
(raw: unknown)

Source from the content-addressed store, hash-verified

98}
99
100export function ssrRenderStyle(raw: unknown): string {
101 if (!raw) {
102 return ''
103 }
104 if (isString(raw)) {
105 return escapeHtml(raw)
106 }
107 const styles = normalizeStyle(ssrResetCssVars(raw))
108 return escapeHtml(stringifyStyle(styles))
109}
110
111function ssrResetCssVars(raw: unknown) {
112 if (!isArray(raw) && isObject(raw)) {

Callers 2

ssrRenderAttrsFunction · 0.85

Calls 5

isStringFunction · 0.90
escapeHtmlFunction · 0.90
normalizeStyleFunction · 0.90
stringifyStyleFunction · 0.90
ssrResetCssVarsFunction · 0.85

Tested by

no test coverage detected