You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/07/01 06:25:31 UTC

[GitHub] [apisix-website] SkyeYoung commented on a diff in pull request #1176: refactor: footer

SkyeYoung commented on code in PR #1176:
URL: https://github.com/apache/apisix-website/pull/1176#discussion_r911650520


##########
website/src/css/util.scss:
##########
@@ -0,0 +1,58 @@
+$breakpoints: (
+    xs: 369px,
+    sm: 736px,
+    md: 1024px,

Review Comment:
   done



##########
website/src/css/util.scss:
##########
@@ -0,0 +1,58 @@
+$breakpoints: (
+    xs: 369px,
+    sm: 736px,
+    md: 1024px,
+    lg: 1400px
+);
+
+// @include respond-above() {}
+@mixin respond-above($breakpoint) {
+    @if map-has-key($breakpoints, $breakpoint) {
+        $breakpoint-value: map-get($breakpoints, $breakpoint);
+
+        @media only screen and (min-width: $breakpoint-value) {
+            @content;
+        }
+    }
+
+    @else {
+        @warn 'Invalid #{$breakpoint}.';
+    }
+}
+
+// @include respond-below() {}
+@mixin respond-below($breakpoint) {
+    @if map-has-key($breakpoints, $breakpoint) {
+        $breakpoint-value: map-get($breakpoints, $breakpoint);
+
+        @media only screen and (max-width: ($breakpoint-value - 1)) {
+            @content;
+        }
+    }
+
+    @else {
+        @warn 'Invalid #{$breakpoint}.';
+    }
+}
+
+// @include respond-between(sm, md) {}
+@mixin respond-between($lower, $upper) {
+    @if map-has-key($breakpoints, $lower) and map-has-key($breakpoints, $upper) {
+        $lower-breakpoint: map-get($breakpoints, $lower);
+        $upper-breakpoint: map-get($breakpoints, $upper);
+
+        @media only screen and (min-width: $lower-breakpoint) and (max-width: ($upper-breakpoint - 1)) {
+            @content;
+        }
+    }
+
+    @else {
+        @if (map-has-key($breakpoints, $lower)==false) {
+            @warn 'Lower breakpoint invalid: #{$lower}.';
+        }
+
+        @if (map-has-key($breakpoints, $upper)==false) {
+            @warn 'Upper breakpoint invalid: #{$upper}.';
+        }
+    }
+}

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org