-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_mixins.scss
40 lines (31 loc) · 907 Bytes
/
_mixins.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// v0.0.1
@mixin sf-add-p($p-name){
@if (sf-placeholder-exists($p-name) == false){
@include sf-save-placeholder($p-name);
@at-root{
// Create Placeholder
// $sf-breakpoints is a SassyBreakpoint Variable
@each $key, $value in $sf-breakpoints{
// create on root
@media #{$value}{
%#{$key}-#{$p-name}{
@content;
}
}
}
%#{$p-name}{
@content;
}
}
}
}
@mixin sf-use-p($p-name){
@if $sf-current-breakpoint == $sf-default-breakpoint{
@extend %#{$p-name} !optional;
}@else{
@extend %#{$sf-current-breakpoint}-#{$p-name} !optional;
}
}
@mixin sf-save-placeholder($p-name){
$sf-cache-placeholders: append($sf-cache-placeholders, $p-name) !global;
}