(css) Remove Compass dependency

This commit is contained in:
Francis Lachapelle
2015-05-04 13:36:04 -04:00
parent b20707d0ed
commit 8e0230488f
7 changed files with 48 additions and 60 deletions
+28 -2
View File
@@ -1,5 +1,5 @@
/// mixins.scss -*- Mode: text; indent-tabs-mode: nil; basic-offset: 2 -*-
@import '../angular-material/src/core/style/mixins.scss';
/// mixins.scss -*- Mode: scss; indent-tabs-mode: nil; basic-offset: 2 -*-
@import '../../angular-material/src/core/style/mixins.scss';
@mixin margin-selectors($before:1em, $after:1em, $start:0px, $end:0px) {
-webkit-margin-before: $before;
@@ -31,3 +31,29 @@
}
}
}
// 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);
$min: nth($slicer-breakpoints, $min_idx) + 1;
$max: nth($slicer-breakpoints, $min_idx + 1);
@include breakpoint($min $max) {
@content;
}
}
@mixin from($breakpoint) {
$min_idx: index($slicer-breakpoint-names, $breakpoint);
$min: nth($slicer-breakpoints, $min_idx) + 1;
@include breakpoint($min) {
@content;
}
}
@mixin to($breakpoint) {
$max_idx: index($slicer-breakpoint-names, $breakpoint);
$max: nth($slicer-breakpoints, $max_idx + 1);
@include breakpoint('max-width' $max) {
@content;
}
}