Home / Function/ genNormalScriptCssVarsCode() — vue Function Reference

genNormalScriptCssVarsCode() — vue Function Reference

Architecture documentation for the genNormalScriptCssVarsCode() function in cssVars.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  cd87c836_44ee_b6ed_1710_a0549a485db8["genNormalScriptCssVarsCode()"]
  af57cd20_c4ce_0877_c02c_52056ca04d4a["compileScript()"]
  af57cd20_c4ce_0877_c02c_52056ca04d4a -->|calls| cd87c836_44ee_b6ed_1710_a0549a485db8
  0619d942_1d45_256a_46da_d12186658236["genCssVarsCode()"]
  cd87c836_44ee_b6ed_1710_a0549a485db8 -->|calls| 0619d942_1d45_256a_46da_d12186658236
  style cd87c836_44ee_b6ed_1710_a0549a485db8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/compiler-sfc/src/cssVars.ts lines 160–179

export function genNormalScriptCssVarsCode(
  cssVars: string[],
  bindings: BindingMetadata,
  id: string,
  isProd: boolean
): string {
  return (
    `\nimport { ${CSS_VARS_HELPER} as _${CSS_VARS_HELPER} } from 'vue'\n` +
    `const __injectCSSVars__ = () => {\n${genCssVarsCode(
      cssVars,
      bindings,
      id,
      isProd
    )}}\n` +
    `const __setup__ = __default__.setup\n` +
    `__default__.setup = __setup__\n` +
    `  ? (props, ctx) => { __injectCSSVars__();return __setup__(props, ctx) }\n` +
    `  : __injectCSSVars__\n`
  )
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does genNormalScriptCssVarsCode() do?
genNormalScriptCssVarsCode() is a function in the vue codebase.
What does genNormalScriptCssVarsCode() call?
genNormalScriptCssVarsCode() calls 1 function(s): genCssVarsCode.
What calls genNormalScriptCssVarsCode()?
genNormalScriptCssVarsCode() is called by 1 function(s): compileScript.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free