In addition to my previous question Using bootstrap color in webstyle I also would like to use bootstrap colors in WebPicture combined with the BootstrapIcon method.
It is possible to add a bootstrap color to a WebStyle by using e.g. “var(–bs-danger)”.
Xojo does not allow that with their properties, for example this doesn’t work:
me.style.backgroundcolor = "var(--bs-danger)"
Using style.value is outside of default Xojo behavior that allows us to do other things.
Another point is that var(–bs-danger) can be used in Bootstrap and we are talking about a ‘fill’ definition inside SVG code. I don’t think we can put ‘var(–bs-danger)’ on that fill as that is not part of the SVG specification.
Xojo will need to check the bootstrap every build time, extract the bootstrap variable color code and fill the specific color to the SVG fill section. I don’t know if that is an easy task.
And what happens when the color changes using Light/Dark mode? Bootstrap allows that and adjust the theme, I’m not sure if the SVG standard allows that.
@AlbertoD
That makes sense and I assume that the issue will be closed and not rewarded.
Another possibility.
Is it possible in Xojo to extract the color code from bootstrap colors?
If that can be done, I can use that code in BootstrapIcon.