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
  3b99ed03_b8e9_f8e3_3a3a_885f324f52b7["genNormalScriptCssVarsCode()"]
  445bc304_0400_2ae2_a33b_eaa1d5e1788a["cssVars.ts"]
  3b99ed03_b8e9_f8e3_3a3a_885f324f52b7 -->|defined in| 445bc304_0400_2ae2_a33b_eaa1d5e1788a
  4dff3da5_c3f4_4303_7989_1d16ed3f091d["compileScript()"]
  4dff3da5_c3f4_4303_7989_1d16ed3f091d -->|calls| 3b99ed03_b8e9_f8e3_3a3a_885f324f52b7
  ff14d2b7_217f_7b2c_a8cf_e648b225c4b8["genCssVarsCode()"]
  3b99ed03_b8e9_f8e3_3a3a_885f324f52b7 -->|calls| ff14d2b7_217f_7b2c_a8cf_e648b225c4b8
  style 3b99ed03_b8e9_f8e3_3a3a_885f324f52b7 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, defined in packages/compiler-sfc/src/cssVars.ts.
Where is genNormalScriptCssVarsCode() defined?
genNormalScriptCssVarsCode() is defined in packages/compiler-sfc/src/cssVars.ts at line 160.
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