diff options
| author | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2024-05-19 10:18:45 +0100 |
|---|---|---|
| committer | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2024-05-19 10:18:45 +0100 |
| commit | 0bbe796051973bd6af06f0d9c6d017f866a4f4ff (patch) | |
| tree | dc97b0293199dfa9222a00c1f765cf55e36d2eb5 /website/public/css/hcard.css | |
| parent | cbef290b5bcbbb15db20f3943f56bf4293e42e49 (diff) | |
| parent | 2b1a34c97590bf071a49d2189a360827629f9ac0 (diff) | |
Merge branch 'main' of https://github.com/joeacarstairs/personal-website
Diffstat (limited to 'website/public/css/hcard.css')
| -rw-r--r-- | website/public/css/hcard.css | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/website/public/css/hcard.css b/website/public/css/hcard.css index 4f1713d..414eed9 100644 --- a/website/public/css/hcard.css +++ b/website/public/css/hcard.css @@ -1,8 +1,34 @@ .h-card { - img { + div:has(img) { width: 6rem; height: 6rem; - border-radius: 1rem; + margin-inline: auto; + + img { + width: 6rem; + height: 6rem; + border-radius: 1rem; + filter: contrast(1.25); + } + + &::after { + /* Colour overlay */ + background-color: var(--colour-primary-80); + opacity: 0.3; + + /* Same size and shape as the img */ + border-radius: 1rem; + width: 6rem; + height: 6rem; + + /* Positioned on top of the img */ + display: block; + position: relative; + top: -6rem; + + /* A content value is needed to get the ::after to render */ + content: ''; + } } } @@ -16,7 +42,7 @@ "empty heading" "photo text"; - img { + div:has(img) { grid-area: photo; margin-block-start: var(--spacing-block-sm); } |
