Saurabh Jain Posted September 18, 2017 Posted September 18, 2017 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 Matt Posted September 18, 2017 Management Posted September 18, 2017 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.
Saurabh Jain Posted September 18, 2017 Author Posted September 18, 2017 can you explain a little bit more... how to differentiate from mobile app and mobile phone browser say google chrome
Management Matt Posted September 19, 2017 Management Posted September 19, 2017 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.
Saurabh Jain Posted September 20, 2017 Author Posted September 20, 2017 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.