CSS and SmartTiles

I posted in the other thread, CSS broken for me too

This must the the cause of this. Somehow line breaks got encoded into \r\n…[quote=“tgauchat, post:11, topic:56006”]
SmartTiles is considered to be an “uncertified SmartApp”.
[/quote]

I thought we are certified!?

Not according to every Support@SmartThings.com ticket that users relay to us.

I have no idea what the difference is, except we’re not supposed to talk about it.

:laughing: :sweat: :cry:

Following the CSS wipe a few weeks back, I haven’t bothered resetting up my system to the way it used to look. Now, however, I’m always being forced to log back in, which makes a tablet on the wall useless. I use Fully, and it has always worked until a week and a half or so.

If I had a dollar every time someone said this, I would be rich!

@slagle This is #101

1 Like

Did you set Fully Kiosk Browser to refresh the page even when idle?
I have not had to log in on my tablet in some time. I have once on my HTC phone controller. I did changed the settings in fully to update page when idle and every time screen wakes. (Or something like that) I could just be lucky. Would be a first for me to be lucky at something but if so I’ll take it.

I’m sure that’s wasting bandwidth and data but for the most part it has kept me from having to log in.

1 Like

I think you’re just lucky. I have those settings active and it didn’t matter on mine.

Guess I better get me a lottery ticket. My luck is a changing! :moneybag:

Mine just all came back

Correction, only routines came back

@slagle or @jody.albritton - Can you guys make an official comment on this? Will we ever see our custom CSS again? I worked pretty hard on mine the past few weeks and now it’s gone.

2 Likes

Hey guys I was able to figure out a workaround that worked for me.

First of all backup your Custom CSS (save it into a file somewhere).

Download Notepad++ and copy your CSS into the editor. Turn on EOL characters under View -> Show Characters -> Show End of Line. Now do a search replace (Ctrl +H). Search for \r\n, replace with nothing (blank string). Choose Extended search mode then click Replace All. This should remove all EOL characters in your CSS. Now just copy and paste this into your custom CSS on the dashboard. Will look like some words are joined together but don’t worry, just save it and it should work.

2 Likes

Thanks @wesernewein!

I was just about to make a similar suggestion.

The root cause of the problem is that SmartThings cloud decided that End Of Line characters should be returned as \r\n, which happens to break CSS.

To fix this, you need to clean up your corrupted CSS. If you have a clean backup, consider yourself lucky! Use your favorite text editor to replace \r\n with blanks.

Then, use a CSS Minifier to compress your custom CSS into a one-line text string.

This one-line text string will be immune to the ongoing state data corruption.

3 Likes

Awesome! As usual, the community comes through before ST Support does. I am back up and running.

1 Like

that fix worked for me as well. thanks for the working solution @wesernewein !

Actually, the work around fixed MOST of my custom CSS code. I noticed the state corruption must have added multiple forward and back slashes in the data-link syntax which I removed, but it’s still not working. Everytime I remove the slashes and save the custom CSS, it keeps putting back the “\”

For example:

tile.link[data-link-i=“1”] .icon a i::before{content:url(http://i67.tinypic.com/2mza7ux.png);position:relative;left:-20px;top:30px}

I tried Word first to change all \r\n to spaces, then I used the CSSMinifier. It did not work.
ST is still changing the degree symbol to \xxx as one example I saw. I tried one line and it did not work…
All I am using is the temperature and battery colors - I even went back & copied the originals…
Seeing the Temps is just nice, but seeing the Battery Levels is Very Helpful.

Looks likes ST is putting some backslashes in the CSS before the “” for some reason. I switched it to single quotes and that seems to work.
Like this .tile.link[data-link-i=‘1’]

That fixed it! Thank you once again!

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.