In SCSS files, get an appSettings value from the web.config

1
Voted

In SCSS files, get an application setting value from the web.config,

E.g. in the web.config file:

<appSettings>
    <add key="BaseThemeColor" value="#639" />
    <add key="BaseImagePath" value="http://media.domain.com/" />
</appSettings>

And in a SCSS file:

$baseThemeColor: ww-GetAppSettings("BaseThemeColor");
$baseImagePath: ww-GetAppSettings("BaseImagePath");

@function getCompleteImageUrl($img) {
    @return url($baseImagePath + $img);
}

a {
    color: $baseThemeColor;
    background: getCompleteImageUrl("ico-link.png") no-repeat 0 0;
    padding: 2px 2px 2px 25px;
    display: inline-block;

    &:hover {
        color: invert($baseThemeColor);
    }
}
Status: New