So I had a couple of ideas … but I’m running into how to insert variables into css. Two situations I’m imagining:
- Having the configuration identify a mask for an image.
- Having the configuration identify a Google font to use. I realize others have developed this functionality already … but I added this one because I believe it requires the same action I am wondering about for #1.
So I’m trying to figure out if the hugo templating system is applied to CSS. My first perfunctory attempt at making this work didn’t seem to get the values replaced:
{{ with .Site.Params.ImgMask }}
.sidebar .masked {
-webkit-mask-image: {{ . }};
.mask-image: {{ . }};
}
{{ end }}
So before I started banging my head against this, I thought I’d ask here …
- Does hugo templating apply to the css/scss files?
- Is there some other best practice that people are doing this approach that you can recommend?
Thanks in advance.
Carmine