added box-shadow mixin. Added shadow to the gravatar in homepage.
authordanix <danix@danix.xyz>
Sun, 19 Feb 2023 17:13:21 +0000 (18:13 +0100)
committerdanix <danix@danix.xyz>
Sun, 19 Feb 2023 17:13:21 +0000 (18:13 +0100)
assets/sass/components/_image.scss
assets/sass/libs/_my-mixins.scss

index 09c402c..6e1388e 100644 (file)
@@ -62,7 +62,8 @@
        }\r
 \r
        .circle > img {\r
-               @include circle(200px, "block")\r
+               @include circle(200px, "block");\r
+               @include box-shadow(-5px, 5px, 5px, _palette(fg-bold));\r
        }\r
 \r
        video {\r
index 9d0b0ce..dc52109 100644 (file)
   -moz-border-radius: $size/2;
   border-radius: $size/2;
 }
+
+// box-shadow
+// top and left are  the anchor point from where to start moving the shadow
+@mixin box-shadow($top, $left, $blur, $color, $inset: false) {
+    @if unitless($top) or unitless($left) or unitless($blur) {
+        $top: $top * 1px;
+        $left: $left * 1px;
+        $blur: $blur * 1px;
+    }
+    @if $inset {
+        -webkit-box-shadow:inset $top $left $blur $color;
+        -moz-box-shadow:inset $top $left $blur $color;
+        box-shadow:inset $top $left $blur $color;
+    } @else {
+        -webkit-box-shadow: $top $left $blur $color;
+        -moz-box-shadow: $top $left $blur $color;
+        box-shadow: $top $left $blur $color;
+    }
+}