Home › Forums › Archived Forums › Mobile View › How to differentiate desktop from tablets
- This topic has 7 replies, 3 voices, and was last updated 11 years, 4 months ago by
Remus.
-
AuthorPosts
-
April 23, 2015 at 09:10 UTC - Views: 3 #17655
Remus
ParticipantHello !
I use Weaver Xtreme 1.1.3 – Plus (1.1)
Test site is displayed fine on every mobile, but on desktop I could decrease font size a bit. Is there a way to differentiate tablets from desktop devices concerning base font size?Other question: .is-ipad includes every tablet with the same size, or just iPads ?
Thanks !
April 23, 2015 at 11:26 UTC - Views: 5 #21492scrambler
ModeratorThe selector you can use with custom CSS for devices are
.is-desktop
.is-mobile (smalltablet and phones)
.is-smalltablet
.is-phone
For the font size I suppose the best way would be to use the rule below (base font size is on the body tag which is at the same level as the device class so must be attached, and the default size is 1em.
body.is-desktop {font-size:0.8em;}
.is-ipad is only for ipad
April 23, 2015 at 13:53 UTC - Views: 3 #21493Remus
ParticipantThank you, but just later I checked on tablet, and font size is modified for desktop, and also for tablet.
April 23, 2015 at 20:13 UTC - Views: 3 #21494Weaver
KeymasterWeaver Xtreme considers any device with a width of 768px or more to be a desktop.
By default, there is no difference in the base font size for any device – the default is 16px for all devices. Weaver Xtreme Plus allows you to set larger or smaller base font size for tablets and phones. It is up to you to judge if larger or smaller works better for your own site.
Apple devices can be distinguished to iPod, iPad, or iPhone, while this is not possible for Android devices.
April 23, 2015 at 20:56 UTC - Views: 2 #21495scrambler
Moderator“Weaver Xtreme Plus allows you to set larger or smaller base font size for tablets and phones”
I had missed that…
@remus, you don’t need my rule then, just set the main font size to what you need for desktop, then use the plus option to change it for small tablets and phones (MAin Options > Fonts & Custom)
May 1, 2015 at 22:58 UTC - Views: 3 #21496Remus
ParticipantI checked multiple pages on Android tablet and also desktop, and noticed when it is displayed fine on desktop, I need a little zoom increase on tablet. Conversely, if I increase a bit the font size – body is-desktop π – then the page is perfectly readable on tablet without any adjustment, but is far from perfect on desktop, comparing to previous setting.
Therefore, this is how it arise the need to use an option for different font size on desktop /tablets. Or at least the possibility for a custom rule that would solve this problem.
May 2, 2015 at 00:19 UTC - Views: 4 #21497Weaver
KeymasterThe closest thing available for that would be using .is-ipad or .is-android + @media rules.
Something like:
.is-pad {font-size: 120%;}
@media (min-width:640px) {
.is-android {font-size:120%;}
}May 2, 2015 at 14:10 UTC - Views: 3 #21498Remus
ParticipantNow it fits so fine on every browser and device (using font-size: 105%;), can’t wait rebuilding cache π Thanks everybody for answers !
-
AuthorPosts
- The forum ‘ Mobile View’ is closed to new topics and replies.

