From: SassNinja Date: Thu, 20 Jul 2017 12:29:51 +0000 (+0200) Subject: Consider deprecated offcanvas size in user settings (apart from the warning) X-Git-Tag: v6.4.2-rc2~1^2~9^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10428%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Consider deprecated offcanvas size in user settings (apart from the warning) This preserves backwards compatibility. --- diff --git a/scss/components/_off-canvas.scss b/scss/components/_off-canvas.scss index 6f782d1eb..51c1eb40e 100644 --- a/scss/components/_off-canvas.scss +++ b/scss/components/_off-canvas.scss @@ -6,14 +6,6 @@ /// @group off-canvas //// -/// Deprecated settings warning -@if variable-exists(offcanvas-size) { - @warn '$offcanvas-size is deprecated and not used anymore! Please update your settings and use the map $offcanvas-sizes instead'; -} -@if variable-exists(offcanvas-vertical-size) { - @warn '$offcanvas-vertical-size is deprecated and not used anymore! Please update your settings and use the map $offcanvas-vertical-sizes instead'; -} - /// Width map of a left/right off-canvas panel. /// @type Map $offcanvas-sizes: ( @@ -82,6 +74,16 @@ $maincontent-class: 'off-canvas-content' !default; /// Adds baseline styles for off-canvas. This CSS is required to make the other pieces work. @mixin off-canvas-basics { + /// Transform deprecated size settings into map & show warning + @if variable-exists(offcanvas-size) { + $offcanvas-sizes: (small: $offcanvas-size, medium: $offcanvas-size) !global; + @warn '$offcanvas-size is deprecated and not used anymore! Please update your settings and use the map $offcanvas-sizes instead'; + } + @if variable-exists(offcanvas-vertical-size) { + $offcanvas-vertical-sizes: (small: $offcanvas-vertical-size, medium: $offcanvas-vertical-size) !global; + @warn '$offcanvas-vertical-size is deprecated and not used anymore! Please update your settings and use the map $offcanvas-vertical-sizes instead'; + } + // Checks the z-indexes and increase them due to backwards compatibility. // This is necessary because the overlay's z-index is new since v6.4 and may be identical to the user custom settings of the push z-index. @if $offcanvas-push-zindex <= $offcanvas-overlay-zindex { $offcanvas-push-zindex: $offcanvas-overlay-zindex + 1 !global; }