I’ve been successfully rotating and resizing icons in virtual switch tiles for while.
For example, for a style named “uparrow”, this CSS works fine when applied to a virtual switch tile: .–theme-style-uparrow .icon svg {width: 100%; height: 100%; transform: rotate(-90deg);}
However if I use that same style in an attempt to rotate an icon in a number variable tile it does nothing.
Would appreciate any ideas. Is the icon within a variable tile a different beast?
The Hero Attribute, Number Variable, and Text Variable tiles are slightly different from the normal tiles in that the icon is in-line with the text rather than being the primary content like many of the other tiles.
As such, the element structure is slightly different on these. (Though after seeing this post, I’m wondering if we could tweak it slightly to better align with the other tiles having a ‘wrapper’ .icon element)
You could tweak the selector to allow for both cases:
This is basically saying to select the svg element under a tile with the ‘uparrow’ style applied to it… regardless of if it’s the child of an .icon element or the svg itself is the .icon element.
Please note that any custom CSS snippets provided are not officially supported and may need to be adjusted with potential future changes to the SharpTools web app.