/// Use a predefined dark mode class to define dark mode styles.
/// @param {Boolean} $parent [true] - If true, the dark mode class will be root
/// @param {String} $class ['dark'] - The dark mode class, could be any selector
/// @group @media
/// @author Felix Scholze
/// @since v1.10.0
///
/// @example
///    .button {
///      @include dark-mode-class('body.dark-mode') {
///        color: #fff;
///      }
///    }
///
/// @output
///    body.dark-mode .button {
///      color: #fff;
///    }
///
@mixin dark-mode-class($parent: true, $class: '.dark') {
    @if $parent {
        #{$class} & {
            @content;
        }
    } @else {
        #{$class} {
            @content;
        }
    }
}
