2019-02-26 11:06:17 +01:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// This file contains all application-wide Sass mixins.
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
/// Event wrapper
|
|
|
|
/// @author Harry Roberts
|
|
|
|
/// @param {Bool} $self [false] - Whether or not to include current selector
|
|
|
|
/// @link https://twitter.com/csswizardry/status/478938530342006784 Original tweet from Harry Roberts
|
2019-03-03 09:20:25 +01:00
|
|
|
=on-event($self: false)
|
|
|
|
@if $self
|
2019-02-26 11:06:17 +01:00
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:active,
|
2019-03-03 09:20:25 +01:00
|
|
|
&:focus
|
|
|
|
@content
|
|
|
|
@else
|
2019-02-26 11:06:17 +01:00
|
|
|
&:hover,
|
|
|
|
&:active,
|
2019-03-03 09:20:25 +01:00
|
|
|
&:focus
|
|
|
|
@content
|
2019-02-26 11:06:17 +01:00
|
|
|
|
|
|
|
/// Make a context based selector a little more friendly
|
|
|
|
/// @author Hugo Giraudel
|
|
|
|
/// @param {String} $context
|
2019-03-03 09:20:25 +01:00
|
|
|
=when-inside($context)
|
|
|
|
#{$context} &
|
|
|
|
@content
|