Thanks for sharing. Might be a helpful snippet for someone who only wants the title on certain tiles to be truncated or not. There’s a dashboard setting (hidden behind the advanced option) to enable or disable truncation of titles across all tiles in the dashboard:
Ha! I was thinking it was a bug that was missed and just not reported. Honestly took me some time to figure out why a couple of titles truncated and others did not, but only about 15 minutes snooping around the DOM to figure it out, so didn’t think to report it. Thanks for the quick fix!
If you want a shadow behind text (e.g. to improve contrast) here’s the CSS code I’ve used lately, that I don’t see listed. This is for main content (e.g. hero text on a thermostat tile), but works for title and footer too: .tile .main-content { text-shadow: 2px 2px 8px #000000a0; }
The first two numbers set the shadow offset, the third sets the shadow blur size and the fourth is the shadow color (transparency works, so this is black with a transparency of A0 (160 in decimal, out of 255, where 0 is fully transparent, 255 or ff is totally opaque).
This works with theme style specific CSS too, which is probably where it is best used.
Can you use CSS on an individual tile? I have 1 or 2 tiles on a dashboard that I want to change the text size on but I don’t want it applied to everything.
Also, how do you adjust the font size of the default Month calendar?
Yes you can, you have the set those tiles to use a custom style, and then you can use the technique in this thread to apply CSS only to that style: How to move text / labels in tiles with CSS
My apologies, this code is inconsistent (it works in Chrome on Windows, but does not work in Chrome on Android or Fully Kiosk Browser on Fire OS). After a bit more playing around, this does work for hero text: .tile .main-content { font-size: 2.35em!important; }
However, be sure to test it on the platform you’re using, as I’ve found the results to be variable (I get a slightly larger font on Android and Fire OS than I do on Windows, I’ve no idea why, and its not much different, but do be sure to check).
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.
Might be stupid question, but how do I find out tile.type?
Examples seems to be stwitch, lock and door-control. How do I know the right type for certain tiles in my dashboard?
Thank’s @Chris_C . That works!
Is there a way to add custom css to specific tile? I have few switches in my dashboard and if I add css it will affect to every switch tile and I would only need customize one tile.
I still have one question as you are now willing to answer all my stupid questions
Is there a way to change color when mode changes to night or away and same thing for HSM when mode changes to Armed?
I used to have three tiles …each for location mode (Day, Away, Night). Now that I’m using mode changer tile (just on tile) it is always as grey as it is. I would like to get more attention with colors when for example HSM is armed (so that my kids do not open door accidentally when HSM is armed)
I’ have the dashboard in an iframe with some dynamic images behind it. I would therefor like to make the dashboard background transparent.
I almost got it working but on the tag i have this class: “grey darken-3 white-text”. Is there a way to overwrite or remove the grey and darken-3 class ? If so then it would be transparent.