| Current Path : /home/ereika83/www/wp-content/plugins/wpmudev-updates/assets/src/scss/widget-ui/ |
| Current File : /home/ereika83/www/wp-content/plugins/wpmudev-updates/assets/src/scss/widget-ui/_mixins.scss |
@mixin body-class($wordpress: false, $extension: null) {
@if ($wordpress == true) {
#wpbody #{$prefix}-#{$extension} {
@content;
}
}
@else {
#{$prefix} {
@content;
}
}
}
@mixin media($type, $breakpoint-name-1, $breakpoint-name-2: null) {
@if ($type == min-width) {
$min-breakpoint-width: #{map-get($breakpoints, $breakpoint-name-1) + 1px};
@media (min-width: $min-breakpoint-width) {
@content;
}
}
@else if ($type == max-width) {
$max-breakpoint-width: map-get($breakpoints, $breakpoint-name-1);
@media (max-width: $max-breakpoint-width) {
@content;
}
}
@else if ($type == between) {
$min-breakpoint-width: #{map-get($breakpoints, $breakpoint-name-1) + 1px};
$max-breakpoint-width: map-get($breakpoints, $breakpoint-name-2);
@media (min-width: $min-breakpoint-width) and (max-width: $max-breakpoint-width) {
@content;
}
}
@else {
@warn "Unfortunately, no type could be retrieved from `#{$type}`. "
+ "Use either `min-width`, `max-width`, or `between`.";
}
}
// Function for color palettes using Sass maps
// Usage: color: palette(green,base);
@function palette($palette, $tone: 'default') {
@return map-get( map-get($palettes, $palette), $tone );
}