2015-05-04 19:36:04 +02:00
|
|
|
/// mixins.scss -*- Mode: scss; indent-tabs-mode: nil; basic-offset: 2 -*-
|
|
|
|
@import '../../angular-material/src/core/style/mixins.scss';
|
2015-02-03 16:17:15 +01:00
|
|
|
|
2015-01-28 02:57:24 +01:00
|
|
|
// Utility to compensate for the the xml mandatory attribute values
|
|
|
|
// Creates classes extending layout attributes with no values
|
|
|
|
// ----------------------------------------------------------------
|
2015-03-26 14:58:09 +01:00
|
|
|
@mixin attributesToClasses($selectors, $prefix: 'md') {
|
2015-01-28 02:57:24 +01:00
|
|
|
@each $selector in $selectors {
|
2015-03-26 14:58:09 +01:00
|
|
|
.#{$prefix}-#{$selector} {
|
2015-01-28 02:57:24 +01:00
|
|
|
// no syntax error here
|
2015-01-28 09:24:53 +01:00
|
|
|
@extend #{'['$selector']'} !optional
|
2015-01-28 02:57:24 +01:00
|
|
|
}
|
|
|
|
}
|
2015-02-16 08:15:01 +01:00
|
|
|
}
|
2015-05-04 19:36:04 +02:00
|
|
|
|
|
|
|
// Migration functions to mimic the
|
|
|
|
// Compass extension "Breakpoint Slicer" (https://github.com/lolmaus/breakpoint-slicer)
|
|
|
|
// using "Breakpoint" (https://github.com/at-import/breakpoint)
|
|
|
|
@mixin at($breakpoint) {
|
|
|
|
$min_idx: index($slicer-breakpoint-names, $breakpoint);
|
2016-07-21 20:34:46 +02:00
|
|
|
$min: nth($slicer-breakpoints, $min_idx);
|
|
|
|
$max: nth($slicer-breakpoints, $min_idx + 1) - 1;
|
2015-05-04 19:36:04 +02:00
|
|
|
@include breakpoint($min $max) {
|
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@mixin from($breakpoint) {
|
|
|
|
$min_idx: index($slicer-breakpoint-names, $breakpoint);
|
2016-07-21 20:34:46 +02:00
|
|
|
$min: nth($slicer-breakpoints, $min_idx);
|
2015-05-04 19:36:04 +02:00
|
|
|
@include breakpoint($min) {
|
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@mixin to($breakpoint) {
|
|
|
|
$max_idx: index($slicer-breakpoint-names, $breakpoint);
|
2016-07-14 21:57:50 +02:00
|
|
|
$max: nth($slicer-breakpoints, $max_idx + 1) - 1;
|
2015-05-04 19:36:04 +02:00
|
|
|
@include breakpoint('max-width' $max) {
|
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|