Sunday, 13 November 2016

APEX 5 - CSS export

Theme roller changes export

Exporting your CSS customization

Something I wanted to write down since I returned from KScope in Chicago and presenting at AUSOUG Connect 2016 just made me realized this will be useful to other as well.

Apex 5 came with this greatly looking Universal theme and Theme roller functionality. 

But did you ever want to export theme customization you made on your application to any other app?

These are steps you need to take
  1. In your customized application open Theme Roller
  2. Make customization (if not already there)
  3. Open browser developer Console
  4. Execute apex.utr.config()
  5. On left hand side a result similar to apex.utr.config({"customCSS":"","vars":{"@g_Accent-BG":"#25cf7d"}}); will be shown.
  6. Copy code shown on the left starting with apex.utr.config
  7. Open and run your application (where you want to copy the theme)
  8. Open Theme Roller; This is important otherwise you get apex.utr.config is not a function error in your console
  9. Open browser developer console
  10. Paste copied text and Run
  11. You will notice changes on you application
That is all. All needed now is for you to save it using Save As button.

As far as I am aware this is currently only way to do this. There is no out of the box functionality/supported way of doing the same. 

Hope this will help. Again thanks Roel for sharing.