From aaa0db388598c8d53d12e4e2e05d7a3123ccbf8b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 11 Sep 2017 13:26:45 +0200 Subject: [PATCH] css: make it image grid more flexible. It's now possible to omit the link, omit the caption or both. --- css/m-components.css | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/css/m-components.css b/css/m-components.css index c699f094..b9dd3242 100644 --- a/css/m-components.css +++ b/css/m-components.css @@ -896,7 +896,10 @@ figure.m-figure.m-fullwidth img { position: relative; margin: 0; } -.m-imagegrid > figure > a > div { +.m-imagegrid > figure > div, +.m-imagegrid > figure > figcaption, +.m-imagegrid > figure > a > div, +.m-imagegrid > figure > a > figcaption { position: absolute; top: 0; left: 0; @@ -906,23 +909,31 @@ figure.m-figure.m-fullwidth img { border-style: solid; border-width: 0.25rem; padding: 0.5rem; +} +.m-imagegrid > figure > figcaption, +.m-imagegrid > figure > a > figcaption { color: transparent; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.75rem; } -.m-imagegrid > figure > a > div::before { +.m-imagegrid > figure > div::before, +.m-imagegrid > figure > figcaption::before, +.m-imagegrid > figure > a > div::before, +.m-imagegrid > figure > a > figcaption::before { content: ''; display: inline-block; height: 100%; vertical-align: bottom; width: 0; } -.m-imagegrid > figure:hover > a > div { +.m-imagegrid > figure:hover > figcaption, +.m-imagegrid > figure:hover > a > figcaption { background: linear-gradient(transparent 0%, transparent 75%, rgba(0, 0, 0, 0.85) 100%); color: #ffffff; } +.m-imagegrid > figure > img, .m-imagegrid > figure > a > img { width: 100%; height: 100%; -- 2.30.2