From 53643f0ebc965d2ffa1ab5e756705a455c45495a Mon Sep 17 00:00:00 2001 From: domi41 Date: Thu, 14 May 2020 13:15:40 +0200 Subject: [PATCH] Tweak the poll's labels for mobile with a CSS media query. Thanks @pierre-louis for the bug report ! --- templates/repo/polls/poll_badge.tmpl | 2 +- web_src/less/_poll.less | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/templates/repo/polls/poll_badge.tmpl b/templates/repo/polls/poll_badge.tmpl index e0298d6fa..37d15e3da 100644 --- a/templates/repo/polls/poll_badge.tmpl +++ b/templates/repo/polls/poll_badge.tmpl @@ -38,7 +38,7 @@ {{ if $.Super.IsSigned }}
{{ range $grade, $icon := .Poll.GetGradationList }} -
+ {{ $.Super.CsrfTokenHtml }} diff --git a/web_src/less/_poll.less b/web_src/less/_poll.less index 2cf21ce1b..8ead1b193 100644 --- a/web_src/less/_poll.less +++ b/web_src/less/_poll.less @@ -7,6 +7,9 @@ // +@mobile: ~"only screen and (max-width: 600px)"; + + /* Emote Support */ .emote { font-family: "Source Code Pro", Consolas, monaco, monospace !important; @@ -44,10 +47,15 @@ .poll-badge { display: inline-block; + margin-top: 0.3em; + margin-bottom: 0.3em; /* Otherwise the h1 blocks a portion of the label's hover area */ position: relative; z-index: 1; /***************************************************************/ + @media @mobile { + display: block; + } } .poll-badge:focus-within .judgment-forms, @@ -119,9 +127,9 @@ color: darkred; position: absolute; content: "×"; - top: 0.11em; - left: 0.19em; - font-size: 2em; + top: 0.05em; + left: 0.05em; + font-size: 3em; opacity: 0.8; pointer-events: none; }