Add mobile and desktop thresholds
authorjdlrobson <jdlrobson@gmail.com>
Fri, 18 Aug 2017 17:55:35 +0000 (12:55 -0500)
committerKrinkle <krinklemail@gmail.com>
Fri, 2 Feb 2018 04:09:12 +0000 (04:09 +0000)
This will allow us to centralise these values similar to tablet
device width and allow us to remove a Minerva/MobileFrontend
dependency

Going forward we will encourage explicitly tracked imports
deviceWidthTablet is retained for backwards compatibility
but on long term it should be imported directly from mediawiki.ui's
variables

Bug: T171365
Change-Id: Ib9f843147db4473ce5590741e0fb490384b0007e

includes/DefaultSettings.php
resources/src/mediawiki.less/mediawiki.ui/variables.less

index 27177cb..4a625cb 100644 (file)
@@ -3783,10 +3783,11 @@ $wgResourceLoaderValidateStaticJS = false;
  */
 $wgResourceLoaderLESSVars = [
        /**
-        * Minimum available screen width at which a device can be considered a tablet/desktop
+        * Minimum available screen width at which a device can be considered a tablet
         * 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
+        * @deprecated 1.31 Use mediawiki.ui/variables instead
         */
        'deviceWidthTablet' => '720px',
 ];
index 0c897dc..731bd2d 100644 (file)
@@ -1,3 +1,25 @@
+/**
+ * Minimum available screen width at which a device can be considered a mobile device
+ * Many older feature phones have screens smaller than this value.
+ * Number is prone to change with new information.
+ * @since 1.31
+ */
+@width-breakpoint-mobile: 320px;
+
+/**
+ * Minimum available screen width at which a device can be considered a tablet
+ * 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.31
+ */
+@width-breakpoint-tablet: 720px;
+/**
+ * Minimum available screen width at which a device can be considered a desktop
+ * Number is prone to change with new information.
+ * @since 1.31
+ */
+@width-breakpoint-desktop: 1000px;
+
 // Colors for use in mediawiki.ui and elsewhere
 
 // Although this defines many shades, be parsimonious in your own use of grays.