https://github.com/sha-red/compass-mixins/tree/master/lib
extended with more sass frameworks and as django app.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
789 B
31 lines
789 B
@import "resolution/resolution"; |
|
|
|
@function breakpoint-build-resolution($query-print, $query-resolution, $empty-media, $first) { |
|
$leader: ''; |
|
// If we're forcing |
|
@if not ($empty-media) or not ($first) { |
|
$leader: 'and '; |
|
} |
|
|
|
@if breakpoint-get('transform resolutions') and $query-resolution { |
|
$resolutions: breakpoint-make-resolutions($query-resolution); |
|
$length: length($resolutions); |
|
$query-holder: ''; |
|
|
|
@for $i from 1 through $length { |
|
$query: '#{$query-print} #{$leader}#{nth($resolutions, $i)}'; |
|
@if $i == 1 { |
|
$query-holder: $query; |
|
} |
|
@else { |
|
$query-holder: '#{$query-holder}, #{$query}'; |
|
} |
|
} |
|
|
|
@return $query-holder; |
|
} |
|
@else { |
|
// Return with attached resolution |
|
@return $query-print; |
|
} |
|
}
|
|
|