From: jdlrobson Date: Fri, 18 Aug 2017 17:55:35 +0000 (-0500) Subject: Add mobile and desktop thresholds X-Git-Tag: 1.31.0-rc.0~729 X-Git-Url: http://git.cyclocoop.org/clavettes/images/siteon3.jpg?a=commitdiff_plain;h=b86ba0a597efc1833f71f7d9037ddee4934a2ec3;p=lhc%2Fweb%2Fwiklou.git Add mobile and desktop thresholds 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 --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 27177cbc7d..4a625cbf77 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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', ]; diff --git a/resources/src/mediawiki.less/mediawiki.ui/variables.less b/resources/src/mediawiki.less/mediawiki.ui/variables.less index 0c897dc91e..731bd2d352 100644 --- a/resources/src/mediawiki.less/mediawiki.ui/variables.less +++ b/resources/src/mediawiki.less/mediawiki.ui/variables.less @@ -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.