body css rule and google-caja

255 Views Asked by At

If i am not mistaken, google-caja removes body css rules. Since HtmlService sanitizes all html css and javascript using caja, we can't style the body element.

Is there any workaround to this problem?

2

There are 2 best solutions below

1
On BEST ANSWER

There's a workaround here using jQuery; hopefully it might be suitable for your purpose.

3
On

This is a known Caja bug (I don't have the bug ID handy but it should be on the Caja issue tracker) and will be fixed in a release or so I think. In the meantime, add a <div> around your entire page and style that instead.