Perspective Online Demo - How is lightMobile.css theme switched?

The newest perspective online demo uses a smart trick to have the left dock cover the main view on smaller screen widths. The theme seems to be switched between light.css and lightMobile.css depending on the screen width.
Can the inventor of this trick please share how it is done?

Of course! It is actually quite simple, all you need to do is set the “theme” session property to the .css file that you want to use. So in this example, it switches between “light” and “lightMobile” based on the width of the Header view (small vs large).
Also note that the dock behavior should now be a feature available in 8.0.6 - Docks have an “auto” content option, in addition to just “push” or “cover.”

1 Like

Thank you for the explanation.
Also i didn’t notice the “auto” mode in 8.0.6 before.