+
+
+
+
+
+
+
+
+
+ From a9eade2435769bfa1f1cb128c89a3be60bbe033c Mon Sep 17 00:00:00 2001
From: vista-man <524715@vistacollege.nl>
Date: Thu, 31 Oct 2024 11:09:45 +0100
Subject: [PATCH] ds
---
css/gallery.css | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
gallery.html | 15 +++++++++++++++
index.html | 2 +-
3 files changed, 64 insertions(+), 1 deletion(-)
create mode 100644 css/gallery.css
create mode 100644 gallery.html
diff --git a/css/gallery.css b/css/gallery.css
new file mode 100644
index 0000000..8c81771
--- /dev/null
+++ b/css/gallery.css
@@ -0,0 +1,48 @@
+body {
+ margin: 0;
+ min-height: 100vh;
+ display: grid;
+ place-items: center;
+ }
+
+ .gallery {
+ --size: 100px;
+ display: grid;
+ grid-template-columns: repeat(6, var(--size));
+ grid-auto-rows: var(--size);
+ margin-bottom: var(--size);
+ place-items: start center;
+ gap: 5px;
+
+ &:has(:hover) img:not(:hover),
+ &:has(:focus) img:not(:focus){
+ filter: brightness(0.5) contrast(0.5);
+ }
+
+ & img {
+ object-fit: cover;
+ width: calc(var(--size) * 2);
+ height: calc(var(--size) * 2);
+ clip-path: path("M90,10 C100,0 100,0 110,10 190,90 190,90 190,90 200,100 200,100 190,110 190,110 110,190 110,190 100,200 100,200 90,190 90,190 10,110 10,110 0,100 0,100 10,90Z");
+ transition: clip-path 0.25s, filter 0.75s;
+ grid-column: auto / span 2;
+ border-radius: 50px;
+
+
+ &:nth-child(5n - 1) {
+ grid-column: 2 / span 2
+ }
+
+ &:hover,
+ &:focus {
+ clip-path: path("M0,0 C0,0 200,0 200,0 200,0 200,100 200,100 200,100 200,200 200,200 200,200 100,200 100,200 100,200 100,200 0,200 0,200 0,100 0,100 0,100 0,100 0,100Z");
+ z-index: 1;
+ transition: clip-path 0.25s, filter 0.25s;
+ }
+
+ &:focus {
+ outline: 1px dashed black;
+ outline-offset: -5px;
+ }
+ }
+ }
\ No newline at end of file
diff --git a/gallery.html b/gallery.html
new file mode 100644
index 0000000..f7536ba
--- /dev/null
+++ b/gallery.html
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+