Set threshold for is a tablet in LESS variable
authorjdlrobson <jdlrobson@gmail.com>
Mon, 21 Dec 2015 23:49:10 +0000 (15:49 -0800)
committerjdlrobson <jdlrobson@gmail.com>
Tue, 26 Jan 2016 20:08:08 +0000 (12:08 -0800)
We need to centrally define our definition of a tablet device so
we can consistently serve alternative mobile and tablet versions.

As well as the two mentioned extensions in the see section, there
are also instances in Gather, Vector, Metrolook and various other
extensions that will benefit from this.

See I257b3b34536 and I97d9600c839.

Bug: T93675
Change-Id: Iefce83763da0cbd037a7ff889088b0da820220a0

includes/DefaultSettings.php

index a22a29d..00a5709 100644 (file)
@@ -3688,7 +3688,15 @@ $wgResourceLoaderValidateStaticJS = false;
  * @endcode
  * @since 1.22
  */
-$wgResourceLoaderLESSVars = array();
+$wgResourceLoaderLESSVars = array(
+       /**
+        * Minimum available screen width at which a device can be considered a tablet/desktop
+        * The number is currently based on the device width of a Samsung Galaxy S5 mini and is low
+        * enough to cover iPad (768px). Number is prone to change with new information.
+        * @since 1.27
+        */
+       'deviceWidthTablet' => '720px',
+);
 
 /**
  * Default import paths for LESS modules. LESS files referenced in @import