aboutsummaryrefslogtreecommitdiff
path: root/_sass/minimal-mistakes/vendor/breakpoint/parsers/resolution
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@gmail.com>2019-10-27 09:57:37 -0400
committerAndrew Lee <alee14498@gmail.com>2019-10-27 09:57:37 -0400
commite62e7bb6b14555c9bbe5d40d217103984f4f80e6 (patch)
tree21887d847dccacb47644eb6f74ce31326172303c /_sass/minimal-mistakes/vendor/breakpoint/parsers/resolution
parent716ea6ed2b64c921a799d872a07bfbd53b2a3e58 (diff)
downloadpokeworld-website-e62e7bb6b14555c9bbe5d40d217103984f4f80e6.tar.gz
pokeworld-website-e62e7bb6b14555c9bbe5d40d217103984f4f80e6.tar.bz2
pokeworld-website-e62e7bb6b14555c9bbe5d40d217103984f4f80e6.zip
Rewrite progress
Diffstat (limited to '_sass/minimal-mistakes/vendor/breakpoint/parsers/resolution')
-rw-r--r--_sass/minimal-mistakes/vendor/breakpoint/parsers/resolution/_resolution.scss60
1 files changed, 60 insertions, 0 deletions
diff --git a/_sass/minimal-mistakes/vendor/breakpoint/parsers/resolution/_resolution.scss b/_sass/minimal-mistakes/vendor/breakpoint/parsers/resolution/_resolution.scss
new file mode 100644
index 0000000..3680421
--- /dev/null
+++ b/_sass/minimal-mistakes/vendor/breakpoint/parsers/resolution/_resolution.scss
@@ -0,0 +1,60 @@
+@function breakpoint-make-resolutions($resolution) {
+ $length: length($resolution);
+
+ $output: ();
+
+ @if $length == 2 {
+ $feature: '';
+ $value: '';
+
+ // Find which is number
+ @if type-of(nth($resolution, 1)) == 'number' {
+ $value: nth($resolution, 1);
+ }
+ @else {
+ $value: nth($resolution, 2);
+ }
+
+ // Determine min/max/standard
+ @if index($resolution, 'min-resolution') {
+ $feature: 'min-';
+ }
+ @else if index($resolution, 'max-resolution') {
+ $feature: 'max-';
+ }
+
+ $standard: '(#{$feature}resolution: #{$value})';
+
+ // If we're not dealing with dppx,
+ @if unit($value) != 'dppx' {
+ $base: 96dpi;
+ @if unit($value) == 'dpcm' {
+ $base: 243.84dpcm;
+ }
+ // Write out feature tests
+ $webkit: '';
+ $moz: '';
+ $webkit: '(-webkit-#{$feature}device-pixel-ratio: #{$value / $base})';
+ $moz: '(#{$feature}-moz-device-pixel-ratio: #{$value / $base})';
+ // Append to output
+ $output: append($output, $standard, space);
+ $output: append($output, $webkit, space);
+ $output: append($output, $moz, space);
+ }
+ @else {
+ $webkit: '';
+ $moz: '';
+ $webkit: '(-webkit-#{$feature}device-pixel-ratio: #{$value / 1dppx})';
+ $moz: '(#{$feature}-moz-device-pixel-ratio: #{$value / 1dppx})';
+ $fallback: '(#{$feature}resolution: #{$value / 1dppx * 96dpi})';
+ // Append to output
+ $output: append($output, $standard, space);
+ $output: append($output, $webkit, space);
+ $output: append($output, $moz, space);
+ $output: append($output, $fallback, space);
+ }
+
+ }
+
+ @return $output;
+}