I have an array of elements that could change over time as I update them at the top of my .astro file.
const array = ["a", "b"];
...
---
and in the <style> tag at the bottom of the same file, I want to do something like
{array.map(e => {
let output = '.' + e + ' {';
output += 'color: var(--' + e + ')';
output += '}';
return output;
})}
<styles>```
so that I get something like
```<style>
.a {
color: var(--a);
}
.b {
color: var(--b);
}
</style>```
I want to do this programmatically because, as I mentioned, the content of the array may change and I want all elements in there to be reflected in the `<style>` dynamically.