sass-mq/sass-mq — pull request #27 by kaelig (2014-12-15 15:09:54+00:00)
Title: Make debug available outside global config

Use case: I am currently using sass-mq entirely scoped without setting a global sass-mq config (so that other modules or products can use it globally if they want).

I needed to show the currently active breakpoint using a custom config (see below).

```scss
/// Show the currently active breakpoint and output loaded settings
/// @link https://github.com/sass-mq/sass-mq#seeing-the-currently-active-breakpoint
///
/// @type Boolean - set to false to view the core experience only
$o-grid-debug-mode: false !default;

/// Layouts
///
/// @type Map
$o-grid-layouts: (
S: 370px, // 20px columns
M: 610px, // 40px columns
L: 850px, // 60px columns
XL: 1090px // 80px columns
) !default;

/// Layout names
///
/// @access private
/// @type List
$_o-grid-layout-names: map-keys($o-grid-layouts) !default;

@if $o-grid-debug-mode {
// Show active breakpoints
@include mq-show-breakpoints($_o-grid-layout-names, $o-grid-layouts);

// Debug information:
/*! Layout names: #{$_o-grid-layout-names} */
}
```