Jump to content

How to activate a particular theme based on session


Saurabh Jain

Recommended Posts

Posted

I want to have a very light theme .. for the purpose of calling it as a webview in mobile app 

How to identify user is accessing from mobile app and not from mobile browsers 

based on that we will like to have a light theme.... If user sign in from desktop he should see the default theme

 

  • Management
Posted

You shouldn't need to do that. Just alter any CSS in the _responsive.css files. They get loaded and used when the display port is smaller which is typically a mobile device. We don't really recommend sniffing out mobile browsers any more.

  • Management
Posted

Personally, I wouldn't try and look for specific devices.

CSS already has a way to change how things look based on the device width. So for example:

 

body {
  background: black;
}
@media screen and (max-width:767px) {
    background: red;
}

This will show a black background for iPads and computers, but a red background for a mobile phone.

Posted
On 9/19/2017 at 1:29 PM, Matt said:

Personally, I wouldn't try and look for specific devices.

CSS already has a way to change how things look based on the device width. So for example:

 


body {
  background: black;
}
@media screen and (max-width:767px) {
    background: red;
}

This will show a black background for iPads and computers, but a red background for a mobile phone.

This will not solve purpose.... reason is 

I have a same mobile phone  and I use it to open the community  in two ways

1  By say browser chrome installed on mobile

2 my android mobile app

Now I dont want ads on android mobile app   but I want ads on google chrome browser one....

 

Both have same width as device is same...

Hope I am able to explain 

Regards

Saurabh

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...