summaryrefslogtreecommitdiff
path: root/commun.css
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2021-01-15 22:49:46 +0100
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2021-01-17 22:16:28 +0100
commitfdbf89c3b895bb899dc30642043fa08596fc7111 (patch)
tree6711292787dba52819510e3fbdbdd1032b909d3b /commun.css
parent213837e448a92bbb438887e0cbfa5c612ef14c13 (diff)
downloadquatuorbellefeuille.com-fdbf89c3b895bb899dc30642043fa08596fc7111.tar.xz
Use <label>s to automatically gain clickable surface
Instead of making the <input>s cover the whole grid.
Diffstat (limited to 'commun.css')
-rw-r--r--commun.css15
1 files changed, 10 insertions, 5 deletions
diff --git a/commun.css b/commun.css
index 2f51778..4daa0b0 100644
--- a/commun.css
+++ b/commun.css
@@ -37,7 +37,7 @@ header.banner:hover h1 {
@media (min-width: 40em) {
.togglable > input.toggle,
.togglable > img.button,
- .togglable > .name {
+ .togglable > label {
display: none;
}
@@ -223,15 +223,17 @@ header.banner:hover h1 {
}
.togglable > input.toggle {
z-index: 2;
- grid-column: 1 / -1;
+ grid-column: 1;
position: absolute;
- width: 100%;
- height: 100%;
+ width: 2rem;
+ height: 2rem;
margin: 0;
opacity: 0;
}
.togglable > img.button.open {
grid-column: 1;
+ position: absolute;
+ left: 0.2rem;
width: 1.6rem;
height: 1.6rem;
object-fit: contain;
@@ -249,8 +251,11 @@ header.banner:hover h1 {
transition: transform 0.5s;
z-index: 4;
}
- .togglable > .name {
+ .togglable > label {
grid-column: 2;
+ height: 100%;
+ display: flex;
+ align-items: center;
}
.togglable > .content {
display: block;