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

**URL:** <https://forum.inductiveautomation.com/t/perspective-online-demo-how-is-lightmobile-css-theme-switched/29813>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 9, 2019, 10:01am UTC](https://forum.inductiveautomation.com/t/perspective-online-demo-how-is-lightmobile-css-theme-switched/29813 "2019-11-09T10:01:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://forum.inductiveautomation.com/u/chi)\
**Post date:** [November 9, 2019, 10:01am UTC](https://forum.inductiveautomation.com/t/perspective-online-demo-how-is-lightmobile-css-theme-switched/29813/1 "2019-11-09T10:01:10Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![mraybourn](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@mraybourn](https://forum.inductiveautomation.com/u/mraybourn)\
**Post date:** [November 11, 2019, 5:02pm UTC](https://forum.inductiveautomation.com/t/perspective-online-demo-how-is-lightmobile-css-theme-switched/29813/2 "2019-11-11T17:02:12Z")

</div>

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.”

---

<div class="post-metadata">

**Author:** ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://forum.inductiveautomation.com/u/chi)\
**Post date:** [November 11, 2019, 7:51pm UTC](https://forum.inductiveautomation.com/t/perspective-online-demo-how-is-lightmobile-css-theme-switched/29813/3 "2019-11-11T19:51:03Z")

</div>

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