diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2021-01-17 13:57:31 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2021-01-17 22:16:29 +0100 |
| commit | e5f3fa40e87c4af85eff633a37e4f1d8ca2d0d8e (patch) | |
| tree | 0d8df53069c2d00aa7c489f4e81a9a4011cd231b | |
| parent | 271a067775de291367988e44e6d916401f21dca3 (diff) | |
| download | quatuorbellefeuille.com-e5f3fa40e87c4af85eff633a37e4f1d8ca2d0d8e.tar.xz | |
Sidestep an issue with Safari
Can't call it a bug yet; haven't seen the problem documented.
| -rw-r--r-- | commun.css | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -231,16 +231,20 @@ footer.legal { font-size: 0.8rem; } + /* Ideally, we'd use display: grid to have labels aligned. + * Unfortunately, afaict on mobile Safari brainfarts and fails to + * move the input to its fixed top-right position when it is + * checked; instead it moves it… somewhere… + * + * Therefore, use display: flex and absolute positions insteaad. + */ .togglable { - display: grid; + display: flex; position: relative; - grid-template-columns: 2.4rem auto; align-items: center; --close-size: 2rem; } .togglable > input.toggle { - z-index: 2; - grid-column: 1; position: absolute; width: var(--height); height: var(--height); @@ -249,8 +253,7 @@ footer.legal { cursor: pointer; } .togglable > img.button.open { - grid-column: 1; - justify-self: center; + padding: calc(0.1 * var(--height)); width: calc(0.8 * var(--height)); height: calc(0.8 * var(--height)); object-fit: contain; @@ -270,10 +273,8 @@ footer.legal { z-index: 4; } .togglable > label { - grid-column: 2; - height: 100%; - display: flex; - align-items: center; + position: absolute; + left: 2.6rem; cursor: pointer; } .togglable > .content { @@ -332,7 +333,7 @@ footer.legal { margin: auto; } - .social img { + .social > .content img { width: 3em; margin-top: 0.5em; margin-bottom: 0.5em; |
