skip to main content
Advanced Customizations, Overrides, and Extensions » ePublisher Platform XSLT Extensions » Sass » void ReplaceAllVariablesInFile (string inputSassFilePath, object replacements)
void ReplaceAllVariablesInFile (string inputSassFilePath, object replacements)
 
Replaces a collection of SASS variables in a file with those specified by the user.
Parameters:
inputSassFilePath
Path to the input SASS file.
replacements
Object that represents an XML collection of SASS variables.
Replaces matching variables in the input file with variables specified inside the replacements object.
<xsl:variable name="VarSassVariableReplacementsAsXML">
 <wwsass:Variable name="footer_height" value="50px" />
 <wwsass:Variable name="menu_width" value="100px" />
</xsl:variable>
<xsl:variable name = "VarSassVariableReplacements" select="msxsl:node-set($VarSassVariableReplacementsAsXML)/*" />
 
<xsl:variable name="VarReplaceVariables" select="wwsass:ReplaceAllVariablesInFile('file.scss', $VarSassVariableReplacements)"/>
 
Was this helpful?
Last modified date: 10/14/2020